|
26 | 26 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
27 | 27 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
28 | 28 |
|
29 |
| -from finn.core.modelwrapper import ModelWrapper |
30 |
| -import os |
31 | 29 | import json
|
| 30 | +import numpy as np |
| 31 | +import os |
| 32 | +from copy import deepcopy |
| 33 | +from shutil import copy, copytree |
| 34 | + |
32 | 35 | import finn.transformation.fpgadataflow.convert_to_hls_layers as to_hls
|
33 | 36 | import finn.transformation.streamline.absorb as absorb
|
34 |
| -from finn.transformation.bipolar_to_xnor import ConvertBipolarMatMulToXnorPopcount |
35 |
| -from finn.transformation.fold_constants import FoldConstants |
36 |
| -from finn.transformation.general import ( |
37 |
| - ApplyConfig, |
38 |
| - GiveReadableTensorNames, |
39 |
| - GiveUniqueNodeNames, |
40 |
| - RemoveUnusedTensors, |
41 |
| - RemoveStaticGraphInputs, |
42 |
| -) |
43 |
| -from finn.transformation.infer_datatypes import InferDataTypes |
44 |
| -from finn.transformation.infer_shapes import InferShapes |
45 |
| -from finn.transformation.streamline import Streamline |
46 |
| -from finn.transformation.infer_data_layouts import InferDataLayouts |
47 |
| -from finn.transformation.move_reshape import RemoveCNVtoFCFlatten |
48 |
| -from finn.transformation.lower_convs_to_matmul import LowerConvsToMatMul |
49 |
| -from finn.transformation.streamline.reorder import MakeMaxPoolNHWC |
50 |
| - |
51 |
| -from shutil import copy, copytree |
52 |
| -from finn.transformation.fpgadataflow.insert_dwc import InsertDWC |
53 |
| -from finn.transformation.fpgadataflow.insert_fifo import InsertFIFO |
54 |
| -from finn.transformation.fpgadataflow.prepare_ip import PrepareIP |
55 |
| -from finn.transformation.fpgadataflow.hlssynth_ip import HLSSynthIP |
56 |
| -from finn.transformation.fpgadataflow.create_stitched_ip import CreateStitchedIP |
57 |
| -from finn.transformation.fpgadataflow.set_fifo_depths import ( |
58 |
| - InsertAndSetFIFODepths, |
59 |
| - RemoveShallowFIFOs, |
60 |
| -) |
61 |
| -from finn.transformation.fpgadataflow.make_zynq_proj import ZynqBuild |
62 |
| -from finn.transformation.fpgadataflow.vitis_build import VitisBuild |
63 |
| -from finn.transformation.fpgadataflow.make_pynq_driver import MakePYNQDriver |
64 |
| -from finn.transformation.fpgadataflow.set_folding import SetFolding |
65 |
| -from finn.transformation.fpgadataflow.create_dataflow_partition import ( |
66 |
| - CreateDataflowPartition, |
67 |
| -) |
68 |
| -from finn.transformation.fpgadataflow.replace_verilog_relpaths import ( |
69 |
| - ReplaceVerilogRelPaths, |
70 |
| -) |
71 |
| -from finn.custom_op.registry import getCustomOp |
| 37 | +from finn.analysis.fpgadataflow.dataflow_performance import dataflow_performance |
72 | 38 | from finn.analysis.fpgadataflow.exp_cycles_per_layer import exp_cycles_per_layer
|
73 |
| -from finn.analysis.fpgadataflow.res_estimation import ( |
74 |
| - res_estimation, |
75 |
| - res_estimation_complete, |
76 |
| -) |
| 39 | +from finn.analysis.fpgadataflow.hls_synth_res_estimation import hls_synth_res_estimation |
77 | 40 | from finn.analysis.fpgadataflow.op_and_param_counts import (
|
78 | 41 | aggregate_dict_keys,
|
79 | 42 | op_and_param_counts,
|
80 | 43 | )
|
81 |
| -from finn.analysis.fpgadataflow.dataflow_performance import dataflow_performance |
82 |
| -from finn.analysis.fpgadataflow.hls_synth_res_estimation import hls_synth_res_estimation |
83 |
| -from finn.util.config import extract_model_config_to_json |
84 |
| -from finn.transformation.fpgadataflow.synth_ooc import SynthOutOfContext |
| 44 | +from finn.analysis.fpgadataflow.res_estimation import ( |
| 45 | + res_estimation, |
| 46 | + res_estimation_complete, |
| 47 | +) |
85 | 48 | from finn.builder.build_dataflow_config import (
|
86 | 49 | DataflowBuildConfig,
|
87 | 50 | DataflowOutputType,
|
88 | 51 | ShellFlowType,
|
89 | 52 | VerificationStepType,
|
90 | 53 | )
|
91 |
| -from finn.transformation.fpgadataflow.annotate_cycles import AnnotateCycles |
| 54 | +from finn.core.modelwrapper import ModelWrapper |
92 | 55 | from finn.core.onnx_exec import execute_onnx
|
93 |
| -import numpy as np |
94 |
| -from finn.util.test import execute_parent |
95 |
| -from finn.transformation.fpgadataflow.prepare_cppsim import PrepareCppSim |
| 56 | +from finn.core.throughput_test import throughput_test_rtlsim |
| 57 | +from finn.custom_op.registry import getCustomOp |
| 58 | +from finn.transformation.bipolar_to_xnor import ConvertBipolarMatMulToXnorPopcount |
| 59 | +from finn.transformation.fold_constants import FoldConstants |
| 60 | +from finn.transformation.fpgadataflow.annotate_cycles import AnnotateCycles |
96 | 61 | from finn.transformation.fpgadataflow.compile_cppsim import CompileCppSim
|
97 |
| -from finn.transformation.fpgadataflow.set_exec_mode import SetExecMode |
| 62 | +from finn.transformation.fpgadataflow.create_dataflow_partition import ( |
| 63 | + CreateDataflowPartition, |
| 64 | +) |
| 65 | +from finn.transformation.fpgadataflow.create_stitched_ip import CreateStitchedIP |
| 66 | +from finn.transformation.fpgadataflow.hlssynth_ip import HLSSynthIP |
| 67 | +from finn.transformation.fpgadataflow.insert_dwc import InsertDWC |
| 68 | +from finn.transformation.fpgadataflow.insert_fifo import InsertFIFO |
| 69 | +from finn.transformation.fpgadataflow.make_pynq_driver import MakePYNQDriver |
| 70 | +from finn.transformation.fpgadataflow.make_zynq_proj import ZynqBuild |
| 71 | +from finn.transformation.fpgadataflow.prepare_cppsim import PrepareCppSim |
| 72 | +from finn.transformation.fpgadataflow.prepare_ip import PrepareIP |
98 | 73 | from finn.transformation.fpgadataflow.prepare_rtlsim import PrepareRTLSim
|
99 |
| -from finn.core.throughput_test import throughput_test_rtlsim |
100 |
| -from copy import deepcopy |
| 74 | +from finn.transformation.fpgadataflow.replace_verilog_relpaths import ( |
| 75 | + ReplaceVerilogRelPaths, |
| 76 | +) |
| 77 | +from finn.transformation.fpgadataflow.set_exec_mode import SetExecMode |
| 78 | +from finn.transformation.fpgadataflow.set_fifo_depths import ( |
| 79 | + InsertAndSetFIFODepths, |
| 80 | + RemoveShallowFIFOs, |
| 81 | +) |
| 82 | +from finn.transformation.fpgadataflow.set_folding import SetFolding |
| 83 | +from finn.transformation.fpgadataflow.synth_ooc import SynthOutOfContext |
| 84 | +from finn.transformation.fpgadataflow.vitis_build import VitisBuild |
| 85 | +from finn.transformation.general import ( |
| 86 | + ApplyConfig, |
| 87 | + GiveReadableTensorNames, |
| 88 | + GiveUniqueNodeNames, |
| 89 | + RemoveStaticGraphInputs, |
| 90 | + RemoveUnusedTensors, |
| 91 | +) |
| 92 | +from finn.transformation.infer_data_layouts import InferDataLayouts |
| 93 | +from finn.transformation.infer_datatypes import InferDataTypes |
| 94 | +from finn.transformation.infer_shapes import InferShapes |
| 95 | +from finn.transformation.lower_convs_to_matmul import LowerConvsToMatMul |
| 96 | +from finn.transformation.move_reshape import RemoveCNVtoFCFlatten |
| 97 | +from finn.transformation.streamline import Streamline |
| 98 | +from finn.transformation.streamline.reorder import MakeMaxPoolNHWC |
| 99 | +from finn.util.config import extract_model_config_to_json |
| 100 | +from finn.util.test import execute_parent |
101 | 101 |
|
102 | 102 |
|
103 | 103 | def verify_step(
|
|
0 commit comments