zigzag-dse 3.1.2__tar.gz → 3.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- zigzag_dse-3.2.0/MANIFEST.in +2 -0
- {zigzag_dse-3.1.2/zigzag_dse.egg-info → zigzag_dse-3.2.0}/PKG-INFO +6 -3
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/pyproject.toml +8 -5
- zigzag_dse-3.2.0/tests/main/test_imc/test_aimc.py +34 -0
- zigzag_dse-3.2.0/tests/main/test_imc/test_dimc.py +34 -0
- zigzag_dse-3.2.0/tests/main/test_origin/test_ascend_like.py +33 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/tests/main/test_origin/test_edge_tpu_like.py +7 -11
- zigzag_dse-3.1.2/tests/main/test_origin/test_ascend_like.py → zigzag_dse-3.2.0/tests/main/test_origin/test_meta_prototype_like.py +7 -11
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/tests/main/test_origin/test_tesla_npu_like.py +7 -11
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/tests/main/test_origin/test_tpu_like.py +7 -11
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/tests/main/test_with_mix_spatial_mapping/test_ascend_like.py +5 -9
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/tests/main/test_with_mix_spatial_mapping/test_edge_tpu_like.py +5 -9
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/tests/main/test_with_mix_spatial_mapping/test_meta_prototype_like.py +5 -9
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/tests/main/test_with_mix_spatial_mapping/test_tesla_npu_like.py +5 -9
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/tests/main/test_with_mix_spatial_mapping/test_tpu_like.py +5 -9
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/tests/main/test_without_unused_memory/test_ascend_like.py +5 -9
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/tests/main/test_without_unused_memory/test_edge_tpu_like.py +5 -9
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/tests/main/test_without_unused_memory/test_meta_prototype_like.py +5 -9
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/tests/main/test_without_unused_memory/test_tesla_npu_like.py +5 -9
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/tests/main/test_without_unused_memory/test_tpu_like.py +5 -9
- zigzag_dse-3.2.0/zigzag/__init__.py +3 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/__main__.py +4 -22
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/api.py +76 -92
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/cacti/cacti_master/cacti_config_creator.py +8 -7
- zigzag_dse-3.2.0/zigzag/cost_model/__init__.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/cost_model/cost_model.py +49 -40
- zigzag_dse-3.2.0/zigzag/cost_model/cost_model_imc.py +186 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/hardware/architecture/Adder.py +2 -2
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/hardware/architecture/Core.py +6 -2
- zigzag_dse-3.2.0/zigzag/hardware/architecture/ImcArray.py +585 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/hardware/architecture/MemoryHierarchy.py +5 -4
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/hardware/architecture/MemoryInstance.py +1 -0
- zigzag_dse-3.2.0/zigzag/hardware/architecture/__init__.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/hardware/architecture/get_cacti_cost.py +25 -43
- zigzag_dse-3.2.0/zigzag/hardware/architecture/imc_unit.py +440 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/hardware/architecture/memory_level.py +13 -4
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/hardware/architecture/memory_port.py +0 -1
- zigzag_dse-3.2.0/zigzag/hardware/architecture/operational_array.py +56 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/hardware/architecture/operational_unit.py +3 -3
- zigzag_dse-3.2.0/zigzag/inputs/workload/alexnet.onnx +0 -0
- zigzag_dse-3.2.0/zigzag/inputs/workload/mobilenetv2.onnx +0 -0
- zigzag_dse-3.2.0/zigzag/inputs/workload/resnet18.onnx +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/mapping/Mapping.py +47 -39
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/mapping/SpatialMappingInternal.py +13 -8
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/mapping/TemporalMapping.py +9 -4
- zigzag_dse-3.2.0/zigzag/mapping/__init__.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/mapping/data_movement.py +10 -2
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/mapping/mapping_assist_funcs.py +3 -2
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/mapping/spatial_mapping.py +14 -10
- zigzag_dse-3.2.0/zigzag/opt/__init__.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/opt/loma/LomaEngine.py +16 -12
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/opt/loma/MemoryAllocator.py +6 -5
- zigzag_dse-3.2.0/zigzag/opt/loma/__init__.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/opt/loma/multipermute.py +9 -6
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/opt/salsa/SalsaEngine.py +5 -9
- zigzag_dse-3.2.0/zigzag/opt/salsa/__init__.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/parser/AcceleratorValidator.py +91 -23
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/parser/MappingValidator.py +5 -11
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/parser/UpgradedValidator.py +14 -14
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/parser/WorkloadValidator.py +0 -6
- zigzag_dse-3.2.0/zigzag/parser/__init__.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/parser/accelerator_factory.py +47 -11
- zigzag_dse-3.2.0/zigzag/parser/arguments.py +25 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/parser/onnx/ConvParser.py +27 -7
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/parser/onnx/GemmParser.py +1 -1
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/parser/onnx/MatMulParser.py +1 -1
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/parser/onnx/ONNXOperatorParser.py +5 -1
- zigzag_dse-3.2.0/zigzag/parser/onnx/__init__.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/parser/onnx/utils.py +2 -36
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/parser/workload_factory.py +3 -4
- zigzag_dse-3.2.0/zigzag/py.typed +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/stages/AcceleratorParserStage.py +4 -3
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/stages/CostModelStage.py +3 -3
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/stages/PEArrayScalingStage.py +0 -1
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/stages/PlotTemporalMappingsStage.py +4 -9
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/stages/RemoveUnusedMemoryStage.py +43 -79
- zigzag_dse-3.2.0/zigzag/stages/SearchUnusedMemoryStage.py +354 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/stages/SpatialMappingConversionStage.py +3 -3
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/stages/SpatialMappingGeneratorStage.py +87 -19
- zigzag_dse-3.2.0/zigzag/stages/VisualizationStage.py +53 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/stages/WorkloadParserStage.py +4 -2
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/stages/WorkloadStage.py +4 -8
- zigzag_dse-3.2.0/zigzag/stages/__init__.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/stages/reduce_stages.py +0 -2
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/stages/run_opt_stages.py +9 -11
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/stages/save_stages.py +42 -36
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/utils.py +7 -6
- zigzag_dse-3.2.0/zigzag/visualization/__init__.py +0 -0
- zigzag_dse-3.2.0/zigzag/visualization/graph/__init__.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/visualization/graph/memory_hierarchy.py +0 -1
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/visualization/graph/workload.py +2 -1
- zigzag_dse-3.2.0/zigzag/visualization/results/__init__.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/visualization/results/plot_cme.py +2 -4
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/visualization/results/print_mapping.py +2 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/workload/LayerNodeABC.py +1 -1
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/workload/Workload.py +1 -1
- zigzag_dse-3.2.0/zigzag/workload/__init__.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/workload/layer_attributes.py +15 -6
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/workload/layer_node.py +12 -11
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0/zigzag_dse.egg-info}/PKG-INFO +6 -3
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag_dse.egg-info/SOURCES.txt +20 -17
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag_dse.egg-info/requires.txt +4 -1
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag_dse.egg-info/top_level.txt +0 -3
- zigzag_dse-3.1.2/MANIFEST.in +0 -2
- zigzag_dse-3.1.2/tests/main/test_imc/test_aimc.py +0 -40
- zigzag_dse-3.1.2/tests/main/test_imc/test_dimc.py +0 -40
- zigzag_dse-3.1.2/tests/main/test_origin/test_meta_prototype_like.py +0 -37
- zigzag_dse-3.1.2/zigzag/__init__.py +0 -1
- zigzag_dse-3.1.2/zigzag/cost_model/CostModelEvaluationForIMC.py +0 -432
- zigzag_dse-3.1.2/zigzag/hardware/architecture/AimcArray.py +0 -503
- zigzag_dse-3.1.2/zigzag/hardware/architecture/DimcArray.py +0 -816
- zigzag_dse-3.1.2/zigzag/hardware/architecture/ImcArray.py +0 -39
- zigzag_dse-3.1.2/zigzag/hardware/architecture/imc_unit.py +0 -243
- zigzag_dse-3.1.2/zigzag/hardware/architecture/operational_array.py +0 -74
- zigzag_dse-3.1.2/zigzag/inputs/validation/hardware/sram_imc/aimc_validation/22-28nm/aimc1_validation_subfunc.py +0 -182
- zigzag_dse-3.1.2/zigzag/inputs/validation/hardware/sram_imc/aimc_validation/22-28nm/aimc2_validation_subfunc.py +0 -286
- zigzag_dse-3.1.2/zigzag/inputs/validation/hardware/sram_imc/aimc_validation/22-28nm/aimc3_validation_subfunc.py +0 -210
- zigzag_dse-3.1.2/zigzag/inputs/validation/hardware/sram_imc/aimc_validation/22-28nm/aimc_cost_model.py +0 -55
- zigzag_dse-3.1.2/zigzag/inputs/validation/hardware/sram_imc/aimc_validation/22-28nm/aimc_validation.py +0 -144
- zigzag_dse-3.1.2/zigzag/inputs/validation/hardware/sram_imc/aimc_validation/22-28nm/dimc_cost_model.py +0 -393
- zigzag_dse-3.1.2/zigzag/inputs/validation/hardware/sram_imc/dimc_validation/28nm/dimc_cost_model.py +0 -393
- zigzag_dse-3.1.2/zigzag/inputs/validation/hardware/sram_imc/dimc_validation/28nm/dimc_validation.py +0 -145
- zigzag_dse-3.1.2/zigzag/inputs/validation/hardware/sram_imc/dimc_validation/28nm/dimc_validation4.py +0 -46
- zigzag_dse-3.1.2/zigzag/inputs/validation/hardware/sram_imc/dimc_validation/28nm/dimc_validation_subfunc.py +0 -422
- zigzag_dse-3.1.2/zigzag/inputs/validation/hardware/sram_imc/dimc_validation/28nm/dimc_validation_subfunc4.py +0 -215
- zigzag_dse-3.1.2/zigzag/inputs/validation/hardware/sram_imc/dimc_validation/28nm/model_extration_28nm.py +0 -79
- zigzag_dse-3.1.2/zigzag/stages/DumpStage.py +0 -35
- zigzag_dse-3.1.2/zigzag/stages/GeneralParameterIteratorStage.py +0 -58
- zigzag_dse-3.1.2/zigzag/stages/SearchUnusedMemoryStage.py +0 -458
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/LICENSE +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/README.md +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/setup.cfg +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/tests/main/test_imc/__init__.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/tests/main/test_with_mix_spatial_mapping/__init__.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/tests/main/test_without_unused_memory/__init__.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/cacti/cacti_master/cacti_top.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/cacti/cacti_parser.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/cost_model/port_activity.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/datatypes.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/hardware/architecture/Accelerator.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/opt/loma/Loop.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/opt/salsa/SalsaState.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/parser/onnx/DefaultNodeParser.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/parser/onnx/ONNXModelParser.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/stages/LomaStage.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/stages/MainStage.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/stages/ONNXModelParserStage.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/stages/SalsaStage.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/stages/Stage.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/stages/TemporalOrderingConversionStage.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/workload/DNNWorkload.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/workload/DummyNode.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/workload/LayerAttribute.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag/workload/ONNXWorkload.py +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag_dse.egg-info/dependency_links.txt +0 -0
- {zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/zigzag_dse.egg-info/entry_points.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: zigzag-dse
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.2.0
|
|
4
4
|
Summary: ZigZag - Deep Learning Hardware Design Space Exploration
|
|
5
5
|
Author-email: Arne Symons <arne.symons@kuleuven.be>, Linyan Mei <linyan.mei@kuleuven.be>
|
|
6
6
|
License: MIT License
|
|
@@ -25,7 +25,7 @@ License: MIT License
|
|
|
25
25
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
26
|
SOFTWARE.
|
|
27
27
|
|
|
28
|
-
Project-URL: Homepage, https://github.com/
|
|
28
|
+
Project-URL: Homepage, https://github.com/KULeuven-MICAS/zigzag
|
|
29
29
|
Keywords: zigzag,dse,design-space-exploration,machine-learning,deep-learning,mapping
|
|
30
30
|
Classifier: License :: OSI Approved :: BSD License
|
|
31
31
|
Classifier: Programming Language :: Python
|
|
@@ -40,12 +40,15 @@ Requires-Dist: onnx
|
|
|
40
40
|
Requires-Dist: tqdm
|
|
41
41
|
Requires-Dist: multiprocessing_on_dill
|
|
42
42
|
Requires-Dist: pyyaml
|
|
43
|
-
Requires-Dist:
|
|
43
|
+
Requires-Dist: cerberus
|
|
44
44
|
Provides-Extra: dev
|
|
45
45
|
Requires-Dist: bumpver; extra == "dev"
|
|
46
46
|
Requires-Dist: pip-tools; extra == "dev"
|
|
47
47
|
Requires-Dist: build; extra == "dev"
|
|
48
48
|
Requires-Dist: twine; extra == "dev"
|
|
49
|
+
Requires-Dist: pytest; extra == "dev"
|
|
50
|
+
Requires-Dist: typeguard; extra == "dev"
|
|
51
|
+
Requires-Dist: ruff; extra == "dev"
|
|
49
52
|
|
|
50
53
|
# ZigZag [Documentation](https://kuleuven-micas.github.io/zigzag/) [Tutorial](https://www.youtube.com/watch?v=VgUuG4QaSQQ&list=PLUi74Rw4uFDIuK_6FCF9Bv7SMJlHfG4l3&index=1)
|
|
51
54
|
This repository presents the novel version of our tried-and-tested HW Architecture-Mapping Design Space Exploration (DSE) Framework for Deep Learning (DL) accelerators. ZigZag bridges the gap between algorithmic DL decisions and their acceleration cost on specialized accelerators through a fast and accurate HW cost estimation.
|
|
@@ -9,9 +9,12 @@ include = ["*"] # ["*"] by default
|
|
|
9
9
|
exclude = ["inputs*", "outputs*", "docs*"]
|
|
10
10
|
namespaces = true # true by default
|
|
11
11
|
|
|
12
|
+
[tool.setuptools.package-data]
|
|
13
|
+
"zigzag" = ["py.typed"]
|
|
14
|
+
|
|
12
15
|
[project]
|
|
13
16
|
name = "zigzag-dse"
|
|
14
|
-
version = "3.
|
|
17
|
+
version = "3.2.0"
|
|
15
18
|
description = "ZigZag - Deep Learning Hardware Design Space Exploration"
|
|
16
19
|
readme = "README.md"
|
|
17
20
|
authors = [{ name = "Arne Symons", email = "arne.symons@kuleuven.be" }, { name = "Linyan Mei", email = "linyan.mei@kuleuven.be" }]
|
|
@@ -30,22 +33,22 @@ dependencies = [
|
|
|
30
33
|
'tqdm',
|
|
31
34
|
'multiprocessing_on_dill',
|
|
32
35
|
'pyyaml',
|
|
33
|
-
'
|
|
36
|
+
'cerberus',
|
|
34
37
|
]
|
|
35
38
|
requires-python = ">=3.11"
|
|
36
39
|
|
|
37
40
|
|
|
38
41
|
[project.optional-dependencies]
|
|
39
|
-
dev = ["bumpver", "pip-tools", "build", "twine"]
|
|
42
|
+
dev = ["bumpver", "pip-tools", "build", "twine", 'pytest', 'typeguard', 'ruff']
|
|
40
43
|
|
|
41
44
|
[project.urls]
|
|
42
|
-
Homepage = "https://github.com/
|
|
45
|
+
Homepage = "https://github.com/KULeuven-MICAS/zigzag"
|
|
43
46
|
|
|
44
47
|
[project.scripts]
|
|
45
48
|
realpython = "zigzag.__main__:main"
|
|
46
49
|
|
|
47
50
|
[tool.bumpver]
|
|
48
|
-
current_version = "3.
|
|
51
|
+
current_version = "3.2.0"
|
|
49
52
|
version_pattern = "MAJOR.MINOR.PATCH"
|
|
50
53
|
commit_message = "bump version {old_version} -> {new_version}"
|
|
51
54
|
commit = true
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import pytest
|
|
2
|
+
|
|
3
|
+
from zigzag.api import get_hardware_performance_zigzag_imc
|
|
4
|
+
|
|
5
|
+
workloads = (
|
|
6
|
+
"zigzag/inputs/workload/resnet18.onnx",
|
|
7
|
+
"zigzag/inputs/workload/resnet18.yaml",
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
# Expected energy, latency (#cycles), clk time and area for each workload defined above
|
|
11
|
+
ens_lats_clks_areas = {
|
|
12
|
+
"zigzag/inputs/workload/resnet18.onnx": (4695829569.611852, 5540772.0, 14.07244, 2.3426222152749223),
|
|
13
|
+
"zigzag/inputs/workload/resnet18.yaml": (4265124724.2396007, 4907619.0, 14.07244, 2.3426222152749223),
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@pytest.fixture
|
|
18
|
+
def mapping():
|
|
19
|
+
return "zigzag/inputs/mapping/default_imc.yaml"
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@pytest.fixture
|
|
23
|
+
def accelerator():
|
|
24
|
+
return "zigzag/inputs/hardware/aimc.yaml"
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@pytest.mark.parametrize("workload", workloads)
|
|
28
|
+
def test_api(workload: str, accelerator: str, mapping: str):
|
|
29
|
+
(energy, latency, tclk, area, cmes) = get_hardware_performance_zigzag_imc(workload, accelerator, mapping)
|
|
30
|
+
(expected_energy, expected_latency, expected_tclk, expected_area) = ens_lats_clks_areas[workload]
|
|
31
|
+
assert energy == pytest.approx(expected_energy)
|
|
32
|
+
assert latency == pytest.approx(expected_latency)
|
|
33
|
+
assert tclk == pytest.approx(expected_tclk)
|
|
34
|
+
assert area == pytest.approx(expected_area)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import pytest
|
|
2
|
+
|
|
3
|
+
from zigzag.api import get_hardware_performance_zigzag_imc
|
|
4
|
+
|
|
5
|
+
workloads = (
|
|
6
|
+
"zigzag/inputs/workload/resnet18.onnx",
|
|
7
|
+
"zigzag/inputs/workload/resnet18.yaml",
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
# Expected energy, latency (#cycles), clk time and area for each workload defined above
|
|
11
|
+
ens_lats_clks_areas = {
|
|
12
|
+
"zigzag/inputs/workload/resnet18.onnx": (4726270705.225856, 6337852.0, 3.75708, 0.8566212024),
|
|
13
|
+
"zigzag/inputs/workload/resnet18.yaml": (4268432908.954752, 5789353.0, 3.75708, 0.8566212024),
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@pytest.fixture
|
|
18
|
+
def mapping():
|
|
19
|
+
return "zigzag/inputs/mapping/default_imc.yaml"
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@pytest.fixture
|
|
23
|
+
def accelerator():
|
|
24
|
+
return "zigzag/inputs/hardware/dimc.yaml"
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@pytest.mark.parametrize("workload", workloads)
|
|
28
|
+
def test_api(workload: str, accelerator: str, mapping: str):
|
|
29
|
+
(energy, latency, tclk, area, cmes) = get_hardware_performance_zigzag_imc(workload, accelerator, mapping)
|
|
30
|
+
(expected_energy, expected_latency, expected_tclk, expected_area) = ens_lats_clks_areas[workload]
|
|
31
|
+
assert energy == pytest.approx(expected_energy)
|
|
32
|
+
assert latency == pytest.approx(expected_latency)
|
|
33
|
+
assert tclk == pytest.approx(expected_tclk)
|
|
34
|
+
assert area == pytest.approx(expected_area)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import pytest
|
|
2
|
+
|
|
3
|
+
from zigzag.api import get_hardware_performance_zigzag
|
|
4
|
+
|
|
5
|
+
workloads = (
|
|
6
|
+
"zigzag/inputs/workload/resnet18.onnx",
|
|
7
|
+
"zigzag/inputs/workload/resnet18.yaml",
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
# Expected energy and latency for each workload defined above
|
|
11
|
+
ens_lats = {
|
|
12
|
+
"zigzag/inputs/workload/resnet18.onnx": (1860963861.6800003, 3698589.0),
|
|
13
|
+
"zigzag/inputs/workload/resnet18.yaml": (2411783423.28, 4779709.0),
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@pytest.fixture
|
|
18
|
+
def mapping():
|
|
19
|
+
return "zigzag/inputs/mapping/ascend_like.yaml"
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@pytest.fixture
|
|
23
|
+
def accelerator():
|
|
24
|
+
return "zigzag/inputs/hardware/ascend_like.yaml"
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@pytest.mark.parametrize("workload", workloads)
|
|
28
|
+
def test_api(workload: str, accelerator: str, mapping: str):
|
|
29
|
+
(energy, latency, _) = get_hardware_performance_zigzag(workload, accelerator, mapping)
|
|
30
|
+
(expected_energy, expected_latency) = ens_lats[workload]
|
|
31
|
+
print(f"'{workload}': ({energy}, {latency}),")
|
|
32
|
+
assert energy == pytest.approx(expected_energy)
|
|
33
|
+
assert latency == pytest.approx(expected_latency)
|
|
@@ -3,33 +3,29 @@ import pytest
|
|
|
3
3
|
from zigzag.api import get_hardware_performance_zigzag
|
|
4
4
|
|
|
5
5
|
workloads = (
|
|
6
|
-
"inputs/workload/
|
|
7
|
-
"inputs/workload/
|
|
8
|
-
"inputs/workload/resnet18.onnx",
|
|
9
|
-
"inputs/workload/resnet18.yaml",
|
|
6
|
+
"zigzag/inputs/workload/resnet18.onnx",
|
|
7
|
+
"zigzag/inputs/workload/resnet18.yaml",
|
|
10
8
|
)
|
|
11
9
|
|
|
12
10
|
# Expected energy and latency for each workload defined above
|
|
13
11
|
ens_lats = {
|
|
14
|
-
"inputs/workload/
|
|
15
|
-
"inputs/workload/
|
|
16
|
-
"inputs/workload/resnet18.onnx": (1902637139.1499994, 3333310.0),
|
|
17
|
-
"inputs/workload/resnet18.yaml": (2413348670.67, 4268451.0),
|
|
12
|
+
"zigzag/inputs/workload/resnet18.onnx": (1902637139.1499994, 3333310.0),
|
|
13
|
+
"zigzag/inputs/workload/resnet18.yaml": (2413348670.67, 4268451.0),
|
|
18
14
|
}
|
|
19
15
|
|
|
20
16
|
|
|
21
17
|
@pytest.fixture
|
|
22
18
|
def mapping():
|
|
23
|
-
return "inputs/mapping/edge_tpu_like.yaml"
|
|
19
|
+
return "zigzag/inputs/mapping/edge_tpu_like.yaml"
|
|
24
20
|
|
|
25
21
|
|
|
26
22
|
@pytest.fixture
|
|
27
23
|
def accelerator():
|
|
28
|
-
return "inputs/hardware/edge_tpu_like.yaml"
|
|
24
|
+
return "zigzag/inputs/hardware/edge_tpu_like.yaml"
|
|
29
25
|
|
|
30
26
|
|
|
31
27
|
@pytest.mark.parametrize("workload", workloads)
|
|
32
|
-
def test_api(workload, accelerator, mapping):
|
|
28
|
+
def test_api(workload: str, accelerator: str, mapping: str):
|
|
33
29
|
(energy, latency, cmes) = get_hardware_performance_zigzag(workload, accelerator, mapping)
|
|
34
30
|
(expected_energy, expected_latency) = ens_lats[workload]
|
|
35
31
|
print(f"'{workload}': ({energy}, {latency}),")
|
|
@@ -3,33 +3,29 @@ import pytest
|
|
|
3
3
|
from zigzag.api import get_hardware_performance_zigzag
|
|
4
4
|
|
|
5
5
|
workloads = (
|
|
6
|
-
"inputs/workload/
|
|
7
|
-
"inputs/workload/
|
|
8
|
-
"inputs/workload/resnet18.onnx",
|
|
9
|
-
"inputs/workload/resnet18.yaml",
|
|
6
|
+
"zigzag/inputs/workload/resnet18.onnx",
|
|
7
|
+
"zigzag/inputs/workload/resnet18.yaml",
|
|
10
8
|
)
|
|
11
9
|
|
|
12
10
|
# Expected energy and latency for each workload defined above
|
|
13
11
|
ens_lats = {
|
|
14
|
-
"inputs/workload/
|
|
15
|
-
"inputs/workload/
|
|
16
|
-
"inputs/workload/resnet18.onnx": (1860963861.6800003, 3698589.0),
|
|
17
|
-
"inputs/workload/resnet18.yaml": (2411783423.28, 4779709.0),
|
|
12
|
+
"zigzag/inputs/workload/resnet18.onnx": (1869036158.08, 3366695.0),
|
|
13
|
+
"zigzag/inputs/workload/resnet18.yaml": (2418511845.2400002, 4130645.0),
|
|
18
14
|
}
|
|
19
15
|
|
|
20
16
|
|
|
21
17
|
@pytest.fixture
|
|
22
18
|
def mapping():
|
|
23
|
-
return "inputs/mapping/
|
|
19
|
+
return "zigzag/inputs/mapping/meta_prototype_like.yaml"
|
|
24
20
|
|
|
25
21
|
|
|
26
22
|
@pytest.fixture
|
|
27
23
|
def accelerator():
|
|
28
|
-
return "inputs/hardware/
|
|
24
|
+
return "zigzag/inputs/hardware/meta_prototype.yaml"
|
|
29
25
|
|
|
30
26
|
|
|
31
27
|
@pytest.mark.parametrize("workload", workloads)
|
|
32
|
-
def test_api(workload, accelerator, mapping):
|
|
28
|
+
def test_api(workload: str, accelerator: str, mapping: str):
|
|
33
29
|
(energy, latency, cmes) = get_hardware_performance_zigzag(workload, accelerator, mapping)
|
|
34
30
|
(expected_energy, expected_latency) = ens_lats[workload]
|
|
35
31
|
print(f"'{workload}': ({energy}, {latency}),")
|
|
@@ -3,33 +3,29 @@ import pytest
|
|
|
3
3
|
from zigzag.api import get_hardware_performance_zigzag
|
|
4
4
|
|
|
5
5
|
workloads = (
|
|
6
|
-
"inputs/workload/
|
|
7
|
-
"inputs/workload/
|
|
8
|
-
"inputs/workload/resnet18.onnx",
|
|
9
|
-
"inputs/workload/resnet18.yaml",
|
|
6
|
+
"zigzag/inputs/workload/resnet18.onnx",
|
|
7
|
+
"zigzag/inputs/workload/resnet18.yaml",
|
|
10
8
|
)
|
|
11
9
|
|
|
12
10
|
# Expected energy and latency for each workload defined above
|
|
13
11
|
ens_lats = {
|
|
14
|
-
"inputs/workload/
|
|
15
|
-
"inputs/workload/
|
|
16
|
-
"inputs/workload/resnet18.onnx": (1863716799.84, 3380242.0),
|
|
17
|
-
"inputs/workload/resnet18.yaml": (2374655424.176, 4066942.0),
|
|
12
|
+
"zigzag/inputs/workload/resnet18.onnx": (1863716799.84, 3380242.0),
|
|
13
|
+
"zigzag/inputs/workload/resnet18.yaml": (2374655424.176, 4066942.0),
|
|
18
14
|
}
|
|
19
15
|
|
|
20
16
|
|
|
21
17
|
@pytest.fixture
|
|
22
18
|
def mapping():
|
|
23
|
-
return "inputs/mapping/tesla_npu_like.yaml"
|
|
19
|
+
return "zigzag/inputs/mapping/tesla_npu_like.yaml"
|
|
24
20
|
|
|
25
21
|
|
|
26
22
|
@pytest.fixture
|
|
27
23
|
def accelerator():
|
|
28
|
-
return "inputs/hardware/tesla_npu_like.yaml"
|
|
24
|
+
return "zigzag/inputs/hardware/tesla_npu_like.yaml"
|
|
29
25
|
|
|
30
26
|
|
|
31
27
|
@pytest.mark.parametrize("workload", workloads)
|
|
32
|
-
def test_api(workload, accelerator, mapping):
|
|
28
|
+
def test_api(workload: str, accelerator: str, mapping: str):
|
|
33
29
|
(energy, latency, cmes) = get_hardware_performance_zigzag(workload, accelerator, mapping)
|
|
34
30
|
(expected_energy, expected_latency) = ens_lats[workload]
|
|
35
31
|
print(f"'{workload}': ({energy}, {latency}),")
|
|
@@ -3,33 +3,29 @@ import pytest
|
|
|
3
3
|
from zigzag.api import get_hardware_performance_zigzag
|
|
4
4
|
|
|
5
5
|
workloads = (
|
|
6
|
-
"inputs/workload/
|
|
7
|
-
"inputs/workload/
|
|
8
|
-
"inputs/workload/resnet18.onnx",
|
|
9
|
-
"inputs/workload/resnet18.yaml",
|
|
6
|
+
"zigzag/inputs/workload/resnet18.onnx",
|
|
7
|
+
"zigzag/inputs/workload/resnet18.yaml",
|
|
10
8
|
)
|
|
11
9
|
|
|
12
10
|
# Expected energy and latency for each workload defined above
|
|
13
11
|
ens_lats = {
|
|
14
|
-
"inputs/workload/
|
|
15
|
-
"inputs/workload/
|
|
16
|
-
"inputs/workload/resnet18.onnx": (1795904402.5120003, 4158539.0),
|
|
17
|
-
"inputs/workload/resnet18.yaml": (2296490149.296, 4906975.0),
|
|
12
|
+
"zigzag/inputs/workload/resnet18.onnx": (1795904402.5120003, 4158539.0),
|
|
13
|
+
"zigzag/inputs/workload/resnet18.yaml": (2296490149.296, 4906975.0),
|
|
18
14
|
}
|
|
19
15
|
|
|
20
16
|
|
|
21
17
|
@pytest.fixture
|
|
22
18
|
def mapping():
|
|
23
|
-
return "inputs/mapping/tpu_like.yaml"
|
|
19
|
+
return "zigzag/inputs/mapping/tpu_like.yaml"
|
|
24
20
|
|
|
25
21
|
|
|
26
22
|
@pytest.fixture
|
|
27
23
|
def accelerator():
|
|
28
|
-
return "inputs/hardware/tpu_like.yaml"
|
|
24
|
+
return "zigzag/inputs/hardware/tpu_like.yaml"
|
|
29
25
|
|
|
30
26
|
|
|
31
27
|
@pytest.mark.parametrize("workload", workloads)
|
|
32
|
-
def test_api(workload, accelerator, mapping):
|
|
28
|
+
def test_api(workload: str, accelerator: str, mapping: str):
|
|
33
29
|
(energy, latency, _) = get_hardware_performance_zigzag(workload, accelerator, mapping)
|
|
34
30
|
(expected_energy, expected_latency) = ens_lats[workload]
|
|
35
31
|
print(f"{workload}: ({energy}, {latency}),")
|
{zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/tests/main/test_with_mix_spatial_mapping/test_ascend_like.py
RENAMED
|
@@ -7,18 +7,14 @@ from zigzag.api import get_hardware_performance_zigzag_with_mix_spatial_mapping
|
|
|
7
7
|
# Test case for when spatial_mapping is provided, while spatial_mapping_hint is not provided.
|
|
8
8
|
|
|
9
9
|
workloads = (
|
|
10
|
-
"zigzag/inputs/
|
|
11
|
-
"zigzag/inputs/
|
|
12
|
-
"zigzag/inputs/examples/workload/resnet18.onnx",
|
|
13
|
-
"zigzag.inputs.examples.workload.resnet18",
|
|
10
|
+
"zigzag/inputs/workload/resnet18.onnx",
|
|
11
|
+
"zigzag/inputs/workload/resnet18.yaml",
|
|
14
12
|
)
|
|
15
13
|
|
|
16
14
|
# Expected energy and latency for each workload defined above
|
|
17
15
|
ens_lats = {
|
|
18
|
-
"zigzag/inputs/
|
|
19
|
-
"zigzag/inputs/
|
|
20
|
-
"zigzag/inputs/examples/workload/resnet18.onnx": (1679218425.5100002, 3713386),
|
|
21
|
-
"zigzag.inputs.examples.workload.resnet18": (2290766279.31, 4442443),
|
|
16
|
+
"zigzag/inputs/workload/resnet18.onnx": (1679218425.5100002, 3713386),
|
|
17
|
+
"zigzag/inputs/workload/resnet18.yaml": (2290766279.31, 4442443),
|
|
22
18
|
}
|
|
23
19
|
|
|
24
20
|
|
|
@@ -56,7 +52,7 @@ def accelerator():
|
|
|
56
52
|
|
|
57
53
|
|
|
58
54
|
@pytest.mark.parametrize("workload", workloads)
|
|
59
|
-
def test_api(workload, accelerator, mapping):
|
|
55
|
+
def test_api(workload: str, accelerator: str, mapping: str):
|
|
60
56
|
(energy, latency, cmes) = get_hardware_performance_zigzag_with_mix_spatial_mapping(workload, accelerator, mapping)
|
|
61
57
|
(expected_energy, expected_latency) = ens_lats[workload]
|
|
62
58
|
assert energy == pytest.approx(expected_energy)
|
{zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/tests/main/test_with_mix_spatial_mapping/test_edge_tpu_like.py
RENAMED
|
@@ -7,18 +7,14 @@ from zigzag.api import get_hardware_performance_zigzag_with_mix_spatial_mapping
|
|
|
7
7
|
# Test case for when both spatial_mapping and spatial_mapping_hint are provided.
|
|
8
8
|
|
|
9
9
|
workloads = (
|
|
10
|
-
"zigzag/inputs/
|
|
11
|
-
"zigzag/inputs/
|
|
12
|
-
"zigzag/inputs/examples/workload/resnet18.onnx",
|
|
13
|
-
"zigzag.inputs.examples.workload.resnet18",
|
|
10
|
+
"zigzag/inputs/workload/resnet18.onnx",
|
|
11
|
+
"zigzag/inputs/workload/resnet18.yaml",
|
|
14
12
|
)
|
|
15
13
|
|
|
16
14
|
# Expected energy and latency for each workload defined above
|
|
17
15
|
ens_lats = {
|
|
18
|
-
"zigzag/inputs/
|
|
19
|
-
"zigzag/inputs/
|
|
20
|
-
"zigzag/inputs/examples/workload/resnet18.onnx": (1763135800.67, 5001291),
|
|
21
|
-
"zigzag.inputs.examples.workload.resnet18": (2090252961.0700002, 5858437),
|
|
16
|
+
"zigzag/inputs/workload/resnet18.onnx": (1763135800.67, 5001291),
|
|
17
|
+
"zigzag/inputs/workload/resnet18.yaml": (2090252961.0700002, 5858437),
|
|
22
18
|
}
|
|
23
19
|
|
|
24
20
|
|
|
@@ -72,7 +68,7 @@ def accelerator():
|
|
|
72
68
|
|
|
73
69
|
|
|
74
70
|
@pytest.mark.parametrize("workload", workloads)
|
|
75
|
-
def test_api(workload, accelerator, mapping):
|
|
71
|
+
def test_api(workload: str, accelerator: str, mapping: str):
|
|
76
72
|
(energy, latency, cmes) = get_hardware_performance_zigzag_with_mix_spatial_mapping(workload, accelerator, mapping)
|
|
77
73
|
(expected_energy, expected_latency) = ens_lats[workload]
|
|
78
74
|
assert energy == pytest.approx(expected_energy)
|
|
@@ -7,18 +7,14 @@ from zigzag.api import get_hardware_performance_zigzag_with_mix_spatial_mapping
|
|
|
7
7
|
# Test case for when an incomplete spatial_mapping is provided and spatial_mapping_hint is also provided.
|
|
8
8
|
|
|
9
9
|
workloads = (
|
|
10
|
-
"zigzag/inputs/
|
|
11
|
-
"zigzag/inputs/
|
|
12
|
-
"zigzag/inputs/examples/workload/resnet18.onnx",
|
|
13
|
-
"zigzag.inputs.examples.workload.resnet18",
|
|
10
|
+
"zigzag/inputs/workload/resnet18.onnx",
|
|
11
|
+
"zigzag/inputs/workload/resnet18.yaml",
|
|
14
12
|
)
|
|
15
13
|
|
|
16
14
|
# Expected energy and latency for each workload defined above
|
|
17
15
|
ens_lats = {
|
|
18
|
-
"zigzag/inputs/
|
|
19
|
-
"zigzag/inputs/
|
|
20
|
-
"zigzag/inputs/examples/workload/resnet18.onnx": (1730672410, 3262009),
|
|
21
|
-
"zigzag.inputs.examples.workload.resnet18": (2265438430, 4017227),
|
|
16
|
+
"zigzag/inputs/workload/resnet18.onnx": (1730672410, 3262009),
|
|
17
|
+
"zigzag/inputs/workload/resnet18.yaml": (2265438430, 4017227),
|
|
22
18
|
}
|
|
23
19
|
|
|
24
20
|
|
|
@@ -56,7 +52,7 @@ def accelerator():
|
|
|
56
52
|
|
|
57
53
|
|
|
58
54
|
@pytest.mark.parametrize("workload", workloads)
|
|
59
|
-
def test_api(workload, accelerator, mapping):
|
|
55
|
+
def test_api(workload: str, accelerator: str, mapping: str):
|
|
60
56
|
(energy, latency, cmes) = get_hardware_performance_zigzag_with_mix_spatial_mapping(workload, accelerator, mapping)
|
|
61
57
|
(expected_energy, expected_latency) = ens_lats[workload]
|
|
62
58
|
assert energy == pytest.approx(expected_energy)
|
|
@@ -7,18 +7,14 @@ from zigzag.api import get_hardware_performance_zigzag_with_mix_spatial_mapping
|
|
|
7
7
|
# Test case for when only spatial_mapping_hint is provided.
|
|
8
8
|
|
|
9
9
|
workloads = (
|
|
10
|
-
"zigzag/inputs/
|
|
11
|
-
"zigzag/inputs/
|
|
12
|
-
"zigzag/inputs/examples/workload/resnet18.onnx",
|
|
13
|
-
"zigzag.inputs.examples.workload.resnet18",
|
|
10
|
+
"zigzag/inputs/workload/resnet18.onnx",
|
|
11
|
+
"zigzag/inputs/workload/resnet18.yaml",
|
|
14
12
|
)
|
|
15
13
|
|
|
16
14
|
# Expected energy and latency for each workload defined above
|
|
17
15
|
ens_lats = {
|
|
18
|
-
"zigzag/inputs/
|
|
19
|
-
"zigzag/inputs/
|
|
20
|
-
"zigzag/inputs/examples/workload/resnet18.onnx": (1724869681, 3257898),
|
|
21
|
-
"zigzag.inputs.examples.workload.resnet18": (2220861655, 3934616),
|
|
16
|
+
"zigzag/inputs/workload/resnet18.onnx": (1724869681, 3257898),
|
|
17
|
+
"zigzag/inputs/workload/resnet18.yaml": (2220861655, 3934616),
|
|
22
18
|
}
|
|
23
19
|
|
|
24
20
|
|
|
@@ -52,7 +48,7 @@ def accelerator():
|
|
|
52
48
|
|
|
53
49
|
|
|
54
50
|
@pytest.mark.parametrize("workload", workloads)
|
|
55
|
-
def test_api(workload, accelerator, mapping):
|
|
51
|
+
def test_api(workload: str, accelerator: str, mapping: str):
|
|
56
52
|
(energy, latency, cmes) = get_hardware_performance_zigzag_with_mix_spatial_mapping(workload, accelerator, mapping)
|
|
57
53
|
(expected_energy, expected_latency) = ens_lats[workload]
|
|
58
54
|
assert energy == pytest.approx(expected_energy)
|
{zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/tests/main/test_with_mix_spatial_mapping/test_tpu_like.py
RENAMED
|
@@ -7,18 +7,14 @@ from zigzag.api import get_hardware_performance_zigzag_with_mix_spatial_mapping
|
|
|
7
7
|
# Test case for when more non-existent dimensions are provided in spatial_mapping_hint.
|
|
8
8
|
|
|
9
9
|
workloads = (
|
|
10
|
-
"zigzag/inputs/
|
|
11
|
-
"zigzag/inputs/
|
|
12
|
-
"zigzag/inputs/examples/workload/resnet18.onnx",
|
|
13
|
-
"zigzag.inputs.examples.workload.resnet18",
|
|
10
|
+
"zigzag/inputs/workload/resnet18.onnx",
|
|
11
|
+
"zigzag/inputs/workload/resnet18.yaml",
|
|
14
12
|
)
|
|
15
13
|
|
|
16
14
|
# Expected energy and latency for each workload defined above
|
|
17
15
|
ens_lats = {
|
|
18
|
-
"zigzag/inputs/
|
|
19
|
-
"zigzag/inputs/
|
|
20
|
-
"zigzag/inputs/examples/workload/resnet18.onnx": (1648700710.272, 2946593),
|
|
21
|
-
"zigzag.inputs.examples.workload.resnet18": (1972279074.768, 3455539),
|
|
16
|
+
"zigzag/inputs/workload/resnet18.onnx": (1648700710.272, 2946593),
|
|
17
|
+
"zigzag/inputs/workload/resnet18.yaml": (1972279074.768, 3455539),
|
|
22
18
|
}
|
|
23
19
|
|
|
24
20
|
|
|
@@ -60,7 +56,7 @@ def accelerator():
|
|
|
60
56
|
|
|
61
57
|
|
|
62
58
|
@pytest.mark.parametrize("workload", workloads)
|
|
63
|
-
def test_api(workload, accelerator, mapping):
|
|
59
|
+
def test_api(workload: str, accelerator: str, mapping: str):
|
|
64
60
|
(energy, latency, cmes) = get_hardware_performance_zigzag_with_mix_spatial_mapping(workload, accelerator, mapping)
|
|
65
61
|
(expected_energy, expected_latency) = ens_lats[workload]
|
|
66
62
|
assert energy == pytest.approx(expected_energy)
|
{zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/tests/main/test_without_unused_memory/test_ascend_like.py
RENAMED
|
@@ -5,18 +5,14 @@ sys.path.append("../zigzag")
|
|
|
5
5
|
from zigzag.api import get_hardware_performance_zigzag_without_unused_memory
|
|
6
6
|
|
|
7
7
|
workloads = (
|
|
8
|
-
"zigzag/inputs/
|
|
9
|
-
"zigzag/inputs/
|
|
10
|
-
"zigzag/inputs/examples/workload/resnet18.onnx",
|
|
11
|
-
"zigzag.inputs.examples.workload.resnet18",
|
|
8
|
+
"zigzag/inputs/workload/resnet18.onnx",
|
|
9
|
+
"zigzag/inputs/workload/resnet18.yaml",
|
|
12
10
|
)
|
|
13
11
|
|
|
14
12
|
# Expected energy and latency for each workload defined above
|
|
15
13
|
ens_lats = {
|
|
16
|
-
"zigzag/inputs/
|
|
17
|
-
"zigzag/inputs/
|
|
18
|
-
"zigzag/inputs/examples/workload/resnet18.onnx": (1709089377.83, 3583047),
|
|
19
|
-
"zigzag.inputs.examples.workload.resnet18": (2243493483.15, 4657130),
|
|
14
|
+
"zigzag/inputs/workload/resnet18.onnx": (1709089377.83, 3583047),
|
|
15
|
+
"zigzag/inputs/workload/resnet18.yaml": (2243493483.15, 4657130),
|
|
20
16
|
}
|
|
21
17
|
|
|
22
18
|
|
|
@@ -31,7 +27,7 @@ def accelerator():
|
|
|
31
27
|
|
|
32
28
|
|
|
33
29
|
@pytest.mark.parametrize("workload", workloads)
|
|
34
|
-
def test_api(workload, accelerator, mapping):
|
|
30
|
+
def test_api(workload: str, accelerator: str, mapping: str):
|
|
35
31
|
(energy, latency, cmes) = get_hardware_performance_zigzag_without_unused_memory(workload, accelerator, mapping)
|
|
36
32
|
(expected_energy, expected_latency) = ens_lats[workload]
|
|
37
33
|
assert energy == pytest.approx(expected_energy)
|
{zigzag_dse-3.1.2 → zigzag_dse-3.2.0}/tests/main/test_without_unused_memory/test_edge_tpu_like.py
RENAMED
|
@@ -5,18 +5,14 @@ sys.path.append("../zigzag")
|
|
|
5
5
|
from zigzag.api import get_hardware_performance_zigzag_without_unused_memory
|
|
6
6
|
|
|
7
7
|
workloads = (
|
|
8
|
-
"zigzag/inputs/
|
|
9
|
-
"zigzag/inputs/
|
|
10
|
-
"zigzag/inputs/examples/workload/resnet18.onnx",
|
|
11
|
-
"zigzag.inputs.examples.workload.resnet18",
|
|
8
|
+
"zigzag/inputs/workload/resnet18.onnx",
|
|
9
|
+
"zigzag/inputs/workload/resnet18.yaml",
|
|
12
10
|
)
|
|
13
11
|
|
|
14
12
|
# Expected energy and latency for each workload defined above
|
|
15
13
|
ens_lats = {
|
|
16
|
-
"zigzag/inputs/
|
|
17
|
-
"zigzag/inputs/
|
|
18
|
-
"zigzag/inputs/examples/workload/resnet18.onnx": (1784539639.4349997, 3176546),
|
|
19
|
-
"zigzag.inputs.examples.workload.resnet18": (2115122870.395, 3884789),
|
|
14
|
+
"zigzag/inputs/workload/resnet18.onnx": (1784539639.4349997, 3176546),
|
|
15
|
+
"zigzag/inputs/workload/resnet18.yaml": (2115122870.395, 3884789),
|
|
20
16
|
}
|
|
21
17
|
|
|
22
18
|
|
|
@@ -31,7 +27,7 @@ def accelerator():
|
|
|
31
27
|
|
|
32
28
|
|
|
33
29
|
@pytest.mark.parametrize("workload", workloads)
|
|
34
|
-
def test_api(workload, accelerator, mapping):
|
|
30
|
+
def test_api(workload: str, accelerator: str, mapping: str):
|
|
35
31
|
(energy, latency, cmes) = get_hardware_performance_zigzag_without_unused_memory(workload, accelerator, mapping)
|
|
36
32
|
(expected_energy, expected_latency) = ens_lats[workload]
|
|
37
33
|
assert energy == pytest.approx(expected_energy)
|
|
@@ -5,18 +5,14 @@ sys.path.append("../zigzag")
|
|
|
5
5
|
from zigzag.api import get_hardware_performance_zigzag_without_unused_memory
|
|
6
6
|
|
|
7
7
|
workloads = (
|
|
8
|
-
"zigzag/inputs/
|
|
9
|
-
"zigzag/inputs/
|
|
10
|
-
"zigzag/inputs/examples/workload/resnet18.onnx",
|
|
11
|
-
"zigzag.inputs.examples.workload.resnet18",
|
|
8
|
+
"zigzag/inputs/workload/resnet18.onnx",
|
|
9
|
+
"zigzag/inputs/workload/resnet18.yaml",
|
|
12
10
|
)
|
|
13
11
|
|
|
14
12
|
# Expected energy and latency for each workload defined above
|
|
15
13
|
ens_lats = {
|
|
16
|
-
"zigzag/inputs/
|
|
17
|
-
"zigzag/inputs/
|
|
18
|
-
"zigzag/inputs/examples/workload/resnet18.onnx": (1730672410.3200004, 3262009),
|
|
19
|
-
"zigzag.inputs.examples.workload.resnet18": (2265438430.2299995, 4017227),
|
|
14
|
+
"zigzag/inputs/workload/resnet18.onnx": (1730672410.3200004, 3262009),
|
|
15
|
+
"zigzag/inputs/workload/resnet18.yaml": (2265438430.2299995, 4017227),
|
|
20
16
|
}
|
|
21
17
|
|
|
22
18
|
|
|
@@ -31,7 +27,7 @@ def accelerator():
|
|
|
31
27
|
|
|
32
28
|
|
|
33
29
|
@pytest.mark.parametrize("workload", workloads)
|
|
34
|
-
def test_api(workload, accelerator, mapping):
|
|
30
|
+
def test_api(workload: str, accelerator: str, mapping: str):
|
|
35
31
|
(energy, latency, cmes) = get_hardware_performance_zigzag_without_unused_memory(workload, accelerator, mapping)
|
|
36
32
|
(expected_energy, expected_latency) = ens_lats[workload]
|
|
37
33
|
assert energy == pytest.approx(expected_energy)
|