zigzag-dse 3.7.0__tar.gz → 3.7.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {zigzag_dse-3.7.0/zigzag_dse.egg-info → zigzag_dse-3.7.2}/PKG-INFO +3 -3
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/pyproject.toml +5 -4
- zigzag_dse-3.7.2/zigzag/__init__.py +1 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/opt/salsa/state.py +1 -2
- zigzag_dse-3.7.2/zigzag/parser/mapping_factory.py +101 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/parser/mapping_validator.py +0 -6
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/parser/workload_factory.py +29 -111
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/workload/dummy_node.py +0 -2
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/workload/layer_attribute.py +7 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/workload/layer_attributes.py +3 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/workload/layer_node.py +25 -23
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2/zigzag_dse.egg-info}/PKG-INFO +3 -3
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag_dse.egg-info/SOURCES.txt +1 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag_dse.egg-info/requires.txt +2 -2
- zigzag_dse-3.7.0/zigzag/__init__.py +0 -1
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/LICENSE +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/MANIFEST.in +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/README.md +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/setup.cfg +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/tests/main/test_imc/__init__.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/tests/main/test_imc/test_aimc.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/tests/main/test_imc/test_dimc.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/tests/main/test_origin/test_ascend_like.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/tests/main/test_origin/test_edge_tpu_like.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/tests/main/test_origin/test_meta_prototype_like.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/tests/main/test_origin/test_tesla_npu_like.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/tests/main/test_origin/test_tpu_like.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/tests/main/test_with_exploit_data_locality/__init__.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/tests/main/test_with_exploit_data_locality/test_ascend_like.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/tests/main/test_with_exploit_data_locality/test_edge_tpu_like.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/tests/main/test_with_exploit_data_locality/test_meta_prototype_like.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/tests/main/test_with_exploit_data_locality/test_tesla_npu_like.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/tests/main/test_with_exploit_data_locality/test_tpu_like.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/tests/main/test_with_mix_spatial_mapping/__init__.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/tests/main/test_with_mix_spatial_mapping/test_ascend_like.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/tests/main/test_with_mix_spatial_mapping/test_edge_tpu_like.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/tests/main/test_with_mix_spatial_mapping/test_meta_prototype_like.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/tests/main/test_with_mix_spatial_mapping/test_tesla_npu_like.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/tests/main/test_with_mix_spatial_mapping/test_tpu_like.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/__main__.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/api.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/README.md +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/__pycache__/cacti_parser.cpython-311.opt-typeguard421.pyc +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/__pycache__/cacti_parser.cpython-311.pyc +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/2DDRAM_Samsung2GbDDR2.cfg +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/2DDRAM_micron1Gb.cfg +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/3DDRAM_Samsung3D8Gb_extened.cfg +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/README +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/TSV.cc +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/TSV.h +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/Ucache.cc +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/Ucache.h +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/arbiter.cc +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/arbiter.h +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/area.cc +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/area.h +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/bank.cc +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/bank.h +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/basic_circuit.cc +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/basic_circuit.h +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/cache.cfg_temp +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/cache_old.cfg.out +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/cacti +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/cacti.i +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/cacti.mk +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/cacti_config_creator.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/cacti_interface.cc +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/cacti_interface.h +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/cacti_top.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/component.cc +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/component.h +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/const.h +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/contention.dat +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/crossbar.cc +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/crossbar.h +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/ddr3.cfg +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/decoder.cc +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/decoder.h +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/dram.cfg +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/example_mem_pool.yaml +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/extio.cc +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/extio.h +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/extio_technology.cc +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/extio_technology.h +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/htree2.cc +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/htree2.h +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/io.cc +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/io.h +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/lpddr.cfg +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/main.cc +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/makefile +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/mat.cc +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/mat.h +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/memcad.cc +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/memcad.h +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/memcad_parameters.cc +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/memcad_parameters.h +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/memorybus.cc +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/memorybus.h +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/nuca.cc +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/nuca.h +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/obj_dbg/TSV.o +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/obj_dbg/Ucache.o +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/obj_dbg/arbiter.o +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/obj_dbg/area.o +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/obj_dbg/bank.o +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/obj_dbg/basic_circuit.o +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/obj_dbg/cacti +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/obj_dbg/cacti_interface.o +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/obj_dbg/component.o +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/obj_dbg/crossbar.o +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/obj_dbg/decoder.o +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/obj_dbg/extio.o +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/obj_dbg/extio_technology.o +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/obj_dbg/htree2.o +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/obj_dbg/io.o +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/obj_dbg/main.o +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/obj_dbg/mat.o +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/obj_dbg/memcad.o +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/obj_dbg/memcad_parameters.o +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/obj_dbg/memorybus.o +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/obj_dbg/nuca.o +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/obj_dbg/parameter.o +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/obj_dbg/powergating.o +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/obj_dbg/router.o +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/obj_dbg/subarray.o +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/obj_dbg/technology.o +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/obj_dbg/uca.o +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/obj_dbg/wire.o +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/parameter.cc +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/parameter.h +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/powergating.cc +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/powergating.h +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/regression.test +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/router.cc +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/router.h +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/sample_config_files/ddr3_cache.cfg +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/sample_config_files/diff_ddr3_cache.cfg +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/sample_config_files/lpddr3_cache.cfg +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/sample_config_files/wideio_cache.cfg +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/self_gen/cache.cfg.out +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/subarray.cc +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/subarray.h +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/tech_params/16nm.dat +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/tech_params/180nm-old.dat +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/tech_params/180nm.dat +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/tech_params/22nm.dat +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/tech_params/32nm.dat +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/tech_params/45nm.dat +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/tech_params/65nm-old.dat +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/tech_params/65nm.dat +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/tech_params/90nm-old.dat +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/tech_params/90nm.dat +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/technology.cc +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/uca.cc +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/uca.h +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/version_cacti.h +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/wire.cc +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_master/wire.h +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/cacti_parser.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cacti/self_gen/cache.cfg +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cost_model/__init__.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cost_model/cost_model.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cost_model/cost_model_imc.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/cost_model/port_activity.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/datatypes.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/hardware/architecture/__init__.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/hardware/architecture/accelerator.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/hardware/architecture/get_cacti_cost.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/hardware/architecture/imc_array.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/hardware/architecture/imc_unit.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/hardware/architecture/memory_hierarchy.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/hardware/architecture/memory_instance.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/hardware/architecture/memory_level.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/hardware/architecture/memory_port.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/hardware/architecture/operational_array.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/hardware/architecture/operational_unit.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/inputs/workload/alexnet.onnx +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/inputs/workload/mobilenetv2.onnx +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/inputs/workload/resnet18.onnx +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/mapping/__init__.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/mapping/data_movement.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/mapping/mapping.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/mapping/mapping_assist_funcs.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/mapping/spatial_mapping.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/mapping/spatial_mapping_internal.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/mapping/temporal_mapping.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/opt/__init__.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/opt/loma/__init__.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/opt/loma/engine.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/opt/loma/loop.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/opt/loma/memory_allocator.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/opt/loma/multipermute.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/opt/salsa/__init__.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/opt/salsa/engine.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/parser/__init__.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/parser/accelerator_factory.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/parser/accelerator_validator.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/parser/arguments.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/parser/onnx/__init__.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/parser/onnx/conv_parser.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/parser/onnx/default_node_parser.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/parser/onnx/gemm_parser.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/parser/onnx/matmul_parser.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/parser/onnx/onnx_model_parser.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/parser/onnx/onnx_operator_parser.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/parser/onnx/utils.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/parser/upgraded_validator.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/parser/workload_validator.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/py.typed +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/stages/__init__.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/stages/evaluation/cost_model_evaluation.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/stages/exploit_data_locality_stages.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/stages/main.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/stages/mapping/salsa.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/stages/mapping/spatial_mapping_conversion.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/stages/mapping/spatial_mapping_generation.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/stages/mapping/temporal_mapping_generator_stage.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/stages/parser/accelerator_parser.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/stages/parser/onnx_model_parser.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/stages/parser/workload_parser.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/stages/results/plot_temporal_mapping.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/stages/results/reduce_stages.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/stages/results/save.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/stages/results/visualization.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/stages/run_opt_stages.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/stages/stage.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/stages/workload_iterator.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/stages/workload_parser.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/utils.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/visualization/__init__.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/visualization/graph/__init__.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/visualization/graph/memory_hierarchy.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/visualization/graph/workload.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/visualization/results/__init__.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/visualization/results/plot_cme.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/visualization/results/print_mapping.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/workload/__init__.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/workload/dnn_workload.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/workload/layer_node_abc.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/workload/onnx_workload.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag/workload/workload_abc.py +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag_dse.egg-info/dependency_links.txt +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag_dse.egg-info/entry_points.txt +0 -0
- {zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/zigzag_dse.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: zigzag-dse
|
|
3
|
-
Version: 3.7.
|
|
3
|
+
Version: 3.7.2
|
|
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
|
|
@@ -42,14 +42,14 @@ Requires-Dist: multiprocessing_on_dill
|
|
|
42
42
|
Requires-Dist: pyyaml
|
|
43
43
|
Requires-Dist: cerberus
|
|
44
44
|
Requires-Dist: seaborn
|
|
45
|
+
Requires-Dist: typeguard
|
|
45
46
|
Provides-Extra: dev
|
|
46
47
|
Requires-Dist: bumpver; extra == "dev"
|
|
47
48
|
Requires-Dist: pip-tools; extra == "dev"
|
|
48
49
|
Requires-Dist: build; extra == "dev"
|
|
49
50
|
Requires-Dist: twine; extra == "dev"
|
|
50
51
|
Requires-Dist: pytest; extra == "dev"
|
|
51
|
-
Requires-Dist:
|
|
52
|
-
Requires-Dist: ruff; extra == "dev"
|
|
52
|
+
Requires-Dist: pre-commit; extra == "dev"
|
|
53
53
|
|
|
54
54
|
[](https://github.com/pylint-dev/pylint)
|
|
55
55
|
|
|
@@ -14,7 +14,7 @@ namespaces = true # true by default
|
|
|
14
14
|
|
|
15
15
|
[project]
|
|
16
16
|
name = "zigzag-dse"
|
|
17
|
-
version = "3.7.
|
|
17
|
+
version = "3.7.2"
|
|
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,13 +34,14 @@ dependencies = [
|
|
|
34
34
|
'multiprocessing_on_dill',
|
|
35
35
|
'pyyaml',
|
|
36
36
|
'cerberus',
|
|
37
|
-
'seaborn'
|
|
37
|
+
'seaborn',
|
|
38
|
+
'typeguard',
|
|
38
39
|
]
|
|
39
40
|
requires-python = ">=3.11"
|
|
40
41
|
|
|
41
42
|
|
|
42
43
|
[project.optional-dependencies]
|
|
43
|
-
dev = ["bumpver", "pip-tools", "build", "twine", 'pytest', '
|
|
44
|
+
dev = ["bumpver", "pip-tools", "build", "twine", 'pytest', 'pre-commit']
|
|
44
45
|
|
|
45
46
|
[project.urls]
|
|
46
47
|
Homepage = "https://github.com/KULeuven-MICAS/zigzag"
|
|
@@ -49,7 +50,7 @@ Homepage = "https://github.com/KULeuven-MICAS/zigzag"
|
|
|
49
50
|
realpython = "zigzag.__main__:main"
|
|
50
51
|
|
|
51
52
|
[tool.bumpver]
|
|
52
|
-
current_version = "3.7.
|
|
53
|
+
current_version = "3.7.2"
|
|
53
54
|
version_pattern = "MAJOR.MINOR.PATCH"
|
|
54
55
|
commit_message = "bump version {old_version} -> {new_version}"
|
|
55
56
|
commit = true
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "3.7.2"
|
|
@@ -31,7 +31,6 @@ from copy import deepcopy
|
|
|
31
31
|
from zigzag.cost_model.cost_model import CostModelEvaluation
|
|
32
32
|
from zigzag.datatypes import LayerDim, UnrollFactorInt
|
|
33
33
|
from zigzag.hardware.architecture.accelerator import Accelerator
|
|
34
|
-
from zigzag.hardware.architecture.memory_hierarchy import MemoryHierarchy
|
|
35
34
|
from zigzag.mapping.spatial_mapping_internal import SpatialMappingInternal
|
|
36
35
|
from zigzag.opt.loma.memory_allocator import MemoryAllocator
|
|
37
36
|
from zigzag.workload.layer_node import LayerNode
|
|
@@ -53,7 +52,7 @@ class SalsaState:
|
|
|
53
52
|
self.accelerator = accelerator
|
|
54
53
|
self.layer = layer
|
|
55
54
|
self.spatial_mapping = spatial_mapping
|
|
56
|
-
self.memory_hierarchy
|
|
55
|
+
self.memory_hierarchy = self.accelerator.memory_hierarchy
|
|
57
56
|
self.opt_criterion_name = opt_criterion_name
|
|
58
57
|
|
|
59
58
|
allocator = MemoryAllocator(self.accelerator, self.layer, self.spatial_mapping, ordering)
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
from typing import Any
|
|
3
|
+
|
|
4
|
+
from zigzag.datatypes import (
|
|
5
|
+
LayerDim,
|
|
6
|
+
LayerOperand,
|
|
7
|
+
MemoryOperand,
|
|
8
|
+
OADimension,
|
|
9
|
+
UnrollFactor,
|
|
10
|
+
)
|
|
11
|
+
from zigzag.mapping.spatial_mapping import (
|
|
12
|
+
MappingSingleOADim,
|
|
13
|
+
SpatialMapping,
|
|
14
|
+
SpatialMappingHint,
|
|
15
|
+
)
|
|
16
|
+
from zigzag.utils import UniqueMessageFilter
|
|
17
|
+
from zigzag.workload.layer_attributes import (
|
|
18
|
+
LayerTemporalOrdering,
|
|
19
|
+
MemoryOperandLinks,
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
logger = logging.getLogger(__name__)
|
|
23
|
+
logger.addFilter(UniqueMessageFilter())
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class MappingFactory:
|
|
27
|
+
"""Converts validated and normalized user-provided data into mapping-related instances.
|
|
28
|
+
The mapping for this layer is chosen according to the following priority:
|
|
29
|
+
1. The name of the layer
|
|
30
|
+
2. The operation type of the layer (if the layer name is not defined in the mapping)
|
|
31
|
+
3. The default mapping (if the operation type is not defined in the mapping)
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
def __init__(self, layer_name: str, operation_type: str, mapping_data: list[dict[str, Any]]):
|
|
35
|
+
"""
|
|
36
|
+
@param Name of the layer for which the Mapping is being constructed.
|
|
37
|
+
@param operation_type Name of the layer operation for which the Mapping is being constructed.
|
|
38
|
+
@param mapping_data user-given, validated and normalized mapping data for all operation types.
|
|
39
|
+
"""
|
|
40
|
+
if layer_name in map(lambda x: x["name"], mapping_data):
|
|
41
|
+
self.mapping_data: dict[str, Any] = next(filter(lambda x: x["name"] == layer_name, mapping_data))
|
|
42
|
+
elif operation_type in map(lambda x: x["name"], mapping_data):
|
|
43
|
+
self.mapping_data: dict[str, Any] = next(filter(lambda x: x["name"] == operation_type, mapping_data))
|
|
44
|
+
else:
|
|
45
|
+
self.mapping_data = next(filter(lambda x: x["name"] == "default", mapping_data))
|
|
46
|
+
logger.warning(
|
|
47
|
+
"Operator %s not defined in mapping. Using default mapping instead.",
|
|
48
|
+
operation_type,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
def create_spatial_mapping(self) -> SpatialMapping:
|
|
52
|
+
if self.mapping_data["spatial_mapping"] is None:
|
|
53
|
+
return SpatialMapping.empty()
|
|
54
|
+
|
|
55
|
+
user_data: dict[str, list[str]] = self.mapping_data["spatial_mapping"]
|
|
56
|
+
spatial_mapping_dict: dict[OADimension, MappingSingleOADim] = {}
|
|
57
|
+
|
|
58
|
+
for oa_dim_str, unrolling_list in user_data.items():
|
|
59
|
+
oa_dim = OADimension(oa_dim_str)
|
|
60
|
+
mapping_this_oa_dim = self.create_mapping_single_oa_dim(unrolling_list)
|
|
61
|
+
spatial_mapping_dict[oa_dim] = mapping_this_oa_dim
|
|
62
|
+
|
|
63
|
+
return SpatialMapping(spatial_mapping_dict)
|
|
64
|
+
|
|
65
|
+
def create_mapping_single_oa_dim(self, mapping_data: list[str]) -> MappingSingleOADim:
|
|
66
|
+
mapping_dict: dict[LayerDim, UnrollFactor] = {}
|
|
67
|
+
|
|
68
|
+
for single_unrolling in mapping_data:
|
|
69
|
+
layer_dim_str = single_unrolling.split(",")[0]
|
|
70
|
+
unrolling = int(single_unrolling.split(",")[-1])
|
|
71
|
+
layer_dim = LayerDim(layer_dim_str)
|
|
72
|
+
mapping_dict[layer_dim] = unrolling
|
|
73
|
+
|
|
74
|
+
return MappingSingleOADim(mapping_dict)
|
|
75
|
+
|
|
76
|
+
def create_spatial_mapping_hint(self) -> SpatialMappingHint:
|
|
77
|
+
if "spatial_mapping_hint" not in self.mapping_data or self.mapping_data["spatial_mapping_hint"] is None:
|
|
78
|
+
return SpatialMappingHint.empty()
|
|
79
|
+
|
|
80
|
+
user_data: dict[str, list[str]] = self.mapping_data["spatial_mapping_hint"]
|
|
81
|
+
mapping_hint_dict: dict[OADimension, set[LayerDim]] = {
|
|
82
|
+
OADimension(oa_dim_str): {LayerDim(layer_dim_str) for layer_dim_str in hint_list}
|
|
83
|
+
for oa_dim_str, hint_list in user_data.items()
|
|
84
|
+
}
|
|
85
|
+
return SpatialMappingHint(mapping_hint_dict)
|
|
86
|
+
|
|
87
|
+
def create_memory_operand_links(self) -> MemoryOperandLinks:
|
|
88
|
+
user_data: dict[str, str] = self.mapping_data["memory_operand_links"]
|
|
89
|
+
links_dict = {
|
|
90
|
+
LayerOperand(layer_op_str): MemoryOperand(mem_op_str) for layer_op_str, mem_op_str in user_data.items()
|
|
91
|
+
}
|
|
92
|
+
return MemoryOperandLinks(links_dict)
|
|
93
|
+
|
|
94
|
+
def create_temporal_ordering(self) -> LayerTemporalOrdering:
|
|
95
|
+
"""! This attribute lacks support within the MappingValidator. Returns an empty instance in case it is not
|
|
96
|
+
provided (to be compatible with older code) or raises an error if it is present in the user-provided data.
|
|
97
|
+
"""
|
|
98
|
+
if "temporal_ordering" not in self.mapping_data or not self.mapping_data["temporal_ordering"]:
|
|
99
|
+
return LayerTemporalOrdering.empty()
|
|
100
|
+
|
|
101
|
+
return LayerTemporalOrdering(self.mapping_data["temporal_ordering"])
|
|
@@ -12,12 +12,6 @@ class MappingValidator:
|
|
|
12
12
|
# Schema for a single operation, UpgradeValidator extrapolates to list of operations
|
|
13
13
|
SCHEMA_SINGLE = {
|
|
14
14
|
"name": {"type": "string", "required": True},
|
|
15
|
-
"core_allocation": {
|
|
16
|
-
"type": "list",
|
|
17
|
-
"schema": {"type": "integer"},
|
|
18
|
-
"default": [0],
|
|
19
|
-
},
|
|
20
|
-
"core_allocation_is_fixed": {"type": "boolean", "default": False},
|
|
21
15
|
"spatial_mapping": {
|
|
22
16
|
"type": "dict",
|
|
23
17
|
"schema": {
|
|
@@ -5,15 +5,9 @@ from typing import Any
|
|
|
5
5
|
from zigzag.datatypes import (
|
|
6
6
|
LayerDim,
|
|
7
7
|
LayerOperand,
|
|
8
|
-
MemoryOperand,
|
|
9
|
-
OADimension,
|
|
10
8
|
UnrollFactor,
|
|
11
9
|
)
|
|
12
|
-
from zigzag.
|
|
13
|
-
MappingSingleOADim,
|
|
14
|
-
SpatialMapping,
|
|
15
|
-
SpatialMappingHint,
|
|
16
|
-
)
|
|
10
|
+
from zigzag.parser.mapping_factory import MappingFactory
|
|
17
11
|
from zigzag.parser.workload_validator import WorkloadValidator
|
|
18
12
|
from zigzag.utils import UniqueMessageFilter
|
|
19
13
|
from zigzag.workload.dnn_workload import DNNWorkload
|
|
@@ -24,10 +18,8 @@ from zigzag.workload.layer_attributes import (
|
|
|
24
18
|
LayerEquation,
|
|
25
19
|
LayerOperandPrecision,
|
|
26
20
|
LayerPadding,
|
|
27
|
-
LayerTemporalOrdering,
|
|
28
|
-
MemoryOperandLinks,
|
|
29
21
|
)
|
|
30
|
-
from zigzag.workload.layer_node import LayerNode, LayerNodeAttributes
|
|
22
|
+
from zigzag.workload.layer_node import LayerNode, LayerNodeAttributes, MappingAttributes
|
|
31
23
|
|
|
32
24
|
logger = logging.getLogger(__name__)
|
|
33
25
|
logger.addFilter(UniqueMessageFilter())
|
|
@@ -54,10 +46,11 @@ class WorkloadFactory:
|
|
|
54
46
|
class LayerNodeFactory:
|
|
55
47
|
"""Creates a LayerNode instance from a validated and normalized user definition of a single workload layer"""
|
|
56
48
|
|
|
57
|
-
def __init__(self, node_data: dict[str, Any], mapping_data: list[dict[str, Any]]):
|
|
49
|
+
def __init__(self, node_data: dict[str, Any], mapping_data: list[dict[str, Any]] | None):
|
|
58
50
|
"""!
|
|
59
51
|
@node_data validated and normalized user-defined data for a single workload layer
|
|
60
|
-
@mapping_data validated and normalized user-defined data for all mappings
|
|
52
|
+
@mapping_data validated and normalized user-defined data for all mappings, or None is case no mapping-related
|
|
53
|
+
instances need to be constructed
|
|
61
54
|
"""
|
|
62
55
|
self.node_data = node_data
|
|
63
56
|
self.mapping_data = mapping_data
|
|
@@ -66,7 +59,13 @@ class LayerNodeFactory:
|
|
|
66
59
|
|
|
67
60
|
def create(self) -> LayerNode:
|
|
68
61
|
node_attr = self.create_node_attr()
|
|
69
|
-
|
|
62
|
+
mapping_attr = self.create_mapping_attr(node_attr.layer_dim_sizes)
|
|
63
|
+
return LayerNode(
|
|
64
|
+
layer_id=self.layer_id,
|
|
65
|
+
node_name=self.node_name,
|
|
66
|
+
node_attr=node_attr,
|
|
67
|
+
mapping_attr=mapping_attr,
|
|
68
|
+
)
|
|
70
69
|
|
|
71
70
|
def create_node_attr(self) -> LayerNodeAttributes:
|
|
72
71
|
# From node data
|
|
@@ -80,16 +79,6 @@ class LayerNodeFactory:
|
|
|
80
79
|
padding = self.create_padding()
|
|
81
80
|
pr_layer_dim_sizes = self.create_pr_layer_dim_sizes()
|
|
82
81
|
|
|
83
|
-
# From mapping data
|
|
84
|
-
mapping_factory = MappingFactory(self.node_name, layer_type, self.mapping_data)
|
|
85
|
-
spatial_mapping = mapping_factory.create_spatial_mapping()
|
|
86
|
-
spatial_mapping_hint = mapping_factory.create_spatial_mapping_hint()
|
|
87
|
-
core_allocation = mapping_factory.get_core_allocation()
|
|
88
|
-
core_allocation_is_fixed = mapping_factory.get_core_allocation_is_fixed()
|
|
89
|
-
memory_operand_links = mapping_factory.create_memory_operand_links()
|
|
90
|
-
temporal_ordering = mapping_factory.create_temporal_ordering()
|
|
91
|
-
temporal_ordering.remove_invalid_layer_dims(layer_dim_sizes, self.node_name)
|
|
92
|
-
|
|
93
82
|
return LayerNodeAttributes(
|
|
94
83
|
layer_type=layer_type,
|
|
95
84
|
equation=equation,
|
|
@@ -98,14 +87,27 @@ class LayerNodeFactory:
|
|
|
98
87
|
dimension_relations=dimension_relations,
|
|
99
88
|
constant_operands=constant_operands,
|
|
100
89
|
input_operand_source=input_operand_source,
|
|
90
|
+
padding=padding,
|
|
91
|
+
pr_layer_dim_sizes=pr_layer_dim_sizes,
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
def create_mapping_attr(self, layer_dim_sizes: LayerDimSizes):
|
|
95
|
+
assert self.mapping_data, "LayerNodeFactory is initialized with empty mapping data"
|
|
96
|
+
layer_type: str = self.node_data["operator_type"]
|
|
97
|
+
|
|
98
|
+
# From mapping data
|
|
99
|
+
mapping_factory = MappingFactory(self.node_name, layer_type, self.mapping_data)
|
|
100
|
+
spatial_mapping = mapping_factory.create_spatial_mapping()
|
|
101
|
+
spatial_mapping_hint = mapping_factory.create_spatial_mapping_hint()
|
|
102
|
+
memory_operand_links = mapping_factory.create_memory_operand_links()
|
|
103
|
+
temporal_ordering = mapping_factory.create_temporal_ordering()
|
|
104
|
+
temporal_ordering.remove_invalid_layer_dims(layer_dim_sizes, self.node_name)
|
|
105
|
+
|
|
106
|
+
return MappingAttributes(
|
|
101
107
|
spatial_mapping=spatial_mapping,
|
|
102
108
|
spatial_mapping_hint=spatial_mapping_hint,
|
|
103
|
-
core_allocation=core_allocation,
|
|
104
|
-
core_allocation_is_fixed=core_allocation_is_fixed,
|
|
105
109
|
memory_operand_links=memory_operand_links,
|
|
106
110
|
temporal_ordering=temporal_ordering,
|
|
107
|
-
padding=padding,
|
|
108
|
-
pr_layer_dim_sizes=pr_layer_dim_sizes,
|
|
109
111
|
)
|
|
110
112
|
|
|
111
113
|
def create_equation(self) -> LayerEquation:
|
|
@@ -183,87 +185,3 @@ class LayerNodeFactory:
|
|
|
183
185
|
pr_sizes: list[UnrollFactor] = self.node_data["pr_loop_sizes"]
|
|
184
186
|
size_dict = {layer_dim: size for layer_dim, size in zip(pr_layer_dims, pr_sizes)}
|
|
185
187
|
return LayerDimSizes(size_dict)
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
class MappingFactory:
|
|
189
|
-
"""Converts validated and normalized user-provided data into mapping-related instances.
|
|
190
|
-
The mapping for this layer is chosen according to the following priority:
|
|
191
|
-
1. The name of the layer
|
|
192
|
-
2. The operation type of the layer (if the layer name is not defined in the mapping)
|
|
193
|
-
3. The default mapping (if the operation type is not defined in the mapping)
|
|
194
|
-
"""
|
|
195
|
-
|
|
196
|
-
def __init__(self, layer_name: str, operation_type: str, mapping_data: list[dict[str, Any]]):
|
|
197
|
-
"""
|
|
198
|
-
@param Name of the layer for which the Mapping is being constructed.
|
|
199
|
-
@param operation_type Name of the layer operation for which the Mapping is being constructed.
|
|
200
|
-
@param mapping_data user-given, validated and normalized mapping data for all operation types.
|
|
201
|
-
"""
|
|
202
|
-
if layer_name in map(lambda x: x["name"], mapping_data):
|
|
203
|
-
self.mapping_data: dict[str, Any] = next(filter(lambda x: x["name"] == layer_name, mapping_data))
|
|
204
|
-
elif operation_type in map(lambda x: x["name"], mapping_data):
|
|
205
|
-
self.mapping_data: dict[str, Any] = next(filter(lambda x: x["name"] == operation_type, mapping_data))
|
|
206
|
-
else:
|
|
207
|
-
self.mapping_data = next(filter(lambda x: x["name"] == "default", mapping_data))
|
|
208
|
-
logger.warning(
|
|
209
|
-
"Operator %s not defined in mapping. Using default mapping instead.",
|
|
210
|
-
operation_type,
|
|
211
|
-
)
|
|
212
|
-
|
|
213
|
-
def get_core_allocation(self) -> list[int]:
|
|
214
|
-
return self.mapping_data["core_allocation"]
|
|
215
|
-
|
|
216
|
-
def get_core_allocation_is_fixed(self) -> bool:
|
|
217
|
-
return self.mapping_data["core_allocation_is_fixed"]
|
|
218
|
-
|
|
219
|
-
def create_spatial_mapping(self) -> SpatialMapping:
|
|
220
|
-
if self.mapping_data["spatial_mapping"] is None:
|
|
221
|
-
return SpatialMapping.empty()
|
|
222
|
-
|
|
223
|
-
user_data: dict[str, list[str]] = self.mapping_data["spatial_mapping"]
|
|
224
|
-
spatial_mapping_dict: dict[OADimension, MappingSingleOADim] = {}
|
|
225
|
-
|
|
226
|
-
for oa_dim_str, unrolling_list in user_data.items():
|
|
227
|
-
oa_dim = OADimension(oa_dim_str)
|
|
228
|
-
mapping_this_oa_dim = self.create_mapping_single_oa_dim(unrolling_list)
|
|
229
|
-
spatial_mapping_dict[oa_dim] = mapping_this_oa_dim
|
|
230
|
-
|
|
231
|
-
return SpatialMapping(spatial_mapping_dict)
|
|
232
|
-
|
|
233
|
-
def create_mapping_single_oa_dim(self, mapping_data: list[str]) -> MappingSingleOADim:
|
|
234
|
-
mapping_dict: dict[LayerDim, UnrollFactor] = {}
|
|
235
|
-
|
|
236
|
-
for single_unrolling in mapping_data:
|
|
237
|
-
layer_dim_str = single_unrolling.split(",")[0]
|
|
238
|
-
unrolling = int(single_unrolling.split(",")[-1])
|
|
239
|
-
layer_dim = LayerDim(layer_dim_str)
|
|
240
|
-
mapping_dict[layer_dim] = unrolling
|
|
241
|
-
|
|
242
|
-
return MappingSingleOADim(mapping_dict)
|
|
243
|
-
|
|
244
|
-
def create_spatial_mapping_hint(self) -> SpatialMappingHint:
|
|
245
|
-
if "spatial_mapping_hint" not in self.mapping_data or self.mapping_data["spatial_mapping_hint"] is None:
|
|
246
|
-
return SpatialMappingHint.empty()
|
|
247
|
-
|
|
248
|
-
user_data: dict[str, list[str]] = self.mapping_data["spatial_mapping_hint"]
|
|
249
|
-
mapping_hint_dict: dict[OADimension, set[LayerDim]] = {
|
|
250
|
-
OADimension(oa_dim_str): {LayerDim(layer_dim_str) for layer_dim_str in hint_list}
|
|
251
|
-
for oa_dim_str, hint_list in user_data.items()
|
|
252
|
-
}
|
|
253
|
-
return SpatialMappingHint(mapping_hint_dict)
|
|
254
|
-
|
|
255
|
-
def create_memory_operand_links(self) -> MemoryOperandLinks:
|
|
256
|
-
user_data: dict[str, str] = self.mapping_data["memory_operand_links"]
|
|
257
|
-
links_dict = {
|
|
258
|
-
LayerOperand(layer_op_str): MemoryOperand(mem_op_str) for layer_op_str, mem_op_str in user_data.items()
|
|
259
|
-
}
|
|
260
|
-
return MemoryOperandLinks(links_dict)
|
|
261
|
-
|
|
262
|
-
def create_temporal_ordering(self) -> LayerTemporalOrdering:
|
|
263
|
-
"""! This attribute lacks support within the MappingValidator. Returns an empty instance in case it is not
|
|
264
|
-
provided (to be compatible with older code) or raises an error if it is present in the user-provided data.
|
|
265
|
-
"""
|
|
266
|
-
if "temporal_ordering" not in self.mapping_data or not self.mapping_data["temporal_ordering"]:
|
|
267
|
-
return LayerTemporalOrdering.empty()
|
|
268
|
-
|
|
269
|
-
return LayerTemporalOrdering(self.mapping_data["temporal_ordering"])
|
|
@@ -34,3 +34,10 @@ class LayerAttribute(metaclass=ABCMeta):
|
|
|
34
34
|
|
|
35
35
|
def __eq__(self, other: object):
|
|
36
36
|
return isinstance(other, LayerAttribute) and self.data == other.data
|
|
37
|
+
|
|
38
|
+
def __hash__(self):
|
|
39
|
+
if isinstance(self.data, dict):
|
|
40
|
+
return hash(frozenset(self.data.items())) # type: ignore
|
|
41
|
+
elif isinstance(self.data, str):
|
|
42
|
+
return hash(self.data)
|
|
43
|
+
raise NotImplementedError
|
|
@@ -254,6 +254,9 @@ class LayerTemporalOrdering(LayerAttribute):
|
|
|
254
254
|
static_positions_and_sizes = StaticPositionsAndSizesConstraint(static_positions_and_sizes_dict)
|
|
255
255
|
return [static_positions, static_positions_and_sizes]
|
|
256
256
|
|
|
257
|
+
def __hash__(self):
|
|
258
|
+
return hash(tuple(tuple(x) for x in self.data))
|
|
259
|
+
|
|
257
260
|
|
|
258
261
|
class LayerPadding(LayerAttribute):
|
|
259
262
|
DEFAULT = (0, 0)
|
|
@@ -109,18 +109,22 @@ class LayerNodeAttributes:
|
|
|
109
109
|
layer_dim_sizes: LayerDimSizes
|
|
110
110
|
operand_precision: LayerOperandPrecision
|
|
111
111
|
dimension_relations: list[LayerDimRelation]
|
|
112
|
-
spatial_mapping: SpatialMapping
|
|
113
|
-
spatial_mapping_hint: SpatialMappingHint
|
|
114
|
-
core_allocation: list[int]
|
|
115
|
-
core_allocation_is_fixed: bool
|
|
116
|
-
memory_operand_links: MemoryOperandLinks
|
|
117
|
-
temporal_ordering: LayerTemporalOrdering
|
|
118
112
|
padding: LayerPadding
|
|
119
113
|
constant_operands: list[LayerOperand]
|
|
120
114
|
input_operand_source: InputOperandSource
|
|
121
115
|
pr_layer_dim_sizes: LayerDimSizes | None
|
|
122
116
|
|
|
123
117
|
|
|
118
|
+
@dataclass
|
|
119
|
+
class MappingAttributes:
|
|
120
|
+
"""Packs the attributes needed to initialize a LayerNode, related to the mapping"""
|
|
121
|
+
|
|
122
|
+
spatial_mapping: SpatialMapping
|
|
123
|
+
spatial_mapping_hint: SpatialMappingHint
|
|
124
|
+
memory_operand_links: MemoryOperandLinks
|
|
125
|
+
temporal_ordering: LayerTemporalOrdering
|
|
126
|
+
|
|
127
|
+
|
|
124
128
|
class LayerNode(LayerNodeABC):
|
|
125
129
|
"""! Represents a single layer in a workload."""
|
|
126
130
|
|
|
@@ -131,8 +135,6 @@ class LayerNode(LayerNodeABC):
|
|
|
131
135
|
dimension_relations: list[LayerDimRelation]
|
|
132
136
|
spatial_mapping: SpatialMapping
|
|
133
137
|
spatial_mapping_hint: SpatialMappingHint
|
|
134
|
-
core_allocation: list[int]
|
|
135
|
-
core_allocation_is_fixed: bool
|
|
136
138
|
memory_operand_links: MemoryOperandLinks
|
|
137
139
|
temporal_ordering: LayerTemporalOrdering
|
|
138
140
|
padding: LayerPadding
|
|
@@ -145,7 +147,7 @@ class LayerNode(LayerNodeABC):
|
|
|
145
147
|
pr_loop: PrLoop
|
|
146
148
|
pr_layer_dim_sizes: LayerDimSizes | None
|
|
147
149
|
|
|
148
|
-
def __init__(self, layer_id: int, node_name: str, node_attr: LayerNodeAttributes):
|
|
150
|
+
def __init__(self, layer_id: int, node_name: str, node_attr: LayerNodeAttributes, mapping_attr: MappingAttributes):
|
|
149
151
|
"""
|
|
150
152
|
To construct each layer node, algorithm equation/dimension/indirect relation are parsed.
|
|
151
153
|
This parser collects information of operand, loop dimension, and loop relevance.
|
|
@@ -161,17 +163,16 @@ class LayerNode(LayerNodeABC):
|
|
|
161
163
|
self.layer_dim_sizes = node_attr.layer_dim_sizes
|
|
162
164
|
self.operand_precision = node_attr.operand_precision
|
|
163
165
|
self.dimension_relations = node_attr.dimension_relations
|
|
164
|
-
self.spatial_mapping = node_attr.spatial_mapping
|
|
165
|
-
self.spatial_mapping_hint = node_attr.spatial_mapping_hint
|
|
166
|
-
self.core_allocation = node_attr.core_allocation
|
|
167
|
-
self.core_allocation_is_fixed = node_attr.core_allocation_is_fixed
|
|
168
|
-
self.memory_operand_links = node_attr.memory_operand_links
|
|
169
|
-
self.temporal_ordering = node_attr.temporal_ordering
|
|
170
166
|
self.padding = node_attr.padding
|
|
171
167
|
self.constant_operands = node_attr.constant_operands
|
|
172
168
|
self.input_operand_source = node_attr.input_operand_source
|
|
173
169
|
pr_layer_dim_sizes = node_attr.pr_layer_dim_sizes
|
|
174
170
|
|
|
171
|
+
self.spatial_mapping = mapping_attr.spatial_mapping
|
|
172
|
+
self.spatial_mapping_hint = mapping_attr.spatial_mapping_hint
|
|
173
|
+
self.memory_operand_links = mapping_attr.memory_operand_links
|
|
174
|
+
self.temporal_ordering = mapping_attr.temporal_ordering
|
|
175
|
+
|
|
175
176
|
# Derived attributes
|
|
176
177
|
self.layer_operands = self.equation.get_contained_operands()
|
|
177
178
|
self.output_operand = self.layer_operands[0]
|
|
@@ -254,8 +255,6 @@ class LayerNode(LayerNodeABC):
|
|
|
254
255
|
"equation_relations": self.dimension_relations,
|
|
255
256
|
"loop_dimensions": self.layer_dim_sizes,
|
|
256
257
|
"operand_precision": self.operand_precision,
|
|
257
|
-
"core_allocation": self.core_allocation,
|
|
258
|
-
"core_allocation_is_fixed": self.core_allocation_is_fixed,
|
|
259
258
|
"user_spatial_mapping": self.spatial_mapping,
|
|
260
259
|
"memory_operand_links": self.memory_operand_links,
|
|
261
260
|
}
|
|
@@ -357,12 +356,6 @@ class LayerNode(LayerNodeABC):
|
|
|
357
356
|
layer_dim_sizes=self.layer_dim_sizes,
|
|
358
357
|
operand_precision=self.operand_precision,
|
|
359
358
|
dimension_relations=self.dimension_relations,
|
|
360
|
-
spatial_mapping=self.spatial_mapping,
|
|
361
|
-
spatial_mapping_hint=self.spatial_mapping_hint,
|
|
362
|
-
core_allocation=self.core_allocation,
|
|
363
|
-
core_allocation_is_fixed=self.core_allocation_is_fixed,
|
|
364
|
-
memory_operand_links=self.memory_operand_links,
|
|
365
|
-
temporal_ordering=self.temporal_ordering,
|
|
366
359
|
padding=self.padding,
|
|
367
360
|
constant_operands=self.constant_operands,
|
|
368
361
|
input_operand_source=self.input_operand_source,
|
|
@@ -370,3 +363,12 @@ class LayerNode(LayerNodeABC):
|
|
|
370
363
|
)
|
|
371
364
|
# Make sure the new attributes don't simply point to the old instances
|
|
372
365
|
return deepcopy(attributes)
|
|
366
|
+
|
|
367
|
+
def extract_mapping_attr(self) -> MappingAttributes:
|
|
368
|
+
attributes = MappingAttributes(
|
|
369
|
+
spatial_mapping=self.spatial_mapping,
|
|
370
|
+
spatial_mapping_hint=self.spatial_mapping_hint,
|
|
371
|
+
memory_operand_links=self.memory_operand_links,
|
|
372
|
+
temporal_ordering=self.temporal_ordering,
|
|
373
|
+
)
|
|
374
|
+
return deepcopy(attributes)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: zigzag-dse
|
|
3
|
-
Version: 3.7.
|
|
3
|
+
Version: 3.7.2
|
|
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
|
|
@@ -42,14 +42,14 @@ Requires-Dist: multiprocessing_on_dill
|
|
|
42
42
|
Requires-Dist: pyyaml
|
|
43
43
|
Requires-Dist: cerberus
|
|
44
44
|
Requires-Dist: seaborn
|
|
45
|
+
Requires-Dist: typeguard
|
|
45
46
|
Provides-Extra: dev
|
|
46
47
|
Requires-Dist: bumpver; extra == "dev"
|
|
47
48
|
Requires-Dist: pip-tools; extra == "dev"
|
|
48
49
|
Requires-Dist: build; extra == "dev"
|
|
49
50
|
Requires-Dist: twine; extra == "dev"
|
|
50
51
|
Requires-Dist: pytest; extra == "dev"
|
|
51
|
-
Requires-Dist:
|
|
52
|
-
Requires-Dist: ruff; extra == "dev"
|
|
52
|
+
Requires-Dist: pre-commit; extra == "dev"
|
|
53
53
|
|
|
54
54
|
[](https://github.com/pylint-dev/pylint)
|
|
55
55
|
|
|
@@ -186,6 +186,7 @@ zigzag/parser/__init__.py
|
|
|
186
186
|
zigzag/parser/accelerator_factory.py
|
|
187
187
|
zigzag/parser/accelerator_validator.py
|
|
188
188
|
zigzag/parser/arguments.py
|
|
189
|
+
zigzag/parser/mapping_factory.py
|
|
189
190
|
zigzag/parser/mapping_validator.py
|
|
190
191
|
zigzag/parser/upgraded_validator.py
|
|
191
192
|
zigzag/parser/workload_factory.py
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "3.7.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/tests/main/test_with_exploit_data_locality/__init__.py
RENAMED
|
File without changes
|
{zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/tests/main/test_with_exploit_data_locality/test_ascend_like.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/tests/main/test_with_exploit_data_locality/test_tpu_like.py
RENAMED
|
File without changes
|
|
File without changes
|
{zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/tests/main/test_with_mix_spatial_mapping/test_ascend_like.py
RENAMED
|
File without changes
|
{zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/tests/main/test_with_mix_spatial_mapping/test_edge_tpu_like.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{zigzag_dse-3.7.0 → zigzag_dse-3.7.2}/tests/main/test_with_mix_spatial_mapping/test_tpu_like.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|