Skip to content
Snippets Groups Projects
Commit 5de37a43 authored by Tobi-Alonso's avatar Tobi-Alonso
Browse files

[FPGADataFlow] Clean code

parent 57f42b20
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,6 @@
import os
import finn.custom_op.registry as registry
from finn.transformation import Transformation
from finn.util.basic import make_build_dir
from finn.util.fpgadataflow import is_fpgadataflow_node
from finn.transformation import Transformation
......@@ -37,12 +36,13 @@ from finn.util.basic import get_num_default_workers
import multiprocessing as mp
import copy
def _codegen_single_node(node, model):
"""Calls C++ code generation for one node. Resulting code can be used
to simulate node using cppsim."""
op_type = node.op_type
try:
try:
# lookup op_type in registry of CustomOps
inst = registry.custom_op[op_type](node)
# get the path of the code generation directory
......@@ -85,7 +85,6 @@ class PrepareCppSim(Transformation):
_codegen_single_node(node, self.model)
return (node, False)
def apply(self, model):
# Remove old nodes from the current model
self.model = copy.deepcopy(model)
......@@ -106,4 +105,4 @@ class PrepareCppSim(Transformation):
if run is True:
run_again = True
return (model, run_again)
\ No newline at end of file
return (model, run_again)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment