zigzag-dse 2.1.7__tar.gz → 2.2.1__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-2.1.7/zigzag_dse.egg-info → zigzag-dse-2.2.1}/PKG-INFO +10 -6
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/README.md +10 -6
- zigzag-dse-2.2.1/docs/source/conf.py +81 -0
- zigzag-dse-2.2.1/inputs/examples/hardware/Ascend_like_DF.py +135 -0
- zigzag-dse-2.2.1/inputs/examples/hardware/Edge_TPU_like_DF.py +119 -0
- zigzag-dse-2.2.1/inputs/examples/hardware/Meta_prototype_DF.py +121 -0
- zigzag-dse-2.2.1/inputs/examples/hardware/TPU_like.py +98 -0
- zigzag-dse-2.2.1/inputs/examples/hardware/TPU_like_DF.py +109 -0
- zigzag-dse-2.2.1/inputs/examples/hardware/Tesla_NPU_like_DF.py +136 -0
- zigzag-dse-2.2.1/inputs/examples/mapping/alexnet_on_eyeriss_like.py +32 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/pyproject.toml +2 -2
- zigzag-dse-2.2.1/zigzag/__init__.py +1 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/api.py +4 -0
- zigzag-dse-2.2.1/zigzag/classes/cacti/cacti-master/cacti_config_creator.py +382 -0
- zigzag-dse-2.2.1/zigzag/classes/cacti/cacti-master/cacti_top.py +109 -0
- zigzag-dse-2.2.1/zigzag/classes/cacti/cacti_parser.py +90 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/cost_model/cost_model.py +16 -12
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/hardware/architecture/memory_instance.py +24 -4
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/io/onnx/conv.py +1 -1
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/io/onnx/default.py +1 -1
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/io/onnx/gemm.py +1 -1
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/io/onnx/matmul.py +1 -1
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/mapping/combined_mapping.py +20 -5
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/stages/CostModelStage.py +6 -4
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/workload/dummy_node.py +2 -1
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/workload/layer_node.py +2 -1
- zigzag-dse-2.2.1/zigzag/inputs/examples/hardware/Ascend_like.py +137 -0
- zigzag-dse-2.2.1/zigzag/inputs/examples/hardware/Edge_TPU_like.py +105 -0
- zigzag-dse-2.2.1/zigzag/inputs/examples/hardware/Eyeriss_like.py +84 -0
- zigzag-dse-2.2.1/zigzag/inputs/examples/hardware/Meta_prototype.py +120 -0
- zigzag-dse-2.2.1/zigzag/inputs/examples/hardware/Tesla_NPU_like.py +123 -0
- zigzag-dse-2.2.1/zigzag/inputs/examples/mapping/default.py +7 -0
- zigzag-dse-2.2.1/zigzag/inputs/examples/mapping/test.py +8 -0
- zigzag-dse-2.2.1/zigzag/inputs/examples/workload/resnet18.py +332 -0
- zigzag-dse-2.2.1/zigzag/inputs/examples/workload/test.py +12 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1/zigzag_dse.egg-info}/PKG-INFO +10 -6
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag_dse.egg-info/SOURCES.txt +20 -0
- zigzag-dse-2.2.1/zigzag_dse.egg-info/top_level.txt +2 -0
- zigzag-dse-2.1.7/zigzag/__init__.py +0 -1
- zigzag-dse-2.1.7/zigzag_dse.egg-info/top_level.txt +0 -4
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/LICENSE +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/MANIFEST.in +0 -0
- {zigzag-dse-2.1.7/zigzag → zigzag-dse-2.2.1}/inputs/examples/hardware/Ascend_like.py +0 -0
- {zigzag-dse-2.1.7/zigzag → zigzag-dse-2.2.1}/inputs/examples/hardware/Edge_TPU_like.py +0 -0
- {zigzag-dse-2.1.7/zigzag → zigzag-dse-2.2.1}/inputs/examples/hardware/Eyeriss_like.py +0 -0
- {zigzag-dse-2.1.7/zigzag → zigzag-dse-2.2.1}/inputs/examples/hardware/Meta_prototype.py +0 -0
- {zigzag-dse-2.1.7/zigzag → zigzag-dse-2.2.1}/inputs/examples/hardware/Tesla_NPU_like.py +0 -0
- {zigzag-dse-2.1.7/zigzag → zigzag-dse-2.2.1}/inputs/examples/mapping/default.py +0 -0
- {zigzag-dse-2.1.7/zigzag/inputs/examples/workload → zigzag-dse-2.2.1/inputs/examples/workloads}/resnet18.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/setup.cfg +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/__main__.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/__init__.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/hardware/architecture/accelerator.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/hardware/architecture/adder_hierarchy.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/hardware/architecture/core.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/hardware/architecture/dimension.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/hardware/architecture/memory_hierarchy.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/hardware/architecture/memory_level.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/hardware/architecture/operand_spatial_sharing.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/hardware/architecture/operational_array.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/hardware/architecture/operational_unit.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/hardware/architecture/runtime_mode.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/io/accelerator/parser.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/io/onnx/model.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/io/onnx/parser.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/io/onnx/utils.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/mapping/__init__.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/mapping/loop.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/mapping/mapping_assist_funcs.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/mapping/memory/data_layout.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/mapping/spatial/spatial_mapping.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/mapping/temporal/temporal_loop.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/mapping/temporal/temporal_mapping.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/opt/spatial/generator.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/opt/temporal/loma/engine.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/opt/temporal/loma/loop.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/opt/temporal/loma/memory_allocator.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/opt/temporal/loma/multipermute.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/opt/temporal/salsa/engine.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/opt/temporal/salsa/state.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/stages/DumpStage.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/stages/GeneralParameterIteratorStage.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/stages/LomaStage.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/stages/MainInputParserStages.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/stages/ONNXModelParserStage.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/stages/PlotTemporalMappingsStage.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/stages/ReduceStages.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/stages/RunOptStages.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/stages/SalsaStage.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/stages/SaveStage.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/stages/SpatialMappingConversionStage.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/stages/SpatialMappingGeneratorStage.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/stages/Stage.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/stages/TemporalOrderingConversionStage.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/stages/WorkloadStage.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/stages/__init__.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/workload/dnn_workload.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/workload/onnx_workload.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/classes/workload/test_layer_node.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/inputs/examples/hardware/TPU_like.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/inputs/examples/mapping/alexnet_on_tpu_like.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/inputs/examples/mapping/assend_like.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/inputs/examples/mapping/edge_tpu_like.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/inputs/examples/mapping/meta_prototype_like.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/inputs/examples/mapping/tesla_npu_like.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/inputs/examples/mapping/tpu_like.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/inputs/examples/workload/alexnet.onnx +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/inputs/examples/workload/mobilenetv2.onnx +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/utils.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/visualization/graph/memory_hierarchy.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/visualization/graph/workload.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/visualization/results/plot_cme.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag/visualization/results/print_mapping.py +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag_dse.egg-info/dependency_links.txt +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag_dse.egg-info/entry_points.txt +0 -0
- {zigzag-dse-2.1.7 → zigzag-dse-2.2.1}/zigzag_dse.egg-info/requires.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: zigzag-dse
|
|
3
|
-
Version: 2.1
|
|
3
|
+
Version: 2.2.1
|
|
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: BSD 3-Clause License
|
|
@@ -55,6 +55,8 @@ Please take a look at the [Installation](https://zigzag-project.github.io/zigzag
|
|
|
55
55
|
|
|
56
56
|
Please take a look at the [Getting Started](https://zigzag-project.github.io/zigzag/getting-started.html) page on how to get started using ZigZag.
|
|
57
57
|
|
|
58
|
+
Also, a Jupyter Notebook based demo is prepared for new users [here](https://github.com/ZigZag-Project/zigzag-demo).
|
|
59
|
+
|
|
58
60
|
## Recent changes
|
|
59
61
|
|
|
60
62
|
In this novel version, we have:
|
|
@@ -77,17 +79,19 @@ L. Mei, P. Houshmand, V. Jain, S. Giraldo and M. Verhelst, "ZigZag: Enlarging Jo
|
|
|
77
79
|
L. Mei, H. Liu, T. Wu, H. E. Sumbul, M. Verhelst and E. Beigne, "A Uniform Latency Model for DNN Accelerators with Diverse Architectures and Dataflows," 2022 Design, Automation & Test in Europe Conference & Exhibition (DATE), Antwerp, Belgium, 2022, pp. 220-225, doi: 10.23919/DATE54114.2022.9774728. [paper](https://lirias.kuleuven.be/retrieve/661303), [slides](https://docs.google.com/presentation/d/1mPdzEvuhu4923L0qYfEXGqRH7jtnHDlm/edit?usp=sharing&ouid=117150865143314519834&rtpof=true&sd=true), [video](https://drive.google.com/file/d/1o1ZY_rPsR5d8ZNpxxO7be0Tc2KUQIfX_/view?usp=sharing)
|
|
78
80
|
|
|
79
81
|
#### The new temporal mapping search engine
|
|
80
|
-
A. Symons, L. Mei and M. Verhelst, "LOMA: Fast Auto-Scheduling on DNN Accelerators through Loop-Order-based Memory Allocation," 2021 IEEE 3rd International Conference on Artificial Intelligence Circuits and Systems (AICAS), Washington DC, DC, USA, 2021, pp. 1-4, doi: 10.1109/AICAS51828.2021.9458493. [paper](https://ieeexplore.ieee.org/document/9458493)
|
|
82
|
+
A. Symons, L. Mei and M. Verhelst, "LOMA: Fast Auto-Scheduling on DNN Accelerators through Loop-Order-based Memory Allocation," 2021 IEEE 3rd International Conference on Artificial Intelligence Circuits and Systems (AICAS), Washington DC, DC, USA, 2021, pp. 1-4, doi: 10.1109/AICAS51828.2021.9458493. [paper](https://ieeexplore.ieee.org/document/9458493), [slides](https://drive.google.com/file/d/1m_4YznH67mxngP3Mlmoj_c8ruRqrjdbq/view?usp=share_link), [video](https://drive.google.com/file/d/1pK3hoy3znto7JfXHj3V_sWv4FdrcTgzA/view?usp=share_link)
|
|
81
83
|
|
|
82
84
|
#### Apply ZigZag for different design space exploration case studies
|
|
83
|
-
P. Houshmand, S. Cosemans, L. Mei, I. Papistas, D. Bhattacharjee, P. Debacker, A. Mallik, D. Verkest, M. Verhelst, "Opportunities and Limitations of Emerging Analog in-Memory Compute DNN Architectures," 2020 IEEE International Electron Devices Meeting (IEDM), San Francisco, CA, USA, 2020, pp. 29.1.1-29.1.4, doi: 10.1109/IEDM13553.2020.9372006. [paper](https://ieeexplore.ieee.org/abstract/document/9372006)
|
|
85
|
+
P. Houshmand, S. Cosemans, L. Mei, I. Papistas, D. Bhattacharjee, P. Debacker, A. Mallik, D. Verkest, M. Verhelst, "Opportunities and Limitations of Emerging Analog in-Memory Compute DNN Architectures," 2020 IEEE International Electron Devices Meeting (IEDM), San Francisco, CA, USA, 2020, pp. 29.1.1-29.1.4, doi: 10.1109/IEDM13553.2020.9372006. [paper](https://ieeexplore.ieee.org/abstract/document/9372006), [slides](https://docs.google.com/presentation/d/e/2PACX-1vRTB-KJemyLhrBmiZ9c7fL8gpnIevJzB2feNHeAGfcKchkFR698Df2_Wh0CXu8Qrg/pub?start=false&loop=false&delayms=30000), [video](https://drive.google.com/file/d/1tfz9NJKDECWgkYCK_vtir8hf2-Dz5ISh/view?usp=sharing)
|
|
86
|
+
|
|
87
|
+
V. Jain, L. Mei and M. Verhelst, "Analyzing the Energy-Latency-Area-Accuracy Trade-off Across Contemporary Neural Networks," 2021 IEEE 3rd International Conference on Artificial Intelligence Circuits and Systems (AICAS), Washington DC, DC, USA, 2021, pp. 1-4, doi: 10.1109/AICAS51828.2021.9458553. [paper](https://ieeexplore.ieee.org/abstract/document/9458553), [slides](https://docs.google.com/presentation/d/1IIeNwIfunKE409SmlS3JEIAF-5GyhbCN/edit?usp=sharing&ouid=100287940751782809199&rtpof=true&sd=true), [video](https://drive.google.com/file/d/1SssJKLt89H1SCAeCOUX4ibsZ15ewLKPb/view?usp=sharing)
|
|
84
88
|
|
|
85
|
-
|
|
89
|
+
S. Colleman, T. Verelst, L. Mei, T. Tuytelaars and M. Verhelst, "Processor Architecture Optimization for Spatially Dynamic Neural Networks," 2021 IFIP/IEEE 29th International Conference on Very Large Scale Integration (VLSI-SoC), Singapore, Singapore, 2021, pp. 1-6, doi: 10.1109/VLSI-SoC53125.2021.9607013. [paper](https://ieeexplore.ieee.org/abstract/document/9607013), [slides](https://drive.google.com/file/d/1to0IHQP30CUbjh37LrT_g4Tfjo6VhVx7/view?usp=sharing), [video](https://drive.google.com/file/d/1tjp_0OBiXSFOOF_u3cw9Zr-u4fcJRy9_/view?usp=sharing)
|
|
86
90
|
|
|
87
|
-
S. Colleman,
|
|
91
|
+
S. Colleman, P. Zhu, W. Sun and M. Verhelst, "Optimizing Accelerator Configurability for Mobile Transformer Networks," 2022 IEEE 4th International Conference on Artificial Intelligence Circuits and Systems (AICAS), Incheon, Korea, Republic of, 2022, pp. 142-145, doi: 10.1109/AICAS54282.2022.9869945. [paper](https://ieeexplore.ieee.org/document/9869945), [slides](https://docs.google.com/presentation/d/1tp11akyAVGg3Y20Aupp2wlTRSgg9nKAQ/edit?usp=sharing&ouid=117150865143314519834&rtpof=true&sd=true), [video](https://drive.google.com/file/d/1tglc-BCGVclrWT-kNhWy02Vms5sjk1zt/view?usp=sharing)
|
|
88
92
|
|
|
89
93
|
#### Extend ZigZag to support cross-layer depth-first scheduling
|
|
90
|
-
L. Mei, K. Goetschalckx, A. Symons and M. Verhelst, " DeFiNES: Enabling Fast Exploration of the Depth-first Scheduling Space for DNN Accelerators through Analytical Modeling," 2023 IEEE International Symposium on High-Performance Computer Architecture (HPCA), 2023 [paper](https://arxiv.org/abs/2212.05344), [github](https://github.com/ZigZag-Project/DeFiNES)
|
|
94
|
+
L. Mei, K. Goetschalckx, A. Symons and M. Verhelst, " DeFiNES: Enabling Fast Exploration of the Depth-first Scheduling Space for DNN Accelerators through Analytical Modeling," 2023 IEEE International Symposium on High-Performance Computer Architecture (HPCA), 2023 [paper](https://arxiv.org/abs/2212.05344), [slides](https://drive.google.com/file/d/1u_PG9ZhjUZVrH2wnMLDe-PYJeO0RUGLd/view?usp=sharing), [github](https://github.com/ZigZag-Project/DeFiNES)
|
|
91
95
|
|
|
92
96
|
#### Extend ZigZag to support multi-core layer-fused scheduling
|
|
93
97
|
A. Symons, L. Mei, S. Colleman, P. Houshmand, S. Karl and M. Verhelst, “Towards Heterogeneous Multi-core Accelerators Exploiting Fine-grained Scheduling of Layer-Fused Deep Neural Networks”, <i>arXiv e-prints</i>, 2022. doi:10.48550/arXiv.2212.10612. [paper](https://arxiv.org/abs/2212.10612), [github](https://github.com/ZigZag-Project/stream)
|
|
@@ -11,6 +11,8 @@ Please take a look at the [Installation](https://zigzag-project.github.io/zigzag
|
|
|
11
11
|
|
|
12
12
|
Please take a look at the [Getting Started](https://zigzag-project.github.io/zigzag/getting-started.html) page on how to get started using ZigZag.
|
|
13
13
|
|
|
14
|
+
Also, a Jupyter Notebook based demo is prepared for new users [here](https://github.com/ZigZag-Project/zigzag-demo).
|
|
15
|
+
|
|
14
16
|
## Recent changes
|
|
15
17
|
|
|
16
18
|
In this novel version, we have:
|
|
@@ -33,17 +35,19 @@ L. Mei, P. Houshmand, V. Jain, S. Giraldo and M. Verhelst, "ZigZag: Enlarging Jo
|
|
|
33
35
|
L. Mei, H. Liu, T. Wu, H. E. Sumbul, M. Verhelst and E. Beigne, "A Uniform Latency Model for DNN Accelerators with Diverse Architectures and Dataflows," 2022 Design, Automation & Test in Europe Conference & Exhibition (DATE), Antwerp, Belgium, 2022, pp. 220-225, doi: 10.23919/DATE54114.2022.9774728. [paper](https://lirias.kuleuven.be/retrieve/661303), [slides](https://docs.google.com/presentation/d/1mPdzEvuhu4923L0qYfEXGqRH7jtnHDlm/edit?usp=sharing&ouid=117150865143314519834&rtpof=true&sd=true), [video](https://drive.google.com/file/d/1o1ZY_rPsR5d8ZNpxxO7be0Tc2KUQIfX_/view?usp=sharing)
|
|
34
36
|
|
|
35
37
|
#### The new temporal mapping search engine
|
|
36
|
-
A. Symons, L. Mei and M. Verhelst, "LOMA: Fast Auto-Scheduling on DNN Accelerators through Loop-Order-based Memory Allocation," 2021 IEEE 3rd International Conference on Artificial Intelligence Circuits and Systems (AICAS), Washington DC, DC, USA, 2021, pp. 1-4, doi: 10.1109/AICAS51828.2021.9458493. [paper](https://ieeexplore.ieee.org/document/9458493)
|
|
38
|
+
A. Symons, L. Mei and M. Verhelst, "LOMA: Fast Auto-Scheduling on DNN Accelerators through Loop-Order-based Memory Allocation," 2021 IEEE 3rd International Conference on Artificial Intelligence Circuits and Systems (AICAS), Washington DC, DC, USA, 2021, pp. 1-4, doi: 10.1109/AICAS51828.2021.9458493. [paper](https://ieeexplore.ieee.org/document/9458493), [slides](https://drive.google.com/file/d/1m_4YznH67mxngP3Mlmoj_c8ruRqrjdbq/view?usp=share_link), [video](https://drive.google.com/file/d/1pK3hoy3znto7JfXHj3V_sWv4FdrcTgzA/view?usp=share_link)
|
|
37
39
|
|
|
38
40
|
#### Apply ZigZag for different design space exploration case studies
|
|
39
|
-
P. Houshmand, S. Cosemans, L. Mei, I. Papistas, D. Bhattacharjee, P. Debacker, A. Mallik, D. Verkest, M. Verhelst, "Opportunities and Limitations of Emerging Analog in-Memory Compute DNN Architectures," 2020 IEEE International Electron Devices Meeting (IEDM), San Francisco, CA, USA, 2020, pp. 29.1.1-29.1.4, doi: 10.1109/IEDM13553.2020.9372006. [paper](https://ieeexplore.ieee.org/abstract/document/9372006)
|
|
41
|
+
P. Houshmand, S. Cosemans, L. Mei, I. Papistas, D. Bhattacharjee, P. Debacker, A. Mallik, D. Verkest, M. Verhelst, "Opportunities and Limitations of Emerging Analog in-Memory Compute DNN Architectures," 2020 IEEE International Electron Devices Meeting (IEDM), San Francisco, CA, USA, 2020, pp. 29.1.1-29.1.4, doi: 10.1109/IEDM13553.2020.9372006. [paper](https://ieeexplore.ieee.org/abstract/document/9372006), [slides](https://docs.google.com/presentation/d/e/2PACX-1vRTB-KJemyLhrBmiZ9c7fL8gpnIevJzB2feNHeAGfcKchkFR698Df2_Wh0CXu8Qrg/pub?start=false&loop=false&delayms=30000), [video](https://drive.google.com/file/d/1tfz9NJKDECWgkYCK_vtir8hf2-Dz5ISh/view?usp=sharing)
|
|
42
|
+
|
|
43
|
+
V. Jain, L. Mei and M. Verhelst, "Analyzing the Energy-Latency-Area-Accuracy Trade-off Across Contemporary Neural Networks," 2021 IEEE 3rd International Conference on Artificial Intelligence Circuits and Systems (AICAS), Washington DC, DC, USA, 2021, pp. 1-4, doi: 10.1109/AICAS51828.2021.9458553. [paper](https://ieeexplore.ieee.org/abstract/document/9458553), [slides](https://docs.google.com/presentation/d/1IIeNwIfunKE409SmlS3JEIAF-5GyhbCN/edit?usp=sharing&ouid=100287940751782809199&rtpof=true&sd=true), [video](https://drive.google.com/file/d/1SssJKLt89H1SCAeCOUX4ibsZ15ewLKPb/view?usp=sharing)
|
|
40
44
|
|
|
41
|
-
|
|
45
|
+
S. Colleman, T. Verelst, L. Mei, T. Tuytelaars and M. Verhelst, "Processor Architecture Optimization for Spatially Dynamic Neural Networks," 2021 IFIP/IEEE 29th International Conference on Very Large Scale Integration (VLSI-SoC), Singapore, Singapore, 2021, pp. 1-6, doi: 10.1109/VLSI-SoC53125.2021.9607013. [paper](https://ieeexplore.ieee.org/abstract/document/9607013), [slides](https://drive.google.com/file/d/1to0IHQP30CUbjh37LrT_g4Tfjo6VhVx7/view?usp=sharing), [video](https://drive.google.com/file/d/1tjp_0OBiXSFOOF_u3cw9Zr-u4fcJRy9_/view?usp=sharing)
|
|
42
46
|
|
|
43
|
-
S. Colleman,
|
|
47
|
+
S. Colleman, P. Zhu, W. Sun and M. Verhelst, "Optimizing Accelerator Configurability for Mobile Transformer Networks," 2022 IEEE 4th International Conference on Artificial Intelligence Circuits and Systems (AICAS), Incheon, Korea, Republic of, 2022, pp. 142-145, doi: 10.1109/AICAS54282.2022.9869945. [paper](https://ieeexplore.ieee.org/document/9869945), [slides](https://docs.google.com/presentation/d/1tp11akyAVGg3Y20Aupp2wlTRSgg9nKAQ/edit?usp=sharing&ouid=117150865143314519834&rtpof=true&sd=true), [video](https://drive.google.com/file/d/1tglc-BCGVclrWT-kNhWy02Vms5sjk1zt/view?usp=sharing)
|
|
44
48
|
|
|
45
49
|
#### Extend ZigZag to support cross-layer depth-first scheduling
|
|
46
|
-
L. Mei, K. Goetschalckx, A. Symons and M. Verhelst, " DeFiNES: Enabling Fast Exploration of the Depth-first Scheduling Space for DNN Accelerators through Analytical Modeling," 2023 IEEE International Symposium on High-Performance Computer Architecture (HPCA), 2023 [paper](https://arxiv.org/abs/2212.05344), [github](https://github.com/ZigZag-Project/DeFiNES)
|
|
50
|
+
L. Mei, K. Goetschalckx, A. Symons and M. Verhelst, " DeFiNES: Enabling Fast Exploration of the Depth-first Scheduling Space for DNN Accelerators through Analytical Modeling," 2023 IEEE International Symposium on High-Performance Computer Architecture (HPCA), 2023 [paper](https://arxiv.org/abs/2212.05344), [slides](https://drive.google.com/file/d/1u_PG9ZhjUZVrH2wnMLDe-PYJeO0RUGLd/view?usp=sharing), [github](https://github.com/ZigZag-Project/DeFiNES)
|
|
47
51
|
|
|
48
52
|
#### Extend ZigZag to support multi-core layer-fused scheduling
|
|
49
|
-
A. Symons, L. Mei, S. Colleman, P. Houshmand, S. Karl and M. Verhelst, “Towards Heterogeneous Multi-core Accelerators Exploiting Fine-grained Scheduling of Layer-Fused Deep Neural Networks”, <i>arXiv e-prints</i>, 2022. doi:10.48550/arXiv.2212.10612. [paper](https://arxiv.org/abs/2212.10612), [github](https://github.com/ZigZag-Project/stream)
|
|
53
|
+
A. Symons, L. Mei, S. Colleman, P. Houshmand, S. Karl and M. Verhelst, “Towards Heterogeneous Multi-core Accelerators Exploiting Fine-grained Scheduling of Layer-Fused Deep Neural Networks”, <i>arXiv e-prints</i>, 2022. doi:10.48550/arXiv.2212.10612. [paper](https://arxiv.org/abs/2212.10612), [github](https://github.com/ZigZag-Project/stream)
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Configuration file for the Sphinx documentation builder.
|
|
2
|
+
#
|
|
3
|
+
# This file only contains a selection of the most common options. For a full
|
|
4
|
+
# list see the documentation:
|
|
5
|
+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
|
6
|
+
|
|
7
|
+
# -- Path setup --------------------------------------------------------------
|
|
8
|
+
|
|
9
|
+
# If extensions (or modules to document with autodoc) are in another directory,
|
|
10
|
+
# add these directories to sys.path here. If the directory is relative to the
|
|
11
|
+
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
|
12
|
+
#
|
|
13
|
+
import os
|
|
14
|
+
import sys
|
|
15
|
+
sys.path.insert(0, os.path.abspath('.'))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# -- Project information -----------------------------------------------------
|
|
19
|
+
|
|
20
|
+
project = 'ZigZag'
|
|
21
|
+
copyright = '2022, Arne Symons'
|
|
22
|
+
author = 'Arne Symons'
|
|
23
|
+
|
|
24
|
+
# The full version, including alpha/beta/rc tags
|
|
25
|
+
release = '2.0.0'
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
# -- General configuration ---------------------------------------------------
|
|
29
|
+
|
|
30
|
+
# Add any Sphinx extension module names here, as strings. They can be
|
|
31
|
+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
|
32
|
+
# ones.
|
|
33
|
+
extensions = [
|
|
34
|
+
'sphinx.ext.autodoc'
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
# Add any paths that contain templates here, relative to this directory.
|
|
38
|
+
templates_path = ['_templates']
|
|
39
|
+
|
|
40
|
+
# List of patterns, relative to source directory, that match files and
|
|
41
|
+
# directories to ignore when looking for source files.
|
|
42
|
+
# This pattern also affects html_static_path and html_extra_path.
|
|
43
|
+
exclude_patterns = []
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
# -- Options for HTML output -------------------------------------------------
|
|
47
|
+
|
|
48
|
+
# The theme to use for HTML and HTML Help pages. See the documentation for
|
|
49
|
+
# a list of builtin themes.
|
|
50
|
+
#
|
|
51
|
+
html_theme = "sphinx_material"
|
|
52
|
+
|
|
53
|
+
# Logo
|
|
54
|
+
html_logo = "./zigzag_logo_white_32x32.svg"
|
|
55
|
+
|
|
56
|
+
# Favicon
|
|
57
|
+
html_favicon = "./zigzag_logo_white_32x32.svg"
|
|
58
|
+
|
|
59
|
+
# Material theme options
|
|
60
|
+
html_theme_options = {
|
|
61
|
+
'base_url': 'http://zigzag-project.github.io/zigzag/',
|
|
62
|
+
'repo_url': 'https://github.com/ZigZag-Project/zigzag',
|
|
63
|
+
'repo_name': 'ZigZag Framework',
|
|
64
|
+
'google_analytics_account': 'UA-XXXXX',
|
|
65
|
+
'html_minify': True,
|
|
66
|
+
'css_minify': True,
|
|
67
|
+
'nav_title': 'ZigZag Framework',
|
|
68
|
+
# 'logo_icon': '𝕫', # 'ℤ',
|
|
69
|
+
'globaltoc_depth': 2,
|
|
70
|
+
'color_primary': "blue-grey",
|
|
71
|
+
'color_accent': "grey"
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
html_sidebars = {
|
|
75
|
+
"**": ["logo-text.html", "globaltoc.html", "localtoc.html", "searchbox.html"]
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
# Add any paths that contain custom static files (such as style sheets) here,
|
|
79
|
+
# relative to this directory. They are copied after the builtin static files,
|
|
80
|
+
# so a file named "default.css" will overwrite the builtin "default.css".
|
|
81
|
+
html_static_path = ['_static']
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from zigzag.classes.hardware.architecture.memory_hierarchy import MemoryHierarchy
|
|
3
|
+
from zigzag.classes.hardware.architecture.memory_level import MemoryLevel
|
|
4
|
+
from zigzag.classes.hardware.architecture.operational_unit import Multiplier
|
|
5
|
+
from zigzag.classes.hardware.architecture.operational_array import MultiplierArray
|
|
6
|
+
from zigzag.classes.hardware.architecture.memory_instance import MemoryInstance
|
|
7
|
+
from zigzag.classes.hardware.architecture.accelerator import Accelerator
|
|
8
|
+
from zigzag.classes.hardware.architecture.core import Core
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def memory_hierarchy_dut(multiplier_array):
|
|
12
|
+
"""Memory hierarchy variables"""
|
|
13
|
+
''' size=#bit, bw=(read bw, write bw), cost=(read word energy, write work energy) '''
|
|
14
|
+
|
|
15
|
+
reg_W1 = MemoryInstance(name="rf_1B", size=8, r_bw=8, w_bw=8, r_cost=0.01, w_cost=0.01, area=0,
|
|
16
|
+
r_port=1, w_port=1, rw_port=0, latency=1)
|
|
17
|
+
|
|
18
|
+
reg_O1 = MemoryInstance(name="rf_2B", size=16, r_bw=16, w_bw=16, r_cost=0.02, w_cost=0.02, area=0,
|
|
19
|
+
r_port=2, w_port=2, rw_port=0, latency=1)
|
|
20
|
+
|
|
21
|
+
##################################### on-chip memory hierarchy building blocks #####################################
|
|
22
|
+
|
|
23
|
+
sram_64KB_with_8_8K_64_1r_1w_I = \
|
|
24
|
+
MemoryInstance(name="sram_64KB_I", size=8192 * 8, r_bw=64 * 8, w_bw=64 * 8, r_cost=3.32 * 8, w_cost=3.84 * 8, area=0,
|
|
25
|
+
r_port=1, w_port=1, rw_port=0, latency=1, min_r_granularity=64, min_w_granularity=64)
|
|
26
|
+
|
|
27
|
+
sram_64KB_with_8_8K_256_1r_1w_W = \
|
|
28
|
+
MemoryInstance(name="sram_64KB_W", size=8192 * 8, r_bw=256 * 8, w_bw=256 * 8, r_cost=6.27 * 8, w_cost=13.5 * 8, area=0,
|
|
29
|
+
r_port=1, w_port=1, rw_port=0, latency=1, min_r_granularity=64, min_w_granularity=64)
|
|
30
|
+
|
|
31
|
+
sram_256KB_with_8_32KB_256_1r_1w_O = \
|
|
32
|
+
MemoryInstance(name="sram_256KB_O", size=32768 * 8 * 8, r_bw=256 * 8, w_bw=256 * 8, r_cost=15.4 * 8, w_cost=26.6 * 8, area=0,
|
|
33
|
+
r_port=1, w_port=1, rw_port=0, latency=1, min_r_granularity=64, min_w_granularity=64)
|
|
34
|
+
|
|
35
|
+
sram_256KB_with_8_32KB_256_1r_1w_O_staging = \
|
|
36
|
+
MemoryInstance(name="sram_256KB_O_staging", size=32768 * 8 * 8 + 1, r_bw=256 * 8, w_bw=256 * 8, r_cost=15.4 * 8, w_cost=26.6 * 8, area=0,
|
|
37
|
+
r_port=1, w_port=1, rw_port=0, latency=1, min_r_granularity=64, min_w_granularity=64)
|
|
38
|
+
|
|
39
|
+
sram_1M_with_8_128K_bank_128_1r_1w_A = \
|
|
40
|
+
MemoryInstance(name="sram_1MB_A", size=131072 * 8 * 8, r_bw=512 * 8, w_bw=512 * 8, r_cost=58.2 * 8, w_cost=103.2 * 8, area=0,
|
|
41
|
+
r_port=1, w_port=1, rw_port=0, latency=1, min_r_granularity=64, min_w_granularity=64)
|
|
42
|
+
|
|
43
|
+
sram_1M_with_8_128K_bank_128_1r_1w_W = \
|
|
44
|
+
MemoryInstance(name="sram_1MB_W", size=131072 * 8 * 8, r_bw=512 * 8, w_bw=512 * 8, r_cost=58.2 * 8, w_cost=103.2 * 8, area=0,
|
|
45
|
+
r_port=1, w_port=1, rw_port=0, latency=1, min_r_granularity=64, min_w_granularity=64)
|
|
46
|
+
|
|
47
|
+
#######################################################################################################################
|
|
48
|
+
|
|
49
|
+
dram = MemoryInstance(name="dram", size=10000000000, r_bw=64, w_bw=64, r_cost=700, w_cost=750, area=0,
|
|
50
|
+
r_port=0, w_port=0, rw_port=1, latency=1)
|
|
51
|
+
|
|
52
|
+
memory_hierarchy_graph = MemoryHierarchy(operational_array=multiplier_array)
|
|
53
|
+
|
|
54
|
+
'''
|
|
55
|
+
fh: from high = wr_in_by_high
|
|
56
|
+
fl: from low = wr_in_by_low
|
|
57
|
+
th: to high = rd_out_to_high
|
|
58
|
+
tl: to low = rd_out_to_low
|
|
59
|
+
'''
|
|
60
|
+
# we don't have unrolled I-Reg to better support G unrolling
|
|
61
|
+
# memory_hierarchy_graph.add_memory(memory_instance=reg_IW1, operands=('I1',),
|
|
62
|
+
# port_alloc=({'fh': 'w_port_1', 'tl': 'r_port_1', 'fl': None, 'th': None},),
|
|
63
|
+
# served_dimensions={(0, 0, 0, 0)})
|
|
64
|
+
memory_hierarchy_graph.add_memory(memory_instance=reg_W1, operands=('I2',),
|
|
65
|
+
port_alloc=({'fh': 'w_port_1', 'tl': 'r_port_1', 'fl': None, 'th': None},),
|
|
66
|
+
served_dimensions={(0, 0, 1, 0), (0, 0, 0, 1)})
|
|
67
|
+
memory_hierarchy_graph.add_memory(memory_instance=reg_O1, operands=('O',),
|
|
68
|
+
port_alloc=({'fh': 'w_port_1', 'tl': 'r_port_1', 'fl': 'w_port_2', 'th': 'r_port_2'},),
|
|
69
|
+
served_dimensions={(0, 1, 0, 0)})
|
|
70
|
+
|
|
71
|
+
##################################### on-chip highest memory hierarchy initialization #####################################
|
|
72
|
+
|
|
73
|
+
memory_hierarchy_graph.add_memory(memory_instance=sram_64KB_with_8_8K_256_1r_1w_W, operands=('I2',),
|
|
74
|
+
port_alloc=({'fh': 'w_port_1', 'tl': 'r_port_1', 'fl': None, 'th': None},),
|
|
75
|
+
served_dimensions='all')
|
|
76
|
+
|
|
77
|
+
memory_hierarchy_graph.add_memory(memory_instance=sram_64KB_with_8_8K_64_1r_1w_I, operands=('I1', 'O'),
|
|
78
|
+
port_alloc=({'fh': 'w_port_1', 'tl': 'r_port_1', 'fl': None, 'th': None},
|
|
79
|
+
{'fh': 'w_port_1', 'tl': 'r_port_1', 'fl': 'w_port_1', 'th': 'r_port_1'},),
|
|
80
|
+
served_dimensions='all')
|
|
81
|
+
|
|
82
|
+
memory_hierarchy_graph.add_memory(memory_instance=sram_256KB_with_8_32KB_256_1r_1w_O, operands=('I1', 'O'),
|
|
83
|
+
port_alloc=({'fh': 'w_port_1', 'tl': 'r_port_1', 'fl': None, 'th': None},
|
|
84
|
+
{'fh': 'w_port_1', 'tl': 'r_port_1', 'fl': 'w_port_1', 'th': 'r_port_1'},),
|
|
85
|
+
served_dimensions='all')
|
|
86
|
+
|
|
87
|
+
memory_hierarchy_graph.add_memory(memory_instance=sram_1M_with_8_128K_bank_128_1r_1w_W, operands=('I2',),
|
|
88
|
+
port_alloc=({'fh': 'w_port_1', 'tl': 'r_port_1', 'fl': None, 'th': None},),
|
|
89
|
+
served_dimensions='all')
|
|
90
|
+
memory_hierarchy_graph.add_memory(memory_instance=sram_1M_with_8_128K_bank_128_1r_1w_A, operands=('I1', 'O'),
|
|
91
|
+
port_alloc=({'fh': 'w_port_1', 'tl': 'r_port_1', 'fl': None, 'th': None},
|
|
92
|
+
{'fh': 'w_port_1', 'tl': 'r_port_1', 'fl': 'w_port_1', 'th': 'r_port_1'},),
|
|
93
|
+
served_dimensions='all')
|
|
94
|
+
|
|
95
|
+
####################################################################################################################
|
|
96
|
+
|
|
97
|
+
memory_hierarchy_graph.add_memory(memory_instance=dram, operands=('I1', 'I2', 'O'),
|
|
98
|
+
port_alloc=({'fh': 'rw_port_1', 'tl': 'rw_port_1', 'fl': None, 'th': None},
|
|
99
|
+
{'fh': 'rw_port_1', 'tl': 'rw_port_1', 'fl': None, 'th': None},
|
|
100
|
+
{'fh': 'rw_port_1', 'tl': 'rw_port_1', 'fl': 'rw_port_1', 'th': 'rw_port_1'},),
|
|
101
|
+
served_dimensions='all')
|
|
102
|
+
|
|
103
|
+
from zigzag.visualization.graph.memory_hierarchy import visualize_memory_hierarchy_graph
|
|
104
|
+
# visualize_memory_hierarchy_graph(memory_hierarchy_graph)
|
|
105
|
+
return memory_hierarchy_graph
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
def multiplier_array_dut():
|
|
109
|
+
""" Multiplier array variables """
|
|
110
|
+
multiplier_input_precision = [8, 8]
|
|
111
|
+
multiplier_energy = 0.04
|
|
112
|
+
multiplier_area = 1
|
|
113
|
+
dimensions = {'D1': 16, 'D2': 16, 'D3': 2, 'D4': 2} # {'D1': ('K', 16), 'D2': ('C', 16), 'D3': ('OX', 2), 'D4': ('OY', 2),}
|
|
114
|
+
|
|
115
|
+
multiplier = Multiplier(multiplier_input_precision, multiplier_energy, multiplier_area)
|
|
116
|
+
multiplier_array = MultiplierArray(multiplier, dimensions)
|
|
117
|
+
|
|
118
|
+
return multiplier_array
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
def cores():
|
|
122
|
+
multiplier_array1 = multiplier_array_dut()
|
|
123
|
+
memory_hierarchy1 = memory_hierarchy_dut(multiplier_array1)
|
|
124
|
+
|
|
125
|
+
core1 = Core(1, multiplier_array1, memory_hierarchy1)
|
|
126
|
+
|
|
127
|
+
return {core1}
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
cores = cores()
|
|
131
|
+
global_buffer = None
|
|
132
|
+
acc_name = os.path.basename(__file__)[:-3]
|
|
133
|
+
accelerator = Accelerator(acc_name, cores, global_buffer)
|
|
134
|
+
|
|
135
|
+
a = 1
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from zigzag.classes.hardware.architecture.memory_hierarchy import MemoryHierarchy
|
|
3
|
+
from zigzag.classes.hardware.architecture.memory_level import MemoryLevel
|
|
4
|
+
from zigzag.classes.hardware.architecture.operational_unit import Multiplier
|
|
5
|
+
from zigzag.classes.hardware.architecture.operational_array import MultiplierArray
|
|
6
|
+
from zigzag.classes.hardware.architecture.memory_instance import MemoryInstance
|
|
7
|
+
from zigzag.classes.hardware.architecture.accelerator import Accelerator
|
|
8
|
+
from zigzag.classes.hardware.architecture.core import Core
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def memory_hierarchy_dut(multiplier_array):
|
|
12
|
+
"""Memory hierarchy variables"""
|
|
13
|
+
''' size=#bit, bw=(read bw, write bw), cost=(read word energy, write work energy) '''
|
|
14
|
+
|
|
15
|
+
reg_IW1 = MemoryInstance(name="rf_1B", size=8, r_bw=8, w_bw=8, r_cost=0.01, w_cost=0.01, area=0,
|
|
16
|
+
r_port=1, w_port=1, rw_port=0, latency=1)
|
|
17
|
+
|
|
18
|
+
reg_O1 = MemoryInstance(name="rf_2B", size=16, r_bw=16, w_bw=16, r_cost=0.02, w_cost=0.02, area=0,
|
|
19
|
+
r_port=2, w_port=2, rw_port=0, latency=1)
|
|
20
|
+
|
|
21
|
+
##################################### on-chip memory hierarchy building blocks #####################################
|
|
22
|
+
|
|
23
|
+
sram_16K_with_16_1K_bank_128_1r_1w = \
|
|
24
|
+
MemoryInstance(name="sram_16KB_A", size=1024 * 16 * 8, r_bw=128 * 16, w_bw=128 * 16, r_cost=1.7 * 16, w_cost=2.52 * 16, area=0,
|
|
25
|
+
r_port=1, w_port=1, rw_port=0, latency=1, min_r_granularity=64, min_w_granularity=64)
|
|
26
|
+
|
|
27
|
+
sram_16KB_512_1r_1w = \
|
|
28
|
+
MemoryInstance(name="sram_16KB_W", size=16384 * 8, r_bw=512, w_bw=512, r_cost=19.4, w_cost=33.9, area=0,
|
|
29
|
+
r_port=1, w_port=1, rw_port=0, latency=1, min_r_granularity=64, min_w_granularity=64)
|
|
30
|
+
|
|
31
|
+
sram_1M_with_8_128K_bank_128_1r_1w_A = \
|
|
32
|
+
MemoryInstance(name="sram_1MB_A", size=131072 * 8 * 8, r_bw=128 * 8, w_bw=128 * 8, r_cost=26.01 * 8, w_cost=23.65 * 8, area=0,
|
|
33
|
+
r_port=1, w_port=1, rw_port=0, latency=1, min_r_granularity=64, min_w_granularity=64)
|
|
34
|
+
|
|
35
|
+
sram_1M_with_8_128K_bank_128_1r_1w_W = \
|
|
36
|
+
MemoryInstance(name="sram_1MB_W", size=131072 * 8 * 8, r_bw=128 * 8, w_bw=128 * 8, r_cost=26.01 * 8, w_cost=23.65 * 8, area=0,
|
|
37
|
+
r_port=1, w_port=1, rw_port=0, latency=1, min_r_granularity=64, min_w_granularity=64)
|
|
38
|
+
|
|
39
|
+
#######################################################################################################################
|
|
40
|
+
|
|
41
|
+
dram = MemoryInstance(name="dram", size=10000000000, r_bw=64, w_bw=64, r_cost=700, w_cost=750, area=0,
|
|
42
|
+
r_port=0, w_port=0, rw_port=1, latency=1)
|
|
43
|
+
|
|
44
|
+
memory_hierarchy_graph = MemoryHierarchy(operational_array=multiplier_array)
|
|
45
|
+
|
|
46
|
+
'''
|
|
47
|
+
fh: from high = wr_in_by_high
|
|
48
|
+
fl: from low = wr_in_by_low
|
|
49
|
+
th: to high = rd_out_to_high
|
|
50
|
+
tl: to low = rd_out_to_low
|
|
51
|
+
'''
|
|
52
|
+
# we don't have unrolled I-Reg to better support G unrolling
|
|
53
|
+
# memory_hierarchy_graph.add_memory(memory_instance=reg_IW1, operands=('I1',),
|
|
54
|
+
# port_alloc=({'fh': 'w_port_1', 'tl': 'r_port_1', 'fl': None, 'th': None},),
|
|
55
|
+
# served_dimensions={(0, 0, 0, 0)})
|
|
56
|
+
memory_hierarchy_graph.add_memory(memory_instance=reg_IW1, operands=('I2',),
|
|
57
|
+
port_alloc=({'fh': 'w_port_1', 'tl': 'r_port_1', 'fl': None, 'th': None},),
|
|
58
|
+
served_dimensions={(0, 0, 1, 0), (0, 0, 0, 1)})
|
|
59
|
+
memory_hierarchy_graph.add_memory(memory_instance=reg_O1, operands=('O',),
|
|
60
|
+
port_alloc=({'fh': 'w_port_1', 'tl': 'r_port_1', 'fl': 'w_port_2', 'th': 'r_port_2'},),
|
|
61
|
+
served_dimensions={(0, 1, 0, 0)})
|
|
62
|
+
|
|
63
|
+
##################################### on-chip highest memory hierarchy initialization #####################################
|
|
64
|
+
|
|
65
|
+
memory_hierarchy_graph.add_memory(memory_instance=sram_16KB_512_1r_1w, operands=('I2',),
|
|
66
|
+
port_alloc=({'fh': 'w_port_1', 'tl': 'r_port_1', 'fl': None, 'th': None},),
|
|
67
|
+
served_dimensions='all')
|
|
68
|
+
memory_hierarchy_graph.add_memory(memory_instance=sram_1M_with_8_128K_bank_128_1r_1w_W, operands=('I2',),
|
|
69
|
+
port_alloc=({'fh': 'w_port_1', 'tl': 'r_port_1', 'fl': None, 'th': None},),
|
|
70
|
+
served_dimensions='all')
|
|
71
|
+
memory_hierarchy_graph.add_memory(memory_instance=sram_16K_with_16_1K_bank_128_1r_1w, operands=('I1', 'O'),
|
|
72
|
+
port_alloc=({'fh': 'w_port_1', 'tl': 'r_port_1', 'fl': None, 'th': None},
|
|
73
|
+
{'fh': 'w_port_1', 'tl': 'r_port_1', 'fl': 'w_port_1', 'th': 'r_port_1'},),
|
|
74
|
+
served_dimensions='all')
|
|
75
|
+
memory_hierarchy_graph.add_memory(memory_instance=sram_1M_with_8_128K_bank_128_1r_1w_A, operands=('I1', 'O'),
|
|
76
|
+
port_alloc=({'fh': 'w_port_1', 'tl': 'r_port_1', 'fl': None, 'th': None},
|
|
77
|
+
{'fh': 'w_port_1', 'tl': 'r_port_1', 'fl': 'w_port_1', 'th': 'r_port_1'},),
|
|
78
|
+
served_dimensions='all')
|
|
79
|
+
####################################################################################################################
|
|
80
|
+
|
|
81
|
+
memory_hierarchy_graph.add_memory(memory_instance=dram, operands=('I1', 'I2', 'O'),
|
|
82
|
+
port_alloc=({'fh': 'rw_port_1', 'tl': 'rw_port_1', 'fl': None, 'th': None},
|
|
83
|
+
{'fh': 'rw_port_1', 'tl': 'rw_port_1', 'fl': None, 'th': None},
|
|
84
|
+
{'fh': 'rw_port_1', 'tl': 'rw_port_1', 'fl': 'rw_port_1', 'th': 'rw_port_1'},),
|
|
85
|
+
served_dimensions='all')
|
|
86
|
+
|
|
87
|
+
from zigzag.visualization.graph.memory_hierarchy import visualize_memory_hierarchy_graph
|
|
88
|
+
# visualize_memory_hierarchy_graph(memory_hierarchy_graph)
|
|
89
|
+
return memory_hierarchy_graph
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def multiplier_array_dut():
|
|
93
|
+
""" Multiplier array variables """
|
|
94
|
+
multiplier_input_precision = [8, 8]
|
|
95
|
+
multiplier_energy = 0.04
|
|
96
|
+
multiplier_area = 1
|
|
97
|
+
dimensions = {'D1': 8, 'D2': 8, 'D3': 4, 'D4': 4} # {'D1': ('K', 8), 'D2': ('C', 8), 'D3': ('OX', 4), 'D4': ('OY', 4),}
|
|
98
|
+
|
|
99
|
+
multiplier = Multiplier(multiplier_input_precision, multiplier_energy, multiplier_area)
|
|
100
|
+
multiplier_array = MultiplierArray(multiplier, dimensions)
|
|
101
|
+
|
|
102
|
+
return multiplier_array
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
def cores():
|
|
106
|
+
multiplier_array1 = multiplier_array_dut()
|
|
107
|
+
memory_hierarchy1 = memory_hierarchy_dut(multiplier_array1)
|
|
108
|
+
|
|
109
|
+
core1 = Core(1, multiplier_array1, memory_hierarchy1)
|
|
110
|
+
|
|
111
|
+
return {core1}
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
cores = cores()
|
|
115
|
+
global_buffer = None
|
|
116
|
+
acc_name = os.path.basename(__file__)[:-3]
|
|
117
|
+
accelerator = Accelerator(acc_name, cores, global_buffer)
|
|
118
|
+
|
|
119
|
+
a = 1
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from zigzag.classes.hardware.architecture.memory_hierarchy import MemoryHierarchy
|
|
3
|
+
from zigzag.classes.hardware.architecture.memory_level import MemoryLevel
|
|
4
|
+
from zigzag.classes.hardware.architecture.operational_unit import Multiplier
|
|
5
|
+
from zigzag.classes.hardware.architecture.operational_array import MultiplierArray
|
|
6
|
+
from zigzag.classes.hardware.architecture.memory_instance import MemoryInstance
|
|
7
|
+
from zigzag.classes.hardware.architecture.accelerator import Accelerator
|
|
8
|
+
from zigzag.classes.hardware.architecture.core import Core
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def memory_hierarchy_dut(multiplier_array):
|
|
12
|
+
"""Memory hierarchy variables"""
|
|
13
|
+
''' size=#bit, bw=(read bw, write bw), cost=(read word energy, write work energy) '''
|
|
14
|
+
|
|
15
|
+
reg_IW1 = MemoryInstance(name="rf_1B", size=8, r_bw=8, w_bw=8, r_cost=0.01, w_cost=0.01, area=0,
|
|
16
|
+
r_port=1, w_port=1, rw_port=0, latency=1)
|
|
17
|
+
|
|
18
|
+
reg_O1 = MemoryInstance(name="rf_2B", size=16, r_bw=16, w_bw=16, r_cost=0.02, w_cost=0.02, area=0,
|
|
19
|
+
r_port=2, w_port=2, rw_port=0, latency=1)
|
|
20
|
+
|
|
21
|
+
##################################### on-chip memory hierarchy building blocks #####################################
|
|
22
|
+
|
|
23
|
+
sram_64KB_with_8_8K_64_1r_1w = \
|
|
24
|
+
MemoryInstance(name="sram_64KB", size=8192 * 8 * 8, r_bw=64 * 8, w_bw=64 * 8, r_cost=3.32 * 8, w_cost=3.85 * 8, area=0,
|
|
25
|
+
r_port=1, w_port=1, rw_port=0, latency=1, min_r_granularity=64, min_w_granularity=64)
|
|
26
|
+
|
|
27
|
+
sram_32KB_with_4_8K_128_1r_1w = \
|
|
28
|
+
MemoryInstance(name="sram_32KB", size=8192 * 4 * 8, r_bw=128 * 4, w_bw=128 * 4, r_cost=4.3 * 4, w_cost=7.1 * 4, area=0,
|
|
29
|
+
r_port=1, w_port=1, rw_port=0, latency=1, min_r_granularity=64, min_w_granularity=64)
|
|
30
|
+
|
|
31
|
+
sram_1M_with_8_128K_bank_128_1r_1w_A = \
|
|
32
|
+
MemoryInstance(name="sram_1MB_A", size=131072 * 8 * 8, r_bw=128 * 8, w_bw=128 * 8, r_cost=26.01 * 8, w_cost=23.65 * 8, area=0,
|
|
33
|
+
r_port=1, w_port=1, rw_port=0, latency=1, min_r_granularity=64, min_w_granularity=64)
|
|
34
|
+
|
|
35
|
+
sram_1M_with_8_128K_bank_128_1r_1w_W = \
|
|
36
|
+
MemoryInstance(name="sram_1MB_W", size=131072 * 8 * 8, r_bw=128 * 8, w_bw=128 * 8, r_cost=26.01 * 8, w_cost=23.65 * 8, area=0,
|
|
37
|
+
r_port=1, w_port=1, rw_port=0, latency=1, min_r_granularity=64, min_w_granularity=64)
|
|
38
|
+
|
|
39
|
+
#######################################################################################################################
|
|
40
|
+
|
|
41
|
+
dram = MemoryInstance(name="dram", size=10000000000, r_bw=64, w_bw=64, r_cost=700, w_cost=750, area=0,
|
|
42
|
+
r_port=0, w_port=0, rw_port=1, latency=1)
|
|
43
|
+
|
|
44
|
+
memory_hierarchy_graph = MemoryHierarchy(operational_array=multiplier_array)
|
|
45
|
+
|
|
46
|
+
'''
|
|
47
|
+
fh: from high = wr_in_by_high
|
|
48
|
+
fl: from low = wr_in_by_low
|
|
49
|
+
th: to high = rd_out_to_high
|
|
50
|
+
tl: to low = rd_out_to_low
|
|
51
|
+
'''
|
|
52
|
+
# we don't have unrolled I-Reg to better support G unrolling
|
|
53
|
+
# memory_hierarchy_graph.add_memory(memory_instance=reg_IW1, operands=('I1',),
|
|
54
|
+
# port_alloc=({'fh': 'w_port_1', 'tl': 'r_port_1', 'fl': None, 'th': None},),
|
|
55
|
+
# served_dimensions={(0, 0, 0, 0)})
|
|
56
|
+
memory_hierarchy_graph.add_memory(memory_instance=reg_IW1, operands=('I2',),
|
|
57
|
+
port_alloc=({'fh': 'w_port_1', 'tl': 'r_port_1', 'fl': None, 'th': None},),
|
|
58
|
+
served_dimensions={(0, 0, 1, 0), (0, 0, 0, 1)})
|
|
59
|
+
memory_hierarchy_graph.add_memory(memory_instance=reg_O1, operands=('O',),
|
|
60
|
+
port_alloc=({'fh': 'w_port_1', 'tl': 'r_port_1', 'fl': 'w_port_2', 'th': 'r_port_2'},),
|
|
61
|
+
served_dimensions={(0, 1, 0, 0)})
|
|
62
|
+
|
|
63
|
+
##################################### on-chip highest memory hierarchy initialization #####################################
|
|
64
|
+
|
|
65
|
+
memory_hierarchy_graph.add_memory(memory_instance=sram_32KB_with_4_8K_128_1r_1w, operands=('I2',),
|
|
66
|
+
port_alloc=({'fh': 'w_port_1', 'tl': 'r_port_1', 'fl': None, 'th': None},),
|
|
67
|
+
served_dimensions='all')
|
|
68
|
+
memory_hierarchy_graph.add_memory(memory_instance=sram_1M_with_8_128K_bank_128_1r_1w_W, operands=('I2',),
|
|
69
|
+
port_alloc=({'fh': 'w_port_1', 'tl': 'r_port_1', 'fl': None, 'th': None},),
|
|
70
|
+
served_dimensions='all')
|
|
71
|
+
|
|
72
|
+
memory_hierarchy_graph.add_memory(memory_instance=sram_64KB_with_8_8K_64_1r_1w, operands=('I1', 'O'),
|
|
73
|
+
port_alloc=({'fh': 'w_port_1', 'tl': 'r_port_1', 'fl': None, 'th': None},
|
|
74
|
+
{'fh': 'w_port_1', 'tl': 'r_port_1', 'fl': 'w_port_1', 'th': 'r_port_1'},),
|
|
75
|
+
served_dimensions='all')
|
|
76
|
+
memory_hierarchy_graph.add_memory(memory_instance=sram_1M_with_8_128K_bank_128_1r_1w_A, operands=('I1', 'O'),
|
|
77
|
+
port_alloc=({'fh': 'w_port_1', 'tl': 'r_port_1', 'fl': None, 'th': None},
|
|
78
|
+
{'fh': 'w_port_1', 'tl': 'r_port_1', 'fl': 'w_port_1', 'th': 'r_port_1'},),
|
|
79
|
+
served_dimensions='all')
|
|
80
|
+
|
|
81
|
+
####################################################################################################################
|
|
82
|
+
|
|
83
|
+
memory_hierarchy_graph.add_memory(memory_instance=dram, operands=('I1', 'I2', 'O'),
|
|
84
|
+
port_alloc=({'fh': 'rw_port_1', 'tl': 'rw_port_1', 'fl': None, 'th': None},
|
|
85
|
+
{'fh': 'rw_port_1', 'tl': 'rw_port_1', 'fl': None, 'th': None},
|
|
86
|
+
{'fh': 'rw_port_1', 'tl': 'rw_port_1', 'fl': 'rw_port_1', 'th': 'rw_port_1'},),
|
|
87
|
+
served_dimensions='all')
|
|
88
|
+
|
|
89
|
+
from zigzag.visualization.graph.memory_hierarchy import visualize_memory_hierarchy_graph
|
|
90
|
+
# visualize_memory_hierarchy_graph(memory_hierarchy_graph)
|
|
91
|
+
return memory_hierarchy_graph
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
def multiplier_array_dut():
|
|
95
|
+
""" Multiplier array variables """
|
|
96
|
+
multiplier_input_precision = [8, 8]
|
|
97
|
+
multiplier_energy = 0.04
|
|
98
|
+
multiplier_area = 1
|
|
99
|
+
dimensions = {'D1': 32, 'D2': 2, 'D3': 4, 'D4': 4} # {'D1': ('K', 32), 'D2': ('C', 2), 'D3': ('OX', 4), 'D4': ('OY', 4),}
|
|
100
|
+
|
|
101
|
+
multiplier = Multiplier(multiplier_input_precision, multiplier_energy, multiplier_area)
|
|
102
|
+
multiplier_array = MultiplierArray(multiplier, dimensions)
|
|
103
|
+
|
|
104
|
+
return multiplier_array
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
def cores():
|
|
108
|
+
multiplier_array1 = multiplier_array_dut()
|
|
109
|
+
memory_hierarchy1 = memory_hierarchy_dut(multiplier_array1)
|
|
110
|
+
|
|
111
|
+
core1 = Core(1, multiplier_array1, memory_hierarchy1)
|
|
112
|
+
|
|
113
|
+
return {core1}
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
cores = cores()
|
|
117
|
+
global_buffer = None
|
|
118
|
+
acc_name = os.path.basename(__file__)[:-3]
|
|
119
|
+
accelerator = Accelerator(acc_name, cores, global_buffer)
|
|
120
|
+
|
|
121
|
+
a = 1
|