zigzag-dse 3.2.0__tar.gz → 3.3.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.
Files changed (271) hide show
  1. zigzag_dse-3.3.0/MANIFEST.in +2 -0
  2. {zigzag_dse-3.2.0/zigzag_dse.egg-info → zigzag_dse-3.3.0}/PKG-INFO +2 -1
  3. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/pyproject.toml +7 -2
  4. zigzag_dse-3.3.0/tests/main/test_imc/test_aimc.py +45 -0
  5. zigzag_dse-3.3.0/tests/main/test_imc/test_dimc.py +45 -0
  6. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/tests/main/test_origin/test_ascend_like.py +4 -4
  7. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/tests/main/test_origin/test_edge_tpu_like.py +5 -5
  8. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/tests/main/test_origin/test_meta_prototype_like.py +5 -5
  9. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/tests/main/test_origin/test_tesla_npu_like.py +5 -5
  10. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/tests/main/test_origin/test_tpu_like.py +6 -6
  11. zigzag_dse-3.3.0/tests/main/test_with_exploit_data_locality/test_ascend_like.py +32 -0
  12. zigzag_dse-3.3.0/tests/main/test_with_exploit_data_locality/test_edge_tpu_like.py +32 -0
  13. zigzag_dse-3.3.0/tests/main/test_with_exploit_data_locality/test_meta_prototype_like.py +32 -0
  14. zigzag_dse-3.3.0/tests/main/test_with_exploit_data_locality/test_tesla_npu_like.py +32 -0
  15. zigzag_dse-3.3.0/tests/main/test_with_exploit_data_locality/test_tpu_like.py +32 -0
  16. zigzag_dse-3.3.0/tests/main/test_with_mix_spatial_mapping/test_ascend_like.py +35 -0
  17. zigzag_dse-3.3.0/tests/main/test_with_mix_spatial_mapping/test_edge_tpu_like.py +35 -0
  18. zigzag_dse-3.3.0/tests/main/test_with_mix_spatial_mapping/test_meta_prototype_like.py +35 -0
  19. zigzag_dse-3.3.0/tests/main/test_with_mix_spatial_mapping/test_tesla_npu_like.py +35 -0
  20. zigzag_dse-3.3.0/tests/main/test_with_mix_spatial_mapping/test_tpu_like.py +35 -0
  21. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/__init__.py +1 -1
  22. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/__main__.py +3 -4
  23. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/api.py +33 -29
  24. zigzag_dse-3.3.0/zigzag/cacti/README.md +10 -0
  25. zigzag_dse-3.3.0/zigzag/cacti/__pycache__/cacti_parser.cpython-311.opt-typeguard421.pyc +0 -0
  26. zigzag_dse-3.3.0/zigzag/cacti/__pycache__/cacti_parser.cpython-311.pyc +0 -0
  27. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/2DDRAM_Samsung2GbDDR2.cfg +194 -0
  28. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/2DDRAM_micron1Gb.cfg +194 -0
  29. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/3DDRAM_Samsung3D8Gb_extened.cfg +197 -0
  30. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/README +122 -0
  31. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/TSV.cc +238 -0
  32. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/TSV.h +96 -0
  33. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/Ucache.cc +1090 -0
  34. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/Ucache.h +101 -0
  35. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/arbiter.cc +130 -0
  36. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/arbiter.h +70 -0
  37. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/area.cc +41 -0
  38. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/area.h +63 -0
  39. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/bank.cc +196 -0
  40. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/bank.h +68 -0
  41. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/basic_circuit.cc +829 -0
  42. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/basic_circuit.h +202 -0
  43. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/cache.cfg_temp +318 -0
  44. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/cache_old.cfg.out +213 -0
  45. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/cacti +0 -0
  46. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/cacti.i +8 -0
  47. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/cacti.mk +53 -0
  48. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/cacti/cacti_master/cacti_config_creator.py +38 -29
  49. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/cacti_interface.cc +160 -0
  50. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/cacti_interface.h +766 -0
  51. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/cacti/cacti_master/cacti_top.py +11 -5
  52. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/component.cc +203 -0
  53. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/component.h +69 -0
  54. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/const.h +268 -0
  55. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/contention.dat +126 -0
  56. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/crossbar.cc +184 -0
  57. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/crossbar.h +76 -0
  58. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/ddr3.cfg +254 -0
  59. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/decoder.cc +1537 -0
  60. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/decoder.h +236 -0
  61. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/dram.cfg +114 -0
  62. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/example_mem_pool.yaml +696 -0
  63. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/extio.cc +470 -0
  64. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/extio.h +41 -0
  65. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/extio_technology.cc +1528 -0
  66. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/extio_technology.h +220 -0
  67. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/htree2.cc +681 -0
  68. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/htree2.h +93 -0
  69. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/io.cc +3777 -0
  70. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/io.h +42 -0
  71. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/lpddr.cfg +254 -0
  72. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/main.cc +134 -0
  73. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/makefile +28 -0
  74. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/mat.cc +2260 -0
  75. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/mat.h +173 -0
  76. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/memcad.cc +578 -0
  77. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/memcad.h +25 -0
  78. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/memcad_parameters.cc +406 -0
  79. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/memcad_parameters.h +233 -0
  80. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/memorybus.cc +786 -0
  81. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/memorybus.h +149 -0
  82. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/nuca.cc +587 -0
  83. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/nuca.h +91 -0
  84. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/obj_dbg/TSV.o +0 -0
  85. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/obj_dbg/Ucache.o +0 -0
  86. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/obj_dbg/arbiter.o +0 -0
  87. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/obj_dbg/area.o +0 -0
  88. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/obj_dbg/bank.o +0 -0
  89. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/obj_dbg/basic_circuit.o +0 -0
  90. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/obj_dbg/cacti +0 -0
  91. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/obj_dbg/cacti_interface.o +0 -0
  92. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/obj_dbg/component.o +0 -0
  93. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/obj_dbg/crossbar.o +0 -0
  94. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/obj_dbg/decoder.o +0 -0
  95. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/obj_dbg/extio.o +0 -0
  96. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/obj_dbg/extio_technology.o +0 -0
  97. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/obj_dbg/htree2.o +0 -0
  98. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/obj_dbg/io.o +0 -0
  99. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/obj_dbg/main.o +0 -0
  100. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/obj_dbg/mat.o +0 -0
  101. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/obj_dbg/memcad.o +0 -0
  102. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/obj_dbg/memcad_parameters.o +0 -0
  103. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/obj_dbg/memorybus.o +0 -0
  104. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/obj_dbg/nuca.o +0 -0
  105. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/obj_dbg/parameter.o +0 -0
  106. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/obj_dbg/powergating.o +0 -0
  107. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/obj_dbg/router.o +0 -0
  108. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/obj_dbg/subarray.o +0 -0
  109. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/obj_dbg/technology.o +0 -0
  110. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/obj_dbg/uca.o +0 -0
  111. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/obj_dbg/wire.o +0 -0
  112. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/parameter.cc +3408 -0
  113. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/parameter.h +764 -0
  114. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/powergating.cc +131 -0
  115. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/powergating.h +80 -0
  116. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/regression.test +45 -0
  117. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/router.cc +287 -0
  118. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/router.h +105 -0
  119. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/sample_config_files/ddr3_cache.cfg +259 -0
  120. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/sample_config_files/diff_ddr3_cache.cfg +259 -0
  121. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/sample_config_files/lpddr3_cache.cfg +259 -0
  122. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/sample_config_files/wideio_cache.cfg +259 -0
  123. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/self_gen/cache_a.cfg +270 -0
  124. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/self_gen/cache_a.cfg.out +8 -0
  125. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/subarray.cc +217 -0
  126. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/subarray.h +63 -0
  127. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/tech_params/16nm.dat +1 -0
  128. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/tech_params/180nm-old.dat +294 -0
  129. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/tech_params/180nm.dat +113 -0
  130. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/tech_params/22nm.dat +113 -0
  131. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/tech_params/32nm.dat +113 -0
  132. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/tech_params/45nm.dat +113 -0
  133. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/tech_params/65nm-old.dat +301 -0
  134. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/tech_params/65nm.dat +113 -0
  135. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/tech_params/90nm-old.dat +301 -0
  136. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/tech_params/90nm.dat +113 -0
  137. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/technology.cc +311 -0
  138. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/uca.cc +969 -0
  139. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/uca.h +109 -0
  140. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/version_cacti.h +40 -0
  141. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/wire.cc +848 -0
  142. zigzag_dse-3.3.0/zigzag/cacti/cacti_master/wire.h +113 -0
  143. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/cacti/cacti_parser.py +28 -13
  144. zigzag_dse-3.3.0/zigzag/cacti/self_gen/cache.cfg +269 -0
  145. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/cost_model/cost_model.py +97 -101
  146. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/cost_model/cost_model_imc.py +4 -3
  147. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/cost_model/port_activity.py +16 -10
  148. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/hardware/architecture/Core.py +0 -1
  149. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/hardware/architecture/ImcArray.py +9 -4
  150. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/hardware/architecture/MemoryHierarchy.py +2 -5
  151. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/hardware/architecture/MemoryInstance.py +1 -2
  152. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/hardware/architecture/get_cacti_cost.py +65 -55
  153. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/hardware/architecture/imc_unit.py +14 -15
  154. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/hardware/architecture/memory_level.py +5 -2
  155. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/hardware/architecture/memory_port.py +0 -1
  156. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/hardware/architecture/operational_array.py +0 -1
  157. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/hardware/architecture/operational_unit.py +0 -1
  158. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/mapping/Mapping.py +29 -27
  159. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/mapping/SpatialMappingInternal.py +6 -3
  160. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/mapping/data_movement.py +105 -65
  161. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/mapping/mapping_assist_funcs.py +0 -1
  162. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/mapping/spatial_mapping.py +25 -4
  163. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/opt/loma/LomaEngine.py +44 -28
  164. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/opt/loma/MemoryAllocator.py +17 -13
  165. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/opt/loma/multipermute.py +3 -4
  166. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/opt/salsa/SalsaEngine.py +4 -2
  167. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/parser/AcceleratorValidator.py +107 -17
  168. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/parser/MappingValidator.py +45 -10
  169. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/parser/UpgradedValidator.py +7 -2
  170. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/parser/accelerator_factory.py +16 -4
  171. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/parser/onnx/ConvParser.py +8 -45
  172. zigzag_dse-3.3.0/zigzag/parser/onnx/DefaultNodeParser.py +22 -0
  173. zigzag_dse-3.3.0/zigzag/parser/onnx/GemmParser.py +146 -0
  174. zigzag_dse-3.3.0/zigzag/parser/onnx/MatMulParser.py +5 -0
  175. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/parser/onnx/ONNXModelParser.py +4 -3
  176. zigzag_dse-3.3.0/zigzag/parser/onnx/ONNXOperatorParser.py +101 -0
  177. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/parser/onnx/utils.py +29 -27
  178. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/parser/workload_factory.py +17 -3
  179. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/stages/ONNXModelParserStage.py +8 -2
  180. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/stages/PlotTemporalMappingsStage.py +7 -1
  181. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/stages/SalsaStage.py +0 -1
  182. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/stages/SpatialMappingConversionStage.py +20 -6
  183. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/stages/SpatialMappingGeneratorStage.py +67 -27
  184. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/stages/Stage.py +4 -2
  185. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/stages/VisualizationStage.py +2 -1
  186. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/stages/WorkloadParserStage.py +8 -1
  187. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/stages/WorkloadStage.py +12 -3
  188. zigzag_dse-3.3.0/zigzag/stages/exploit_data_locality_stages.py +397 -0
  189. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/stages/reduce_stages.py +15 -3
  190. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/stages/run_opt_stages.py +1 -3
  191. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/stages/save_stages.py +12 -2
  192. zigzag_dse-3.3.0/zigzag/stages/temporal_mapping_generator_stage.py +79 -0
  193. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/utils.py +1 -1
  194. zigzag_dse-3.3.0/zigzag/visualization/results/plot_cme.py +234 -0
  195. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/visualization/results/print_mapping.py +12 -14
  196. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/workload/DNNWorkload.py +9 -2
  197. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/workload/DummyNode.py +16 -7
  198. zigzag_dse-3.3.0/zigzag/workload/ONNXWorkload.py +53 -0
  199. zigzag_dse-3.3.0/zigzag/workload/Workload.py +56 -0
  200. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/workload/layer_attributes.py +60 -11
  201. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/workload/layer_node.py +48 -6
  202. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0/zigzag_dse.egg-info}/PKG-INFO +2 -1
  203. zigzag_dse-3.3.0/zigzag_dse.egg-info/SOURCES.txt +244 -0
  204. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag_dse.egg-info/requires.txt +1 -0
  205. zigzag_dse-3.2.0/MANIFEST.in +0 -2
  206. zigzag_dse-3.2.0/tests/main/test_imc/test_aimc.py +0 -34
  207. zigzag_dse-3.2.0/tests/main/test_imc/test_dimc.py +0 -34
  208. zigzag_dse-3.2.0/tests/main/test_with_mix_spatial_mapping/test_ascend_like.py +0 -59
  209. zigzag_dse-3.2.0/tests/main/test_with_mix_spatial_mapping/test_edge_tpu_like.py +0 -75
  210. zigzag_dse-3.2.0/tests/main/test_with_mix_spatial_mapping/test_meta_prototype_like.py +0 -59
  211. zigzag_dse-3.2.0/tests/main/test_with_mix_spatial_mapping/test_tesla_npu_like.py +0 -55
  212. zigzag_dse-3.2.0/tests/main/test_with_mix_spatial_mapping/test_tpu_like.py +0 -63
  213. zigzag_dse-3.2.0/tests/main/test_without_unused_memory/test_ascend_like.py +0 -34
  214. zigzag_dse-3.2.0/tests/main/test_without_unused_memory/test_edge_tpu_like.py +0 -34
  215. zigzag_dse-3.2.0/tests/main/test_without_unused_memory/test_meta_prototype_like.py +0 -34
  216. zigzag_dse-3.2.0/tests/main/test_without_unused_memory/test_tesla_npu_like.py +0 -34
  217. zigzag_dse-3.2.0/tests/main/test_without_unused_memory/test_tpu_like.py +0 -34
  218. zigzag_dse-3.2.0/zigzag/parser/onnx/DefaultNodeParser.py +0 -30
  219. zigzag_dse-3.2.0/zigzag/parser/onnx/GemmParser.py +0 -117
  220. zigzag_dse-3.2.0/zigzag/parser/onnx/MatMulParser.py +0 -94
  221. zigzag_dse-3.2.0/zigzag/parser/onnx/ONNXOperatorParser.py +0 -55
  222. zigzag_dse-3.2.0/zigzag/stages/LomaStage.py +0 -49
  223. zigzag_dse-3.2.0/zigzag/stages/RemoveUnusedMemoryStage.py +0 -162
  224. zigzag_dse-3.2.0/zigzag/stages/SearchUnusedMemoryStage.py +0 -354
  225. zigzag_dse-3.2.0/zigzag/stages/TemporalOrderingConversionStage.py +0 -78
  226. zigzag_dse-3.2.0/zigzag/visualization/results/plot_cme.py +0 -258
  227. zigzag_dse-3.2.0/zigzag/workload/ONNXWorkload.py +0 -29
  228. zigzag_dse-3.2.0/zigzag/workload/Workload.py +0 -32
  229. zigzag_dse-3.2.0/zigzag_dse.egg-info/SOURCES.txt +0 -128
  230. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/LICENSE +0 -0
  231. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/README.md +0 -0
  232. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/setup.cfg +0 -0
  233. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/tests/main/test_imc/__init__.py +0 -0
  234. {zigzag_dse-3.2.0/tests/main/test_with_mix_spatial_mapping → zigzag_dse-3.3.0/tests/main/test_with_exploit_data_locality}/__init__.py +0 -0
  235. {zigzag_dse-3.2.0/tests/main/test_without_unused_memory → zigzag_dse-3.3.0/tests/main/test_with_mix_spatial_mapping}/__init__.py +0 -0
  236. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/cost_model/__init__.py +0 -0
  237. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/datatypes.py +0 -0
  238. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/hardware/architecture/Accelerator.py +0 -0
  239. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/hardware/architecture/Adder.py +0 -0
  240. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/hardware/architecture/__init__.py +0 -0
  241. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/inputs/workload/alexnet.onnx +0 -0
  242. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/inputs/workload/mobilenetv2.onnx +0 -0
  243. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/inputs/workload/resnet18.onnx +0 -0
  244. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/mapping/TemporalMapping.py +0 -0
  245. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/mapping/__init__.py +0 -0
  246. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/opt/__init__.py +0 -0
  247. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/opt/loma/Loop.py +0 -0
  248. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/opt/loma/__init__.py +0 -0
  249. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/opt/salsa/SalsaState.py +0 -0
  250. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/opt/salsa/__init__.py +0 -0
  251. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/parser/WorkloadValidator.py +0 -0
  252. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/parser/__init__.py +0 -0
  253. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/parser/arguments.py +0 -0
  254. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/parser/onnx/__init__.py +0 -0
  255. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/py.typed +0 -0
  256. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/stages/AcceleratorParserStage.py +0 -0
  257. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/stages/CostModelStage.py +0 -0
  258. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/stages/MainStage.py +0 -0
  259. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/stages/PEArrayScalingStage.py +0 -0
  260. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/stages/__init__.py +0 -0
  261. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/visualization/__init__.py +0 -0
  262. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/visualization/graph/__init__.py +0 -0
  263. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/visualization/graph/memory_hierarchy.py +0 -0
  264. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/visualization/graph/workload.py +0 -0
  265. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/visualization/results/__init__.py +0 -0
  266. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/workload/LayerAttribute.py +0 -0
  267. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/workload/LayerNodeABC.py +0 -0
  268. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag/workload/__init__.py +0 -0
  269. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag_dse.egg-info/dependency_links.txt +0 -0
  270. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag_dse.egg-info/entry_points.txt +0 -0
  271. {zigzag_dse-3.2.0 → zigzag_dse-3.3.0}/zigzag_dse.egg-info/top_level.txt +0 -0
@@ -0,0 +1,2 @@
1
+ include zigzag/inputs/workload/*.onnx
2
+ recursive-include zigzag/cacti *
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: zigzag-dse
3
- Version: 3.2.0
3
+ Version: 3.3.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
@@ -41,6 +41,7 @@ Requires-Dist: tqdm
41
41
  Requires-Dist: multiprocessing_on_dill
42
42
  Requires-Dist: pyyaml
43
43
  Requires-Dist: cerberus
44
+ Requires-Dist: seaborn
44
45
  Provides-Extra: dev
45
46
  Requires-Dist: bumpver; extra == "dev"
46
47
  Requires-Dist: pip-tools; extra == "dev"
@@ -14,7 +14,7 @@ namespaces = true # true by default
14
14
 
15
15
  [project]
16
16
  name = "zigzag-dse"
17
- version = "3.2.0"
17
+ version = "3.3.0"
18
18
  description = "ZigZag - Deep Learning Hardware Design Space Exploration"
19
19
  readme = "README.md"
20
20
  authors = [{ name = "Arne Symons", email = "arne.symons@kuleuven.be" }, { name = "Linyan Mei", email = "linyan.mei@kuleuven.be" }]
@@ -34,6 +34,7 @@ dependencies = [
34
34
  'multiprocessing_on_dill',
35
35
  'pyyaml',
36
36
  'cerberus',
37
+ 'seaborn'
37
38
  ]
38
39
  requires-python = ">=3.11"
39
40
 
@@ -48,7 +49,7 @@ Homepage = "https://github.com/KULeuven-MICAS/zigzag"
48
49
  realpython = "zigzag.__main__:main"
49
50
 
50
51
  [tool.bumpver]
51
- current_version = "3.2.0"
52
+ current_version = "3.3.0"
52
53
  version_pattern = "MAJOR.MINOR.PATCH"
53
54
  commit_message = "bump version {old_version} -> {new_version}"
54
55
  commit = true
@@ -63,4 +64,8 @@ push = false
63
64
  "zigzag/__init__.py" = ["{version}"]
64
65
 
65
66
 
67
+ [tool.ruff]
68
+ line-length = 120
66
69
 
70
+ [tool.black]
71
+ line-length = 120
@@ -0,0 +1,45 @@
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": (4696819238.427852, 5553018.0, 14.07244, 2.2878123152749223),
13
+ "zigzag/inputs/workload/resnet18.yaml": (
14
+ 4264976904.6396008,
15
+ 4907495.0,
16
+ 14.07244,
17
+ 2.2878123152749223,
18
+ ),
19
+ }
20
+
21
+
22
+ @pytest.fixture
23
+ def mapping():
24
+ return "zigzag/inputs/mapping/default_imc.yaml"
25
+
26
+
27
+ @pytest.fixture
28
+ def accelerator():
29
+ return "zigzag/inputs/hardware/aimc.yaml"
30
+
31
+
32
+ @pytest.mark.parametrize("workload", workloads)
33
+ def test_api(workload: str, accelerator: str, mapping: str): # pylint: disable=W0621
34
+ (energy, latency, tclk, area, _) = get_hardware_performance_zigzag_imc(workload, accelerator, mapping)
35
+ (
36
+ expected_energy,
37
+ expected_latency,
38
+ expected_tclk,
39
+ expected_area,
40
+ ) = ens_lats_clks_areas[workload]
41
+ print(f"'{workload}': ({energy}, {latency}, {tclk}, {area}),")
42
+ assert energy == pytest.approx(expected_energy) # type: ignore
43
+ assert latency == pytest.approx(expected_latency) # type: ignore
44
+ assert tclk == pytest.approx(expected_tclk) # type: ignore
45
+ assert area == pytest.approx(expected_area) # type: ignore
@@ -0,0 +1,45 @@
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": (4727682330.905855, 6365842.0, 3.75708, 0.8018113023999999),
13
+ "zigzag/inputs/workload/resnet18.yaml": (
14
+ 4268285089.3547516,
15
+ 5789229.0,
16
+ 3.75708,
17
+ 0.8018113023999999,
18
+ ),
19
+ }
20
+
21
+
22
+ @pytest.fixture
23
+ def mapping():
24
+ return "zigzag/inputs/mapping/default_imc.yaml"
25
+
26
+
27
+ @pytest.fixture
28
+ def accelerator():
29
+ return "zigzag/inputs/hardware/dimc.yaml"
30
+
31
+
32
+ @pytest.mark.parametrize("workload", workloads)
33
+ def test_api(workload: str, accelerator: str, mapping: str): # pylint: disable=W0621
34
+ (energy, latency, tclk, area, _) = get_hardware_performance_zigzag_imc(workload, accelerator, mapping)
35
+ (
36
+ expected_energy,
37
+ expected_latency,
38
+ expected_tclk,
39
+ expected_area,
40
+ ) = ens_lats_clks_areas[workload]
41
+ print(f"'{workload}': ({energy}, {latency}, {tclk}, {area}),")
42
+ assert energy == pytest.approx(expected_energy) # type: ignore
43
+ assert latency == pytest.approx(expected_latency) # type: ignore
44
+ assert tclk == pytest.approx(expected_tclk) # type: ignore
45
+ assert area == pytest.approx(expected_area) # type: ignore
@@ -9,7 +9,7 @@ workloads = (
9
9
 
10
10
  # Expected energy and latency for each workload defined above
11
11
  ens_lats = {
12
- "zigzag/inputs/workload/resnet18.onnx": (1860963861.6800003, 3698589.0),
12
+ "zigzag/inputs/workload/resnet18.onnx": (1860725512.0800002, 3734111.0),
13
13
  "zigzag/inputs/workload/resnet18.yaml": (2411783423.28, 4779709.0),
14
14
  }
15
15
 
@@ -25,9 +25,9 @@ def accelerator():
25
25
 
26
26
 
27
27
  @pytest.mark.parametrize("workload", workloads)
28
- def test_api(workload: str, accelerator: str, mapping: str):
28
+ def test_api(workload: str, accelerator: str, mapping: str): # pylint: disable=W0621
29
29
  (energy, latency, _) = get_hardware_performance_zigzag(workload, accelerator, mapping)
30
30
  (expected_energy, expected_latency) = ens_lats[workload]
31
31
  print(f"'{workload}': ({energy}, {latency}),")
32
- assert energy == pytest.approx(expected_energy)
33
- assert latency == pytest.approx(expected_latency)
32
+ assert energy == pytest.approx(expected_energy) # type: ignore
33
+ assert latency == pytest.approx(expected_latency) # type: ignore
@@ -9,7 +9,7 @@ workloads = (
9
9
 
10
10
  # Expected energy and latency for each workload defined above
11
11
  ens_lats = {
12
- "zigzag/inputs/workload/resnet18.onnx": (1902637139.1499994, 3333310.0),
12
+ "zigzag/inputs/workload/resnet18.onnx": (1903376014.3499994, 3333310.0),
13
13
  "zigzag/inputs/workload/resnet18.yaml": (2413348670.67, 4268451.0),
14
14
  }
15
15
 
@@ -25,9 +25,9 @@ def accelerator():
25
25
 
26
26
 
27
27
  @pytest.mark.parametrize("workload", workloads)
28
- def test_api(workload: str, accelerator: str, mapping: str):
29
- (energy, latency, cmes) = get_hardware_performance_zigzag(workload, accelerator, mapping)
28
+ def test_api(workload: str, accelerator: str, mapping: str): # pylint: disable=W0621
29
+ (energy, latency, _) = get_hardware_performance_zigzag(workload, accelerator, mapping)
30
30
  (expected_energy, expected_latency) = ens_lats[workload]
31
31
  print(f"'{workload}': ({energy}, {latency}),")
32
- assert energy == pytest.approx(expected_energy)
33
- assert latency == pytest.approx(expected_latency)
32
+ assert energy == pytest.approx(expected_energy) # type: ignore
33
+ assert latency == pytest.approx(expected_latency) # type: ignore
@@ -9,7 +9,7 @@ workloads = (
9
9
 
10
10
  # Expected energy and latency for each workload defined above
11
11
  ens_lats = {
12
- "zigzag/inputs/workload/resnet18.onnx": (1869036158.08, 3366695.0),
12
+ "zigzag/inputs/workload/resnet18.onnx": (1870400796.8, 3614956.0),
13
13
  "zigzag/inputs/workload/resnet18.yaml": (2418511845.2400002, 4130645.0),
14
14
  }
15
15
 
@@ -25,9 +25,9 @@ def accelerator():
25
25
 
26
26
 
27
27
  @pytest.mark.parametrize("workload", workloads)
28
- def test_api(workload: str, accelerator: str, mapping: str):
29
- (energy, latency, cmes) = get_hardware_performance_zigzag(workload, accelerator, mapping)
28
+ def test_api(workload: str, accelerator: str, mapping: str): # pylint: disable=W0621
29
+ (energy, latency, _) = get_hardware_performance_zigzag(workload, accelerator, mapping)
30
30
  (expected_energy, expected_latency) = ens_lats[workload]
31
31
  print(f"'{workload}': ({energy}, {latency}),")
32
- assert energy == pytest.approx(expected_energy)
33
- assert latency == pytest.approx(expected_latency)
32
+ assert energy == pytest.approx(expected_energy) # type: ignore
33
+ assert latency == pytest.approx(expected_latency) # type: ignore
@@ -9,7 +9,7 @@ workloads = (
9
9
 
10
10
  # Expected energy and latency for each workload defined above
11
11
  ens_lats = {
12
- "zigzag/inputs/workload/resnet18.onnx": (1863716799.84, 3380242.0),
12
+ "zigzag/inputs/workload/resnet18.onnx": (1865018192.8319998, 3876369.0),
13
13
  "zigzag/inputs/workload/resnet18.yaml": (2374655424.176, 4066942.0),
14
14
  }
15
15
 
@@ -25,9 +25,9 @@ def accelerator():
25
25
 
26
26
 
27
27
  @pytest.mark.parametrize("workload", workloads)
28
- def test_api(workload: str, accelerator: str, mapping: str):
29
- (energy, latency, cmes) = get_hardware_performance_zigzag(workload, accelerator, mapping)
28
+ def test_api(workload: str, accelerator: str, mapping: str): # pylint: disable=W0621
29
+ (energy, latency, _) = get_hardware_performance_zigzag(workload, accelerator, mapping)
30
30
  (expected_energy, expected_latency) = ens_lats[workload]
31
31
  print(f"'{workload}': ({energy}, {latency}),")
32
- assert energy == pytest.approx(expected_energy)
33
- assert latency == pytest.approx(expected_latency)
32
+ assert energy == pytest.approx(expected_energy) # type: ignore
33
+ assert latency == pytest.approx(expected_latency) # type: ignore
@@ -9,8 +9,8 @@ workloads = (
9
9
 
10
10
  # Expected energy and latency for each workload defined above
11
11
  ens_lats = {
12
- "zigzag/inputs/workload/resnet18.onnx": (1795904402.5120003, 4158539.0),
13
- "zigzag/inputs/workload/resnet18.yaml": (2296490149.296, 4906975.0),
12
+ "zigzag/inputs/workload/resnet18.onnx": (1871930384.8159997, 4159004.0),
13
+ "zigzag/inputs/workload/resnet18.yaml": (2615172831.3759995, 6136285.0),
14
14
  }
15
15
 
16
16
 
@@ -25,9 +25,9 @@ def accelerator():
25
25
 
26
26
 
27
27
  @pytest.mark.parametrize("workload", workloads)
28
- def test_api(workload: str, accelerator: str, mapping: str):
28
+ def test_api(workload: str, accelerator: str, mapping: str): # pylint: disable=W0621
29
29
  (energy, latency, _) = get_hardware_performance_zigzag(workload, accelerator, mapping)
30
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)
31
+ print(f"'{workload}': ({energy}, {latency}),")
32
+ assert energy == pytest.approx(expected_energy) # type: ignore
33
+ assert latency == pytest.approx(expected_latency) # type: ignore
@@ -0,0 +1,32 @@
1
+ import pytest
2
+ from zigzag.api import get_hardware_performance_zigzag_with_exploit_data_locality
3
+
4
+ workloads = (
5
+ "zigzag/inputs/workload/resnet18.onnx",
6
+ "zigzag/inputs/workload/resnet18.yaml",
7
+ )
8
+
9
+ # Expected energy and latency for each workload defined above
10
+ ens_lats = {
11
+ "zigzag/inputs/workload/resnet18.onnx": (1711117447.5200002, 3603174.0),
12
+ "zigzag/inputs/workload/resnet18.yaml": (2246606942, 4638794),
13
+ }
14
+
15
+
16
+ @pytest.fixture
17
+ def mapping():
18
+ return "zigzag/inputs/mapping/ascend_like.yaml"
19
+
20
+
21
+ @pytest.fixture
22
+ def accelerator():
23
+ return "zigzag/inputs/hardware/ascend_like.yaml"
24
+
25
+
26
+ @pytest.mark.parametrize("workload", workloads)
27
+ def test_api(workload: str, accelerator: str, mapping: str): # pylint: disable=W0621
28
+ (energy, latency, _) = get_hardware_performance_zigzag_with_exploit_data_locality(workload, accelerator, mapping)
29
+ (expected_energy, expected_latency) = ens_lats[workload]
30
+ print(f"'{workload}': ({energy}, {latency}),")
31
+ assert energy == pytest.approx(expected_energy) # type: ignore
32
+ assert latency == pytest.approx(expected_latency) # type: ignore
@@ -0,0 +1,32 @@
1
+ import pytest
2
+ from zigzag.api import get_hardware_performance_zigzag_with_exploit_data_locality
3
+
4
+ workloads = (
5
+ "zigzag/inputs/workload/resnet18.onnx",
6
+ "zigzag/inputs/workload/resnet18.yaml",
7
+ )
8
+
9
+ # Expected energy and latency for each workload defined above
10
+ ens_lats = {
11
+ "zigzag/inputs/workload/resnet18.onnx": (1784038702.91, 3156625.0),
12
+ "zigzag/inputs/workload/resnet18.yaml": (2115121959.8699996, 3855157.0),
13
+ }
14
+
15
+
16
+ @pytest.fixture
17
+ def mapping():
18
+ return "zigzag/inputs/mapping/edge_tpu_like.yaml"
19
+
20
+
21
+ @pytest.fixture
22
+ def accelerator():
23
+ return "zigzag/inputs/hardware/edge_tpu_like.yaml"
24
+
25
+
26
+ @pytest.mark.parametrize("workload", workloads)
27
+ def test_api(workload: str, accelerator: str, mapping: str): # pylint: disable=W0621
28
+ (energy, latency, _) = get_hardware_performance_zigzag_with_exploit_data_locality(workload, accelerator, mapping)
29
+ (expected_energy, expected_latency) = ens_lats[workload]
30
+ print(f"'{workload}': ({energy}, {latency}),")
31
+ assert energy == pytest.approx(expected_energy) # type: ignore
32
+ assert latency == pytest.approx(expected_latency) # type: ignore
@@ -0,0 +1,32 @@
1
+ import pytest
2
+ from zigzag.api import get_hardware_performance_zigzag_with_exploit_data_locality
3
+
4
+ workloads = (
5
+ "zigzag/inputs/workload/resnet18.onnx",
6
+ "zigzag/inputs/workload/resnet18.yaml",
7
+ )
8
+
9
+ # Expected energy and latency for each workload defined above
10
+ ens_lats = {
11
+ "zigzag/inputs/workload/resnet18.onnx": (1731553583.8400002, 3479347.0),
12
+ "zigzag/inputs/workload/resnet18.yaml": (2264057101, 3984645),
13
+ }
14
+
15
+
16
+ @pytest.fixture
17
+ def mapping():
18
+ return "zigzag/inputs/mapping/meta_prototype_like.yaml"
19
+
20
+
21
+ @pytest.fixture
22
+ def accelerator():
23
+ return "zigzag/inputs/hardware/meta_prototype.yaml"
24
+
25
+
26
+ @pytest.mark.parametrize("workload", workloads)
27
+ def test_api(workload: str, accelerator: str, mapping: str): # pylint: disable=W0621
28
+ (energy, latency, _) = get_hardware_performance_zigzag_with_exploit_data_locality(workload, accelerator, mapping)
29
+ (expected_energy, expected_latency) = ens_lats[workload]
30
+ print(f"'{workload}': ({energy}, {latency}),")
31
+ assert energy == pytest.approx(expected_energy) # type: ignore
32
+ assert latency == pytest.approx(expected_latency) # type: ignore
@@ -0,0 +1,32 @@
1
+ import pytest
2
+ from zigzag.api import get_hardware_performance_zigzag_with_exploit_data_locality
3
+
4
+ workloads = (
5
+ "zigzag/inputs/workload/resnet18.onnx",
6
+ "zigzag/inputs/workload/resnet18.yaml",
7
+ )
8
+
9
+ # Expected energy and latency for each workload defined above
10
+ ens_lats = {
11
+ "zigzag/inputs/workload/resnet18.onnx": (1726170979.8719997, 3743894.0),
12
+ "zigzag/inputs/workload/resnet18.yaml": (2220200680, 3924484),
13
+ }
14
+
15
+
16
+ @pytest.fixture
17
+ def mapping():
18
+ return "zigzag/inputs/mapping/tesla_npu_like.yaml"
19
+
20
+
21
+ @pytest.fixture
22
+ def accelerator():
23
+ return "zigzag/inputs/hardware/tesla_npu_like.yaml"
24
+
25
+
26
+ @pytest.mark.parametrize("workload", workloads)
27
+ def test_api(workload: str, accelerator: str, mapping: str): # pylint: disable=W0621
28
+ (energy, latency, _) = get_hardware_performance_zigzag_with_exploit_data_locality(workload, accelerator, mapping)
29
+ (expected_energy, expected_latency) = ens_lats[workload]
30
+ print(f"'{workload}': ({energy}, {latency}),")
31
+ assert energy == pytest.approx(expected_energy) # type: ignore
32
+ assert latency == pytest.approx(expected_latency) # type: ignore
@@ -0,0 +1,32 @@
1
+ import pytest
2
+ from zigzag.api import get_hardware_performance_zigzag_with_exploit_data_locality
3
+
4
+ workloads = (
5
+ "zigzag/inputs/workload/resnet18.onnx",
6
+ "zigzag/inputs/workload/resnet18.yaml",
7
+ )
8
+
9
+ # Expected energy and latency for each workload defined above
10
+ ens_lats = {
11
+ "zigzag/inputs/workload/resnet18.onnx": (1735735708.3840003, 3998705.0),
12
+ "zigzag/inputs/workload/resnet18.yaml": (2302362179.968, 5736497.0),
13
+ }
14
+
15
+
16
+ @pytest.fixture
17
+ def mapping():
18
+ return "zigzag/inputs/mapping/tpu_like.yaml"
19
+
20
+
21
+ @pytest.fixture
22
+ def accelerator():
23
+ return "zigzag/inputs/hardware/tpu_like.yaml"
24
+
25
+
26
+ @pytest.mark.parametrize("workload", workloads)
27
+ def test_api(workload: str, accelerator: str, mapping: str): # pylint: disable=W0621
28
+ (energy, latency, _) = get_hardware_performance_zigzag_with_exploit_data_locality(workload, accelerator, mapping)
29
+ (expected_energy, expected_latency) = ens_lats[workload]
30
+ print(f"'{workload}': ({energy}, {latency}),")
31
+ assert energy == pytest.approx(expected_energy) # type: ignore
32
+ assert latency == pytest.approx(expected_latency) # type: ignore
@@ -0,0 +1,35 @@
1
+ import pytest
2
+
3
+ from zigzag.api import get_hardware_performance_zigzag_with_mix_spatial_mapping
4
+
5
+ # Test case for when spatial_mapping is provided, while spatial_mapping_hint is not provided.
6
+
7
+ workloads = (
8
+ "zigzag/inputs/workload/resnet18.onnx",
9
+ "zigzag/inputs/workload/resnet18.yaml",
10
+ )
11
+
12
+ # Expected energy and latency for each workload defined above
13
+ ens_lats = {
14
+ "zigzag/inputs/workload/resnet18.onnx": (1680986460.6400003, 3829493.0),
15
+ "zigzag/inputs/workload/resnet18.yaml": (2286320480, 4418088),
16
+ }
17
+
18
+
19
+ @pytest.fixture
20
+ def mapping():
21
+ return "zigzag/inputs/mapping/ascend_like_mixed.yaml"
22
+
23
+
24
+ @pytest.fixture
25
+ def accelerator():
26
+ return "zigzag/inputs/hardware/ascend_like.yaml"
27
+
28
+
29
+ @pytest.mark.parametrize("workload", workloads)
30
+ def test_api(workload: str, accelerator: str, mapping: str): # pylint: disable=W0621
31
+ (energy, latency, _) = get_hardware_performance_zigzag_with_mix_spatial_mapping(workload, accelerator, mapping)
32
+ (expected_energy, expected_latency) = ens_lats[workload]
33
+ print(f"'{workload}': ({energy}, {latency}),")
34
+ assert energy == pytest.approx(expected_energy) # type: ignore
35
+ assert latency == pytest.approx(expected_latency) # type: ignore
@@ -0,0 +1,35 @@
1
+ import pytest
2
+
3
+ from zigzag.api import get_hardware_performance_zigzag_with_mix_spatial_mapping
4
+
5
+ # Test case for when both spatial_mapping and spatial_mapping_hint are provided.
6
+
7
+ workloads = (
8
+ "zigzag/inputs/workload/resnet18.onnx",
9
+ "zigzag/inputs/workload/resnet18.yaml",
10
+ )
11
+
12
+ # Expected energy and latency for each workload defined above
13
+ ens_lats = {
14
+ "zigzag/inputs/workload/resnet18.onnx": (1738892454.2700002, 4247189.0),
15
+ "zigzag/inputs/workload/resnet18.yaml": (2029477205, 4738407),
16
+ }
17
+
18
+
19
+ @pytest.fixture
20
+ def mapping():
21
+ return "zigzag/inputs/mapping/edge_tpu_like_mixed.yaml"
22
+
23
+
24
+ @pytest.fixture
25
+ def accelerator():
26
+ return "zigzag/inputs/hardware/edge_tpu_like.yaml"
27
+
28
+
29
+ @pytest.mark.parametrize("workload", workloads)
30
+ def test_api(workload: str, accelerator: str, mapping: str): # pylint: disable=W0621
31
+ (energy, latency, _) = get_hardware_performance_zigzag_with_mix_spatial_mapping(workload, accelerator, mapping)
32
+ (expected_energy, expected_latency) = ens_lats[workload]
33
+ print(f"'{workload}': ({energy}, {latency}),")
34
+ assert energy == pytest.approx(expected_energy) # type: ignore
35
+ assert latency == pytest.approx(expected_latency) # type: ignore
@@ -0,0 +1,35 @@
1
+ import pytest
2
+
3
+ from zigzag.api import get_hardware_performance_zigzag_with_mix_spatial_mapping
4
+
5
+ # Test case for when an incomplete spatial_mapping is provided and spatial_mapping_hint is also provided.
6
+
7
+ workloads = (
8
+ "zigzag/inputs/workload/resnet18.onnx",
9
+ "zigzag/inputs/workload/resnet18.yaml",
10
+ )
11
+
12
+ # Expected energy and latency for each workload defined above
13
+ ens_lats = {
14
+ "zigzag/inputs/workload/resnet18.onnx": (1753144562.7200003, 3483127.0),
15
+ "zigzag/inputs/workload/resnet18.yaml": (2259198622.68, 3884859.0),
16
+ }
17
+
18
+
19
+ @pytest.fixture
20
+ def mapping():
21
+ return "zigzag/inputs/mapping/meta_prototype_like_mixed.yaml"
22
+
23
+
24
+ @pytest.fixture
25
+ def accelerator():
26
+ return "zigzag/inputs/hardware/meta_prototype.yaml"
27
+
28
+
29
+ @pytest.mark.parametrize("workload", workloads)
30
+ def test_api(workload: str, accelerator: str, mapping: str): # pylint: disable=W0621
31
+ (energy, latency, _) = get_hardware_performance_zigzag_with_mix_spatial_mapping(workload, accelerator, mapping)
32
+ (expected_energy, expected_latency) = ens_lats[workload]
33
+ print(f"'{workload}': ({energy}, {latency}),")
34
+ assert energy == pytest.approx(expected_energy) # type: ignore
35
+ assert latency == pytest.approx(expected_latency) # type: ignore
@@ -0,0 +1,35 @@
1
+ import pytest
2
+
3
+ from zigzag.api import get_hardware_performance_zigzag_with_mix_spatial_mapping
4
+
5
+ # Test case for when only spatial_mapping_hint is provided.
6
+
7
+ workloads = (
8
+ "zigzag/inputs/workload/resnet18.onnx",
9
+ "zigzag/inputs/workload/resnet18.yaml",
10
+ )
11
+
12
+ # Expected energy and latency for each workload defined above
13
+ ens_lats = {
14
+ "zigzag/inputs/workload/resnet18.onnx": (1605857758.544, 3324427.0),
15
+ "zigzag/inputs/workload/resnet18.yaml": (2094141825.5040002, 3480232.0),
16
+ }
17
+
18
+
19
+ @pytest.fixture
20
+ def mapping():
21
+ return "zigzag/inputs/mapping/tesla_npu_like_mixed.yaml"
22
+
23
+
24
+ @pytest.fixture
25
+ def accelerator():
26
+ return "zigzag/inputs/hardware/tesla_npu_like.yaml"
27
+
28
+
29
+ @pytest.mark.parametrize("workload", workloads)
30
+ def test_api(workload: str, accelerator: str, mapping: str): # pylint: disable=W0621
31
+ (energy, latency, _) = get_hardware_performance_zigzag_with_mix_spatial_mapping(workload, accelerator, mapping)
32
+ (expected_energy, expected_latency) = ens_lats[workload]
33
+ print(f"'{workload}': ({energy}, {latency}),")
34
+ assert energy == pytest.approx(expected_energy) # type: ignore
35
+ assert latency == pytest.approx(expected_latency) # type: ignore
@@ -0,0 +1,35 @@
1
+ import pytest
2
+
3
+ from zigzag.api import get_hardware_performance_zigzag_with_mix_spatial_mapping
4
+
5
+ # Test case for when more non-existent dimensions are provided in spatial_mapping_hint.
6
+
7
+ workloads = (
8
+ "zigzag/inputs/workload/resnet18.onnx",
9
+ "zigzag/inputs/workload/resnet18.yaml",
10
+ )
11
+
12
+ # Expected energy and latency for each workload defined above
13
+ ens_lats = {
14
+ "zigzag/inputs/workload/resnet18.onnx": (1763016528.7640002, 4688029.0),
15
+ "zigzag/inputs/workload/resnet18.yaml": (2191903732.78, 4845353.0),
16
+ }
17
+
18
+
19
+ @pytest.fixture
20
+ def mapping():
21
+ return "zigzag/inputs/mapping/tpu_like_mixed.yaml"
22
+
23
+
24
+ @pytest.fixture
25
+ def accelerator():
26
+ return "zigzag/inputs/hardware/tpu_like.yaml"
27
+
28
+
29
+ @pytest.mark.parametrize("workload", workloads)
30
+ def test_api(workload: str, accelerator: str, mapping: str): # pylint: disable=W0621 # pylint: disable=W0621
31
+ (energy, latency, _) = get_hardware_performance_zigzag_with_mix_spatial_mapping(workload, accelerator, mapping)
32
+ (expected_energy, expected_latency) = ens_lats[workload]
33
+ print(f"'{workload}': ({energy}, {latency}),")
34
+ assert energy == pytest.approx(expected_energy) # type: ignore
35
+ assert latency == pytest.approx(expected_latency) # type: ignore
@@ -1,3 +1,3 @@
1
- __version__ = "3.2.0"
1
+ __version__ = "3.3.0"
2
2
 
3
3
  # from . import visualization as visualization
@@ -1,5 +1,4 @@
1
1
  from datetime import datetime
2
- from zigzag.stages import *
3
2
 
4
3
  from zigzag.stages.CostModelStage import CostModelStage
5
4
  from zigzag.stages.MainStage import MainStage
@@ -9,7 +8,7 @@ from zigzag.stages.WorkloadStage import WorkloadStage
9
8
  from zigzag.stages.AcceleratorParserStage import AcceleratorParserStage
10
9
  from zigzag.stages.reduce_stages import MinimalLatencyStage
11
10
  from zigzag.stages.save_stages import SimpleSaveStage
12
- from zigzag.stages.LomaStage import LomaStage
11
+ from zigzag.stages.temporal_mapping_generator_stage import TemporalMappingGeneratorStage
13
12
  from zigzag.parser.arguments import get_arg_parser
14
13
 
15
14
 
@@ -36,14 +35,14 @@ def main():
36
35
  WorkloadStage, # Iterates through the different layers in the workload
37
36
  SpatialMappingConversionStage, # Generates multiple spatial mappings (SM)
38
37
  MinimalLatencyStage, # Reduces all CMEs, returning minimal latency one
39
- LomaStage, # Generates multiple temporal mappings (TM)
38
+ TemporalMappingGeneratorStage, # Generates multiple temporal mappings (TM)
40
39
  CostModelStage, # Evaluates generated SM and TM through cost model
41
40
  ],
42
41
  accelerator_path=args.accelerator, # required by AcceleratorParserStage
43
42
  onnx_model_path=args.model, # required by ONNXModelParserStage
44
43
  mapping_path=args.mapping, # required by ONNXModelParserStage
45
44
  dump_folder=f"outputs/{datetime.now()}", # Output folder
46
- loma_lpf_limit=6, # required by LomaStage
45
+ loma_lpf_limit=6, # required by TemporalMappingGeneratorStage
47
46
  loma_show_progress_bar=True, # shows a progress bar while iterating over temporal mappings
48
47
  )
49
48