stream-dse 2.1.0__tar.gz → 2.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {stream_dse-2.1.0 → stream_dse-2.2.0}/PKG-INFO +8 -7
- {stream_dse-2.1.0 → stream_dse-2.2.0}/README.md +6 -6
- {stream_dse-2.1.0 → stream_dse-2.2.0}/pyproject.toml +11 -8
- stream_dse-2.2.0/stream/__init__.py +1 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/aie_setup.py +2 -2
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/allocation/allocation.py +77 -11
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/allocation/lowering.py +361 -283
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/allocation/problem.py +8 -4
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/allocation/solution.py +9 -9
- stream_dse-2.2.0/stream/allocation/steady_state.py +173 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/api.py +23 -11
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/compiler/transforms/aie_convert_ofs.py +46 -38
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/compiler/transforms/aie_dispatch.py +11 -9
- stream_dse-2.2.0/stream/compiler/transforms/aie_tiles.py +30 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/cost_model/bandwidth.py +11 -0
- stream_dse-2.2.0/stream/cost_model/communication_manager.py +580 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/cost_model/core_cost_lut.py +1 -1
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/cost_model/memory_accesses.py +37 -31
- stream_dse-2.2.0/stream/cost_model/roofline.py +263 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/datatypes.py +4 -0
- stream_dse-2.2.0/stream/hardware/architecture/accelerator.py +210 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/hardware/architecture/backends/__init__.py +3 -2
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/hardware/architecture/backends/aie2.py +18 -6
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/hardware/architecture/backends/zigzag.py +57 -10
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/hardware/architecture/core.py +23 -8
- stream_dse-2.2.0/stream/hardware/architecture/memory.py +133 -0
- stream_dse-2.2.0/stream/hardware/architecture/noc/communication_link.py +83 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/hardware/bundle.py +0 -5
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/hardware/cost.py +109 -101
- stream_dse-2.2.0/stream/hardware/ports.py +280 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/inputs/aie/hardware/cores/aie_tile.yaml +6 -7
- stream_dse-2.2.0/stream/inputs/aie/hardware/single_col.yaml +86 -0
- stream_dse-2.2.0/stream/inputs/aie/hardware/single_core.yaml +46 -0
- stream_dse-2.2.0/stream/inputs/aie/hardware/whole_array.yaml +365 -0
- stream_dse-2.2.0/stream/inputs/aie/hardware/whole_array_strix.yaml +735 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/inputs/aie/mapping/make_gemm_mapping.py +5 -2
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/inputs/aie/mapping/make_swiglu_mapping.py +7 -13
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/inputs/aie/workload/make_onnx_gemm.py +4 -2
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/inputs/aie/workload/make_onnx_swiglu.py +9 -22
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/inputs/examples/hardware/cores/fusemax_vec.yaml +1 -1
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/inputs/examples/hardware/cores/simba_chiplet.yaml +5 -6
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/inputs/examples/hardware/cores/tpu_v7_mxu.yaml +1 -1
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/inputs/examples/hardware/cores/tpu_v7_vmem.yaml +3 -4
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/inputs/examples/hardware/cores/tpu_v7_vpu.yaml +3 -7
- stream_dse-2.2.0/stream/inputs/examples/hardware/eyeriss_like_dual_core.yaml +68 -0
- stream_dse-2.2.0/stream/inputs/examples/hardware/eyeriss_like_quad_core.yaml +103 -0
- stream_dse-2.2.0/stream/inputs/examples/hardware/eyeriss_like_single_core.yaml +57 -0
- stream_dse-2.2.0/stream/inputs/examples/hardware/fusemax.yaml +33 -0
- stream_dse-2.2.0/stream/inputs/examples/hardware/meta_prototype_dual_core_simd_offchip.yaml +99 -0
- stream_dse-2.2.0/stream/inputs/examples/hardware/simba.yaml +345 -0
- stream_dse-2.2.0/stream/inputs/examples/hardware/simba_small.yaml +75 -0
- stream_dse-2.2.0/stream/inputs/examples/hardware/tpu_like_quad_core.yaml +143 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/inputs/examples/hardware/tpu_v7_ironwood.yaml +60 -24
- stream_dse-2.2.0/stream/inputs/testing/hardware/cores/pooling.yaml +45 -0
- stream_dse-2.2.0/stream/inputs/testing/hardware/cores/shared_testing_core1.yaml +43 -0
- stream_dse-2.2.0/stream/inputs/testing/hardware/cores/shared_testing_core2.yaml +43 -0
- stream_dse-2.2.0/stream/inputs/testing/hardware/cores/simd.yaml +45 -0
- stream_dse-2.2.0/stream/inputs/testing/hardware/cores/testing_core1.yaml +185 -0
- stream_dse-2.2.0/stream/inputs/testing/hardware/cores/testing_core2.yaml +185 -0
- stream_dse-2.2.0/stream/inputs/testing/hardware/cores/tpu_like.yaml +102 -0
- stream_dse-2.2.0/stream/inputs/testing/hardware/tpu_like_quad_core.yaml +145 -0
- stream_dse-2.2.0/stream/inputs/testing/hardware/tpu_like_ring_hbm.yaml +68 -0
- stream_dse-2.2.0/stream/inputs/testing/hardware/tpu_v7_ironwood_hbm_per_chiplet.yaml +117 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/inputs/testing/mapping/make_2_conv_mapping.py +5 -6
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/inputs/testing/workload/make_2_conv.py +5 -14
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/inputs/testing/workload/make_conv_relu_flatten_gemm.py +5 -10
- stream_dse-2.2.0/stream/inputs/testing/workload/make_decode_attention.py +95 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/inputs/testing/workload/make_resnet_subgraph.py +5 -15
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/ir/accelerator.py +26 -23
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/ir/allocation.py +135 -23
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/ir/infeasibility.py +4 -4
- stream_dse-2.2.0/stream/ir/roofline.py +106 -0
- stream_dse-2.2.0/stream/mapping/capacity_tiler.py +625 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/mapping/generic_generator.py +287 -137
- stream_dse-2.2.0/stream/mapping/mapping.py +647 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/opt/allocation/constraint_optimization/allocation_model.py +7 -7
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/opt/allocation/constraint_optimization/diagnosis.py +68 -45
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/opt/allocation/constraint_optimization/families/__init__.py +4 -3
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/opt/allocation/constraint_optimization/families/aie2.py +41 -28
- stream_dse-2.2.0/stream/opt/allocation/constraint_optimization/families/dma.py +187 -0
- stream_dse-2.2.0/stream/opt/allocation/constraint_optimization/families/energy.py +111 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/opt/allocation/constraint_optimization/families/latency.py +1 -1
- stream_dse-2.2.0/stream/opt/allocation/constraint_optimization/families/memory.py +451 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/opt/allocation/constraint_optimization/families/memory_ports.py +23 -23
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/opt/allocation/constraint_optimization/families/offchip.py +10 -3
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/opt/allocation/constraint_optimization/families/overlap.py +46 -46
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/opt/allocation/constraint_optimization/families/reuse.py +5 -5
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/opt/allocation/constraint_optimization/families/routing.py +38 -31
- stream_dse-2.2.0/stream/opt/allocation/constraint_optimization/families/traffic.py +156 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/opt/allocation/constraint_optimization/formulation.py +27 -44
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/opt/allocation/constraint_optimization/hardware.py +17 -25
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/opt/allocation/constraint_optimization/layouts.py +3 -4
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/opt/allocation/constraint_optimization/report.py +79 -64
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/opt/allocation/constraint_optimization/space.py +166 -119
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/opt/allocation/constraint_optimization/utils.py +6 -2
- stream_dse-2.2.0/stream/parser/accelerator_factory.py +166 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/parser/accelerator_validator.py +327 -153
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/parser/core_validator.py +9 -26
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/parser/mapping_factory.py +42 -12
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/parser/mapping_validator.py +13 -11
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/parser/onnx/conv.py +13 -7
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/parser/onnx/gemm.py +4 -2
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/parser/onnx/model.py +1 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/parser/onnx/normalization.py +8 -3
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/parser/onnx/utils.py +37 -1
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/stages/allocation/steady_state_allocation.py +1 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/stages/allocation/steady_state_lowering.py +4 -1
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/stages/codegen/aie_code_generation.py +82 -40
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/stages/estimation/memory_accesses_estimation.py +57 -16
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/stages/estimation/zigzag_cost_estimator.py +43 -23
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/stages/generation/fixed_mapping_generation.py +4 -19
- stream_dse-2.2.0/stream/stages/generation/flash_decoding.py +107 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/stages/generation/fusion_group_iteration.py +65 -5
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/stages/generation/generic_mapping_generation.py +3 -1
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/stages/generation/mapping_generators.py +4 -2
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/stages/generation/placement_generation.py +3 -2
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/stages/generation/tiling_generation.py +3 -1
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/stages/parsing/accelerator_parser.py +9 -3
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/stages/parsing/onnx_model_parser.py +15 -9
- stream_dse-2.2.0/stream/visualization/hardware_graph.py +206 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/visualization/steady_state_trace.py +6 -13
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/workload/_svg.py +17 -4
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/workload/affine_access.py +10 -3
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/workload/node.py +29 -2
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/workload/normalization.py +108 -8
- stream_dse-2.2.0/stream/workload/rewrites/flash_decoding.py +336 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/workload/utils.py +29 -8
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/workload/workload.py +128 -75
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream_dse.egg-info/PKG-INFO +8 -7
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream_dse.egg-info/SOURCES.txt +25 -5
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream_dse.egg-info/requires.txt +1 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/tests/test_accelerator_ir.py +31 -39
- {stream_dse-2.1.0 → stream_dse-2.2.0}/tests/test_co.py +2 -2
- {stream_dse-2.1.0 → stream_dse-2.2.0}/tests/test_conv_windows.py +18 -1
- {stream_dse-2.1.0 → stream_dse-2.2.0}/tests/test_core_validation.py +13 -1
- {stream_dse-2.1.0 → stream_dse-2.2.0}/tests/test_data_layout.py +15 -3
- stream_dse-2.2.0/tests/test_decode_attention.py +58 -0
- stream_dse-2.2.0/tests/test_decode_kv.py +543 -0
- stream_dse-2.2.0/tests/test_edge_placements.py +490 -0
- stream_dse-2.2.0/tests/test_generic_mapping.py +524 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/tests/test_hardware_bundle.py +90 -53
- {stream_dse-2.1.0 → stream_dse-2.2.0}/tests/test_hardware_combinations.py +32 -5
- stream_dse-2.2.0/tests/test_on_chip_placement.py +234 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/tests/test_precision.py +27 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/tests/test_resnet_patterns.py +8 -8
- stream_dse-2.2.0/tests/test_roofline.py +182 -0
- stream_dse-2.2.0/tests/test_steady_state_detail.py +185 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/tests/test_tpu_v7.py +51 -7
- stream_dse-2.1.0/stream/__init__.py +0 -1
- stream_dse-2.1.0/stream/cost_model/communication_manager.py +0 -378
- stream_dse-2.1.0/stream/hardware/architecture/accelerator.py +0 -156
- stream_dse-2.1.0/stream/hardware/architecture/noc/communication_link.py +0 -92
- stream_dse-2.1.0/stream/hardware/ports.py +0 -170
- stream_dse-2.1.0/stream/inputs/aie/hardware/cores/shim_dma.yaml +0 -15
- stream_dse-2.1.0/stream/inputs/aie/hardware/single_col.yaml +0 -37
- stream_dse-2.1.0/stream/inputs/aie/hardware/single_core.yaml +0 -21
- stream_dse-2.1.0/stream/inputs/aie/hardware/whole_array.yaml +0 -169
- stream_dse-2.1.0/stream/inputs/aie/hardware/whole_array_strix.yaml +0 -343
- stream_dse-2.1.0/stream/inputs/examples/hardware/cores/fusemax_dram.yaml +0 -43
- stream_dse-2.1.0/stream/inputs/examples/hardware/cores/offchip.yaml +0 -32
- stream_dse-2.1.0/stream/inputs/examples/hardware/cores/simba_offchip.yaml +0 -32
- stream_dse-2.1.0/stream/inputs/examples/hardware/cores/tpu_v7_hbm.yaml +0 -43
- stream_dse-2.1.0/stream/inputs/examples/hardware/eyeriss_like_dual_core.yaml +0 -31
- stream_dse-2.1.0/stream/inputs/examples/hardware/eyeriss_like_quad_core.yaml +0 -46
- stream_dse-2.1.0/stream/inputs/examples/hardware/eyeriss_like_single_core.yaml +0 -25
- stream_dse-2.1.0/stream/inputs/examples/hardware/fusemax.yaml +0 -27
- stream_dse-2.1.0/stream/inputs/examples/hardware/meta_prototype_dual_core_simd_offchip.yaml +0 -39
- stream_dse-2.1.0/stream/inputs/examples/hardware/simba.yaml +0 -123
- stream_dse-2.1.0/stream/inputs/examples/hardware/simba_small.yaml +0 -32
- stream_dse-2.1.0/stream/inputs/examples/hardware/tpu_like_quad_core.yaml +0 -71
- stream_dse-2.1.0/stream/mapping/capacity_tiler.py +0 -371
- stream_dse-2.1.0/stream/mapping/mapping.py +0 -302
- stream_dse-2.1.0/stream/opt/allocation/constraint_optimization/families/dma.py +0 -130
- stream_dse-2.1.0/stream/opt/allocation/constraint_optimization/families/energy.py +0 -52
- stream_dse-2.1.0/stream/opt/allocation/constraint_optimization/families/memory.py +0 -365
- stream_dse-2.1.0/stream/opt/allocation/constraint_optimization/families/traffic.py +0 -116
- stream_dse-2.1.0/stream/parser/accelerator_factory.py +0 -238
- stream_dse-2.1.0/tests/test_generic_mapping.py +0 -292
- {stream_dse-2.1.0 → stream_dse-2.2.0}/LICENSE +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/setup.cfg +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/allocation/__init__.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/allocation/artifacts.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/compiler/context/aie_context.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/compiler/dialects/__init__.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/compiler/dialects/stream.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/compiler/fifo_depths.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/compiler/kernels/__init__.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/compiler/kernels/aie_kernel.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/compiler/kernels/binding.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/compiler/kernels/eltwise_mul.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/compiler/kernels/flash.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/compiler/kernels/gemm.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/compiler/kernels/library.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/compiler/kernels/mlir_aie.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/compiler/kernels/registry.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/compiler/kernels/silu.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/compiler/kernels/softmax.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/compiler/transforms/__init__.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/compiler/transforms/aie_add_tracing_script.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/compiler/transforms/aie_move_tile_ops_up.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/compiler/transforms/clear_memory_space.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/compiler/transforms/convert_aie_kernels.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/compiler/transforms/convert_stream_to_aie.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/compiler/transforms/hoist_scale_acquires.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/compiler/transforms/iteration_space_to_for.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/compiler/transforms/unroll.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/cost_model/core_cost.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/cost_model/layout.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/frontends/__init__.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/frontends/onnx.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/frontends/torch_export.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/inputs/aie/hardware/cores/mem_tile_256KB.yaml +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/inputs/aie/hardware/cores/mem_tile_512KB.yaml +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/inputs/aie/kernels/aie2p.toml +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/inputs/examples/hardware/cores/eyeriss_like.yaml +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/inputs/examples/hardware/cores/fusemax_array.yaml +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/inputs/examples/hardware/cores/meta_prototype.yaml +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/inputs/examples/hardware/cores/pooling.yaml +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/inputs/examples/hardware/cores/simd.yaml +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/inputs/examples/hardware/cores/tpu_like.yaml +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/inputs/testing/workload/make_attention_head.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/inputs/testing/workload/make_scan.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/inputs/testing/workload/make_swiglu.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/instrumentation.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/ir/__init__.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/ir/graph_view.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/ir/workload.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/mapping/blocks.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/mapping/chain_placement.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/mapping/work_share.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/mcp/__init__.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/mcp/jobs.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/mcp/server.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/opt/__init__.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/opt/allocation/__init__.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/opt/allocation/constraint_optimization/__init__.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/opt/allocation/constraint_optimization/quantities.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/opt/solver/__init__.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/opt/solver/solver.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/parser/mapping_parser.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/parser/onnx/batch_norm.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/parser/onnx/einsum.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/parser/onnx/elementwise.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/parser/onnx/global_average_pool.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/parser/onnx/layout.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/parser/onnx/matmul.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/parser/onnx/max_pool.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/parser/onnx/operator_parser.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/parser/onnx/reduce.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/parser/onnx/slice_gather.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/plugins.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/profiling.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/stages/__init__.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/stages/codegen/backends.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/stages/context.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/stages/estimation/aie_cost_estimator.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/stages/estimation/core_cost_backends.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/stages/estimation/core_cost_estimation.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/stages/generation/fusion_analysis.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/stages/generation/fusion_proposal.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/stages/generation/kernel_state.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/stages/generation/normalization_expansion.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/stages/generation/structural_dedup.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/stages/generation/tile_search.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/stages/stage.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/workload/access_relation.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/workload/affine_exact.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/workload/affine_transform.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/workload/blocks/__init__.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/workload/blocks/library.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/workload/data_movement.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/workload/decompose.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/workload/fusion/__init__.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/workload/fusion/analysis.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/workload/fusion/proposer.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/workload/iterator_type.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/workload/models.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/workload/node_key.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/workload/rewrites/__init__.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/workload/rewrites/base.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/workload/rewrites/flash_attention.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/workload/rewrites/reference.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/workload/steady_state/computation.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/workload/steady_state/iteration_space.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/workload/steady_state/node.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/workload/structure/__init__.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/workload/structure/block_detect.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/workload/structure/wl.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream/workload/tensor.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream_dse.egg-info/dependency_links.txt +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream_dse.egg-info/entry_points.txt +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/stream_dse.egg-info/top_level.txt +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/tests/test_ci_workflow.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/tests/test_core_cost_lut_caching.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/tests/test_layout_einsum_reduce.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/tests/test_metrics_capture.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/tests/test_render_metrics_comment.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/tests/test_resnet_mapping.py +0 -0
- {stream_dse-2.1.0 → stream_dse-2.2.0}/tests/test_systolic.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: stream-dse
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.2.0
|
|
4
4
|
Summary: Stream - Multi-core accelerator design space exploration with layer-fused scheduling
|
|
5
5
|
Author-email: Arne Symons <arne.symons@kuleuven.be>, Linyan Mei <linyan.mei@kuleuven.be>
|
|
6
6
|
License: MIT License
|
|
@@ -33,6 +33,7 @@ Requires-Python: >=3.12
|
|
|
33
33
|
Description-Content-Type: text/markdown
|
|
34
34
|
License-File: LICENSE
|
|
35
35
|
Requires-Dist: zigzag-dse==3.9.1
|
|
36
|
+
Requires-Dist: six
|
|
36
37
|
Requires-Dist: cerberus
|
|
37
38
|
Requires-Dist: ortools>=9.15
|
|
38
39
|
Requires-Dist: pydantic<2.12,>=2.0
|
|
@@ -62,7 +63,7 @@ Dynamic: license-file
|
|
|
62
63
|
[](https://www.python.org/)
|
|
63
64
|
[](https://kuleuven-micas.github.io/stream/)
|
|
64
65
|
|
|
65
|
-
**Stream** is a design space exploration (DSE) and constraint-optimization framework for **heterogeneous dataflow accelerators**: accelerator systems built by combining cores that each have their own dataflow and performance model (**AIE** and **TPU-like** are two example core types among others). Scheduling is **layer-fused**, and the **constraint optimization** uses MILP (Mixed-Integer Linear Programming) to decide tensor placement and transfer paths
|
|
66
|
+
**Stream** is a design space exploration (DSE) and constraint-optimization framework for **heterogeneous dataflow accelerators**: accelerator systems built by combining cores that each have their own dataflow and performance model (**AIE** and **TPU-like** are two example core types among others). Scheduling is **layer-fused**, and the **constraint optimization** uses MILP (Mixed-Integer Linear Programming) to decide tensor placement and transfer paths between memories. Stream builds on top of [ZigZag](https://zigzag-project.github.io/zigzag/) for per-core cost estimation.
|
|
66
67
|
|
|
67
68
|
### 📖 [**Explore the Documentation**](https://kuleuven-micas.github.io/stream/)
|
|
68
69
|
### 🚀 [**Getting Started Guide**](https://kuleuven-micas.github.io/stream/getting-started/)
|
|
@@ -138,13 +139,13 @@ Price a small two-Conv workload (a committed test fixture) on a TPU-like quad-co
|
|
|
138
139
|
|
|
139
140
|
## 🧩 Hardware and Core Types
|
|
140
141
|
|
|
141
|
-
An accelerator in Stream is described as a **system of heterogeneous dataflow cores
|
|
142
|
+
An accelerator in Stream is described as a **system of heterogeneous dataflow cores** that compute out of **memories**, joined by links and buses. Several cores can share one memory, and off-chip DRAM is a memory too. Example dataflow core types include **AIE**, **TPU-like**, and **pooling**. See the [Hardware docs](https://kuleuven-micas.github.io/stream/hardware/) for the format.
|
|
142
143
|
|
|
143
144
|
Hardware and mapping files are organized as follows:
|
|
144
145
|
|
|
145
146
|
- `stream/inputs/examples/hardware/` - system-level hardware YAMLs (e.g. `tpu_like_quad_core.yaml`, `eyeriss_like_*.yaml`, `simba*.yaml`, `fusemax.yaml`).
|
|
146
|
-
- `stream/inputs/examples/hardware/cores/` - per-core-type YAMLs (e.g. `tpu_like.yaml`, `pooling.yaml`, `simd.yaml`, `
|
|
147
|
-
- `stream/inputs/aie/hardware/` and `stream/inputs/aie/hardware/cores/` - AMD AIE example core types (e.g. `aie_tile.yaml`, `mem_tile_256KB.yaml
|
|
147
|
+
- `stream/inputs/examples/hardware/cores/` - per-core-type YAMLs (e.g. `tpu_like.yaml`, `pooling.yaml`, `simd.yaml`, `eyeriss_like.yaml`).
|
|
148
|
+
- `stream/inputs/aie/hardware/` and `stream/inputs/aie/hardware/cores/` - AMD AIE example core types (e.g. `aie_tile.yaml`, `mem_tile_256KB.yaml`).
|
|
148
149
|
- `stream/inputs/examples/mapping/`, `stream/inputs/aie/mapping/`, and `stream/inputs/testing/mapping/` - mapping descriptions.
|
|
149
150
|
|
|
150
151
|
A mapping can be generated (as in Quick Start above) or hand-written and passed as `mapping`.
|
|
@@ -210,9 +211,9 @@ with tempfile.TemporaryDirectory() as tmp:
|
|
|
210
211
|
print("cycles:", estimate.cycles)
|
|
211
212
|
```
|
|
212
213
|
|
|
213
|
-
A `MappingEstimate` holds `cycles`, the fused groups' estimates plus the reconfiguration the hardware declares, the per-group `group_cycles`, and the solved `context`, whose useful keys are `allocation`, `workload`, `accelerator` and `group_latencies`. `SolveOptions` sets the solver backend, the number of columns, the constraint families of the allocation model, the kernel library, the tile search, the solve's time limit and solver log, whether
|
|
214
|
+
A `MappingEstimate` holds `cycles`, the fused groups' estimates plus the reconfiguration the hardware declares, the per-group `group_cycles`, and the solved `context`, whose useful keys are `allocation`, `workload`, `accelerator` and `group_latencies`. `SolveOptions` sets the solver backend, the number of columns, the constraint families of the allocation model, the kernel library, the tile search, the solve's time limit and solver log, whether the run writes its pictures and each solve its reports, traces and figures (`artifacts`), and instrumentation (such as `timing`), and its `stage_options` carries what a plugin's stages read, such as `fusion_cut_points` and `intra_core_tiling` for the generic mapping generator or `npu` and `trace_size` for the AIE code generator.
|
|
214
215
|
|
|
215
|
-
Whatever depends on the hardware is found through entry-point groups, so a separate package extends Stream without a fork: `stream.frontends` (workload formats), `stream.mapping_generators` (a mapping when none is given), `stream.namespaces` (namespace facts and the constraint families a namespace adds), `stream.constraint_families` (the constraint families the allocation model is built from), `stream.core_cost_backends` (per-core cost)
|
|
216
|
+
Whatever depends on the hardware is found through entry-point groups, so a separate package extends Stream without a fork: `stream.frontends` (workload formats), `stream.mapping_generators` (a mapping when none is given), `stream.namespaces` (namespace facts and the constraint families a namespace adds), `stream.constraint_families` (the constraint families the allocation model is built from), `stream.core_cost_backends` (per-core cost), `stream.codegen_backends` (code generation) and `stream.accelerator_keys` (top-level accelerator keys an overlay declares and checks; Stream reads none of them).
|
|
216
217
|
|
|
217
218
|
---
|
|
218
219
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[](https://www.python.org/)
|
|
5
5
|
[](https://kuleuven-micas.github.io/stream/)
|
|
6
6
|
|
|
7
|
-
**Stream** is a design space exploration (DSE) and constraint-optimization framework for **heterogeneous dataflow accelerators**: accelerator systems built by combining cores that each have their own dataflow and performance model (**AIE** and **TPU-like** are two example core types among others). Scheduling is **layer-fused**, and the **constraint optimization** uses MILP (Mixed-Integer Linear Programming) to decide tensor placement and transfer paths
|
|
7
|
+
**Stream** is a design space exploration (DSE) and constraint-optimization framework for **heterogeneous dataflow accelerators**: accelerator systems built by combining cores that each have their own dataflow and performance model (**AIE** and **TPU-like** are two example core types among others). Scheduling is **layer-fused**, and the **constraint optimization** uses MILP (Mixed-Integer Linear Programming) to decide tensor placement and transfer paths between memories. Stream builds on top of [ZigZag](https://zigzag-project.github.io/zigzag/) for per-core cost estimation.
|
|
8
8
|
|
|
9
9
|
### 📖 [**Explore the Documentation**](https://kuleuven-micas.github.io/stream/)
|
|
10
10
|
### 🚀 [**Getting Started Guide**](https://kuleuven-micas.github.io/stream/getting-started/)
|
|
@@ -80,13 +80,13 @@ Price a small two-Conv workload (a committed test fixture) on a TPU-like quad-co
|
|
|
80
80
|
|
|
81
81
|
## 🧩 Hardware and Core Types
|
|
82
82
|
|
|
83
|
-
An accelerator in Stream is described as a **system of heterogeneous dataflow cores
|
|
83
|
+
An accelerator in Stream is described as a **system of heterogeneous dataflow cores** that compute out of **memories**, joined by links and buses. Several cores can share one memory, and off-chip DRAM is a memory too. Example dataflow core types include **AIE**, **TPU-like**, and **pooling**. See the [Hardware docs](https://kuleuven-micas.github.io/stream/hardware/) for the format.
|
|
84
84
|
|
|
85
85
|
Hardware and mapping files are organized as follows:
|
|
86
86
|
|
|
87
87
|
- `stream/inputs/examples/hardware/` - system-level hardware YAMLs (e.g. `tpu_like_quad_core.yaml`, `eyeriss_like_*.yaml`, `simba*.yaml`, `fusemax.yaml`).
|
|
88
|
-
- `stream/inputs/examples/hardware/cores/` - per-core-type YAMLs (e.g. `tpu_like.yaml`, `pooling.yaml`, `simd.yaml`, `
|
|
89
|
-
- `stream/inputs/aie/hardware/` and `stream/inputs/aie/hardware/cores/` - AMD AIE example core types (e.g. `aie_tile.yaml`, `mem_tile_256KB.yaml
|
|
88
|
+
- `stream/inputs/examples/hardware/cores/` - per-core-type YAMLs (e.g. `tpu_like.yaml`, `pooling.yaml`, `simd.yaml`, `eyeriss_like.yaml`).
|
|
89
|
+
- `stream/inputs/aie/hardware/` and `stream/inputs/aie/hardware/cores/` - AMD AIE example core types (e.g. `aie_tile.yaml`, `mem_tile_256KB.yaml`).
|
|
90
90
|
- `stream/inputs/examples/mapping/`, `stream/inputs/aie/mapping/`, and `stream/inputs/testing/mapping/` - mapping descriptions.
|
|
91
91
|
|
|
92
92
|
A mapping can be generated (as in Quick Start above) or hand-written and passed as `mapping`.
|
|
@@ -152,9 +152,9 @@ with tempfile.TemporaryDirectory() as tmp:
|
|
|
152
152
|
print("cycles:", estimate.cycles)
|
|
153
153
|
```
|
|
154
154
|
|
|
155
|
-
A `MappingEstimate` holds `cycles`, the fused groups' estimates plus the reconfiguration the hardware declares, the per-group `group_cycles`, and the solved `context`, whose useful keys are `allocation`, `workload`, `accelerator` and `group_latencies`. `SolveOptions` sets the solver backend, the number of columns, the constraint families of the allocation model, the kernel library, the tile search, the solve's time limit and solver log, whether
|
|
155
|
+
A `MappingEstimate` holds `cycles`, the fused groups' estimates plus the reconfiguration the hardware declares, the per-group `group_cycles`, and the solved `context`, whose useful keys are `allocation`, `workload`, `accelerator` and `group_latencies`. `SolveOptions` sets the solver backend, the number of columns, the constraint families of the allocation model, the kernel library, the tile search, the solve's time limit and solver log, whether the run writes its pictures and each solve its reports, traces and figures (`artifacts`), and instrumentation (such as `timing`), and its `stage_options` carries what a plugin's stages read, such as `fusion_cut_points` and `intra_core_tiling` for the generic mapping generator or `npu` and `trace_size` for the AIE code generator.
|
|
156
156
|
|
|
157
|
-
Whatever depends on the hardware is found through entry-point groups, so a separate package extends Stream without a fork: `stream.frontends` (workload formats), `stream.mapping_generators` (a mapping when none is given), `stream.namespaces` (namespace facts and the constraint families a namespace adds), `stream.constraint_families` (the constraint families the allocation model is built from), `stream.core_cost_backends` (per-core cost)
|
|
157
|
+
Whatever depends on the hardware is found through entry-point groups, so a separate package extends Stream without a fork: `stream.frontends` (workload formats), `stream.mapping_generators` (a mapping when none is given), `stream.namespaces` (namespace facts and the constraint families a namespace adds), `stream.constraint_families` (the constraint families the allocation model is built from), `stream.core_cost_backends` (per-core cost), `stream.codegen_backends` (code generation) and `stream.accelerator_keys` (top-level accelerator keys an overlay declares and checks; Stream reads none of them).
|
|
158
158
|
|
|
159
159
|
---
|
|
160
160
|
|
|
@@ -8,22 +8,20 @@ include = ["stream*"] # only ship the stream package, not top-level scripts/out
|
|
|
8
8
|
namespaces = true
|
|
9
9
|
|
|
10
10
|
[tool.setuptools.package-data]
|
|
11
|
-
# Ship the
|
|
12
|
-
# codegen without a checkout. (.py-only is the setuptools default; declare the
|
|
13
|
-
# data files explicitly.) cores/ holds the per-tile descriptions and kernels/ the
|
|
14
|
-
# kernel library referenced by the top-level accelerator YAMLs. Test
|
|
15
|
-
# workloads/onnx fixtures are intentionally NOT shipped.
|
|
11
|
+
# Ship the hardware YAMLs and kernels, testing hardware included for its generators, so a pip install needs no checkout.
|
|
16
12
|
"stream" = [
|
|
17
13
|
"inputs/aie/hardware/*.yaml",
|
|
18
14
|
"inputs/aie/hardware/cores/*.yaml",
|
|
19
15
|
"inputs/aie/kernels/*.toml",
|
|
20
16
|
"inputs/examples/hardware/*.yaml",
|
|
21
17
|
"inputs/examples/hardware/cores/*.yaml",
|
|
18
|
+
"inputs/testing/hardware/*.yaml",
|
|
19
|
+
"inputs/testing/hardware/cores/*.yaml",
|
|
22
20
|
]
|
|
23
21
|
|
|
24
22
|
[project]
|
|
25
23
|
name = "stream-dse"
|
|
26
|
-
version = "2.
|
|
24
|
+
version = "2.2.0"
|
|
27
25
|
description = "Stream - Multi-core accelerator design space exploration with layer-fused scheduling"
|
|
28
26
|
readme = "README.md"
|
|
29
27
|
authors = [{ name = "Arne Symons", email = "arne.symons@kuleuven.be" }, { name = "Linyan Mei", email = "linyan.mei@kuleuven.be" }]
|
|
@@ -35,6 +33,8 @@ classifiers = [
|
|
|
35
33
|
keywords = ["stream", "multi-core", "accelerator", "layer-fused", "scheduling", "zigzag", "dse", "design-space-exploration", "machine-learning", "deep-learning", "mapping"]
|
|
36
34
|
dependencies = [
|
|
37
35
|
"zigzag-dse==3.9.1",
|
|
36
|
+
# zigzag's mapping validator imports six without declaring it
|
|
37
|
+
"six",
|
|
38
38
|
"cerberus",
|
|
39
39
|
"ortools>=9.15",
|
|
40
40
|
"pydantic>=2.0,<2.12",
|
|
@@ -100,11 +100,14 @@ aie2 = "stream.stages.codegen.backends:AIE2_CODEGEN"
|
|
|
100
100
|
[project.entry-points."stream.mapping_generators"]
|
|
101
101
|
generic = "stream.stages.generation.mapping_generators:GENERIC_MAPPING"
|
|
102
102
|
|
|
103
|
-
# A plugin distribution declares itself here so it can be allowlisted (
|
|
103
|
+
# A plugin distribution declares itself here so it can be allowlisted (STREAM_OVERLAYS) and
|
|
104
104
|
# ordered by an OVERLAY_PRIORITY int on its module -- public entry points are priority 0, so a plugin
|
|
105
105
|
# outranks a built-in of the same name. The value is the distribution's module.
|
|
106
106
|
[project.entry-points."stream.overlays"]
|
|
107
107
|
|
|
108
|
+
# Overlay accelerator keys: the name is the key, the object a cerberus `rule` and `check(accelerator, value)`.
|
|
109
|
+
[project.entry-points."stream.accelerator_keys"]
|
|
110
|
+
|
|
108
111
|
[project.entry-points."stream.workload_blocks"]
|
|
109
112
|
# Built-in blocks register in-tree (stream.workload.blocks); overlays add their own entries here.
|
|
110
113
|
|
|
@@ -122,7 +125,7 @@ generic = "stream.stages.generation.mapping_generators:GENERIC_MAPPING"
|
|
|
122
125
|
Homepage = "https://github.com/KULeuven-MICAS/stream"
|
|
123
126
|
|
|
124
127
|
[tool.bumpver]
|
|
125
|
-
current_version = "2.
|
|
128
|
+
current_version = "2.2.0"
|
|
126
129
|
version_pattern = "MAJOR.MINOR.PATCH"
|
|
127
130
|
commit_message = "bump version {old_version} -> {new_version}"
|
|
128
131
|
commit = true
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.2.0"
|
|
@@ -31,11 +31,11 @@ from pathlib import Path
|
|
|
31
31
|
_XDSL_AIE = "git+https://github.com/xdslproject/xdsl-aie.git@f2540442628aa782847ababd1dc76c0e323ba459"
|
|
32
32
|
_SNAX_MLIR = "git+https://github.com/kuleuven-micas/snax-mlir.git@1c01c5d100df128c9fa01d3336ebea98e19b20cf"
|
|
33
33
|
|
|
34
|
-
_MLIR_AIE_PIN = "mlir_aie==1.4.4
|
|
34
|
+
_MLIR_AIE_PIN = "mlir_aie==1.4.4"
|
|
35
35
|
_LLVM_AIE_PIN = "llvm-aie==22.0.0.2026092101+0006955e"
|
|
36
36
|
_AIE_WHEEL_INDICES = [
|
|
37
37
|
"--extra-index-url",
|
|
38
|
-
"https://github.com/Xilinx/mlir-aie/releases/expanded_assets/
|
|
38
|
+
"https://github.com/Xilinx/mlir-aie/releases/expanded_assets/v1.4.4",
|
|
39
39
|
"--extra-index-url",
|
|
40
40
|
"https://github.com/Xilinx/llvm-aie/releases/expanded_assets/nightly",
|
|
41
41
|
"--extra-index-url",
|
|
@@ -5,9 +5,12 @@ from dataclasses import dataclass
|
|
|
5
5
|
from math import prod
|
|
6
6
|
from typing import TYPE_CHECKING, Any
|
|
7
7
|
|
|
8
|
+
from stream.allocation.steady_state import steady_state_detail
|
|
9
|
+
from stream.cost_model.roofline import group_point, hardware_roofline
|
|
8
10
|
from stream.hardware.architecture.core import Core
|
|
11
|
+
from stream.mapping.mapping import held_bits
|
|
9
12
|
from stream.opt.allocation.constraint_optimization.report import guarded
|
|
10
|
-
from stream.workload.node import Tensor
|
|
13
|
+
from stream.workload.node import InEdge, OutEdge, Tensor, declared_of, edge_tensor
|
|
11
14
|
from stream.workload.steady_state.iteration_space import (
|
|
12
15
|
IterationVariableType,
|
|
13
16
|
LoopEffect,
|
|
@@ -19,6 +22,7 @@ if TYPE_CHECKING:
|
|
|
19
22
|
from stream.allocation.problem import AllocationProblem
|
|
20
23
|
from stream.allocation.solution import AllocationSolution
|
|
21
24
|
from stream.mapping.mapping import Mapping
|
|
25
|
+
from stream.opt.allocation.constraint_optimization.space import DecisionSpace
|
|
22
26
|
from stream.workload.node import ComputationNode, HasIterationSpace
|
|
23
27
|
from stream.workload.workload import Workload
|
|
24
28
|
|
|
@@ -39,8 +43,8 @@ _LOOP_NEST_DEPTH: dict[str, int] = {
|
|
|
39
43
|
@dataclass(frozen=True)
|
|
40
44
|
class Allocation:
|
|
41
45
|
"""A solved steady state as downstream reads it: the problem it solves, the mapping and iteration
|
|
42
|
-
spaces the solution decided, the constraint families it was built from with their options,
|
|
43
|
-
solution itself."""
|
|
46
|
+
spaces the solution decided, the constraint families it was built from with their options, the
|
|
47
|
+
solution itself and, where kept, the decision space it was solved in."""
|
|
44
48
|
|
|
45
49
|
problem: AllocationProblem
|
|
46
50
|
mapping: Mapping
|
|
@@ -48,6 +52,7 @@ class Allocation:
|
|
|
48
52
|
backend: str
|
|
49
53
|
families: tuple[tuple[str, dict[str, Any]], ...]
|
|
50
54
|
solution: AllocationSolution
|
|
55
|
+
space: DecisionSpace | None = None
|
|
51
56
|
|
|
52
57
|
@property
|
|
53
58
|
def estimated_cycles(self) -> float:
|
|
@@ -56,8 +61,9 @@ class Allocation:
|
|
|
56
61
|
return float(self.solution.latency.total)
|
|
57
62
|
|
|
58
63
|
def get_ir(self) -> dict:
|
|
59
|
-
"""The allocation as a plain dict: latencies, solve configuration, statistics
|
|
60
|
-
|
|
64
|
+
"""The allocation as a plain dict: latencies, solve configuration, statistics, families, fusion splits, mapping,
|
|
65
|
+
each input and output edge's tensor and the bits of it each off-chip memory holds, performance report, and the
|
|
66
|
+
steady-state view and roofline point, each None when it cannot be built."""
|
|
61
67
|
stats = self.solution.solve_stats
|
|
62
68
|
latency = self.solution.latency
|
|
63
69
|
return {
|
|
@@ -79,11 +85,55 @@ class Allocation:
|
|
|
79
85
|
},
|
|
80
86
|
"families": [{"name": name, "options": options} for name, options in self.families],
|
|
81
87
|
"fusion_splits": {str(dim): size for dim, size in self.problem.fusion_splits.items()},
|
|
82
|
-
"mapping": self.
|
|
88
|
+
"mapping": self._mapping_ir(),
|
|
89
|
+
"edge_tensors": self._edge_tensors(),
|
|
90
|
+
"offchip_holdings": guarded("off-chip holdings", self._offchip_holdings),
|
|
83
91
|
"performance": self.solution.performance,
|
|
84
92
|
"steady_state": guarded("steady-state IR view", self._steady_state_ir),
|
|
93
|
+
"roofline": guarded("roofline point", self.roofline_point),
|
|
85
94
|
}
|
|
86
95
|
|
|
96
|
+
def _edges(self) -> dict[str, InEdge | OutEdge]:
|
|
97
|
+
return {edge.name: edge for edge in self.problem.source_workload.nodes if isinstance(edge, InEdge | OutEdge)}
|
|
98
|
+
|
|
99
|
+
def _mapping_ir(self) -> dict[str, Any]:
|
|
100
|
+
"""The mapping, each edge's placement split counted in the axes the workload declared its tensor in."""
|
|
101
|
+
mapping, edges = self.mapping.get_ir(), self._edges()
|
|
102
|
+
for name, placement in mapping["edge_placements"].items():
|
|
103
|
+
if placement["split"] is not None:
|
|
104
|
+
placement["split"] = declared_of(edges[name]).axes[placement["split"]]
|
|
105
|
+
return mapping
|
|
106
|
+
|
|
107
|
+
def _edge_tensors(self) -> dict[str, dict[str, Any]]:
|
|
108
|
+
"""The whole tensor each input and output edge of the group brings in or takes out, as the workload declared
|
|
109
|
+
it."""
|
|
110
|
+
return {
|
|
111
|
+
name: {
|
|
112
|
+
"tensor": edge_tensor(edge).name,
|
|
113
|
+
"shape": list((declared := declared_of(edge)).shape),
|
|
114
|
+
"axes": list(declared.axes),
|
|
115
|
+
"element_bits": edge_tensor(edge).operand_type.bitwidth,
|
|
116
|
+
"direction": "in" if isinstance(edge, InEdge) else "out",
|
|
117
|
+
}
|
|
118
|
+
for name, edge in self._edges().items()
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
def _offchip_holdings(self) -> dict[str, dict[str, float]]:
|
|
122
|
+
"""The bits of each tensor of the group's edges each off-chip memory holds, by the placements the solve chose
|
|
123
|
+
(:func:`held_bits`)."""
|
|
124
|
+
problem = self.problem
|
|
125
|
+
mapping = problem.source_mapping.with_edge_placements(self.mapping.edge_placements)
|
|
126
|
+
held = held_bits(problem.accelerator, [problem.source_workload], [mapping])
|
|
127
|
+
return {
|
|
128
|
+
memory.name: {tensor.name: bits for tensor, bits in tensors.items()}
|
|
129
|
+
for memory, tensors in held.items()
|
|
130
|
+
if memory.offchip
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
def roofline_point(self) -> dict[str, Any]:
|
|
134
|
+
"""Where this group sits on its accelerator's roofline."""
|
|
135
|
+
return group_point(self, hardware_roofline(self.problem.accelerator))
|
|
136
|
+
|
|
87
137
|
def _core_loops(self, cn: ComputationNode) -> list[dict]:
|
|
88
138
|
"""The loop nest inside one core (ZigZag mapping), as ``core_*`` loops; empty for a non-ZigZag core."""
|
|
89
139
|
lut_node = next((n for n in self.problem.cost_lut.get_nodes() if n.name == cn.name), None)
|
|
@@ -115,7 +165,8 @@ class Allocation:
|
|
|
115
165
|
return loops
|
|
116
166
|
|
|
117
167
|
def _steady_state_ir(self) -> dict:
|
|
118
|
-
"""Serialise the tiled/steady-state inspection view: operators, loop nest and transfer graph
|
|
168
|
+
"""Serialise the tiled/steady-state inspection view: operators, loop nest and transfer graph, and with the
|
|
169
|
+
decision space the per-core detail of every tiled node, axis and tensor."""
|
|
119
170
|
operators = [
|
|
120
171
|
{
|
|
121
172
|
"name": cn.name,
|
|
@@ -160,11 +211,18 @@ class Allocation:
|
|
|
160
211
|
"kind": "transfer",
|
|
161
212
|
"transfer_type": getattr(transfer_type, "name", None),
|
|
162
213
|
"tensor": out.name if out is not None else None,
|
|
214
|
+
"copies": len(tn.outputs),
|
|
163
215
|
"elements": int(prod(out.shape)) if out is not None else 0,
|
|
164
216
|
}
|
|
165
217
|
)
|
|
166
218
|
edges = [{"source": s.name, "target": t.name} for s, t in self.problem.workload.edges()]
|
|
167
|
-
|
|
219
|
+
view = {"operators": operators, "loops": loops, "tiled_graph": {"nodes": tiled_nodes, "edges": edges}}
|
|
220
|
+
if self.space is None:
|
|
221
|
+
return view
|
|
222
|
+
detail = steady_state_detail(self, self.space)
|
|
223
|
+
for node in tiled_nodes:
|
|
224
|
+
node.update(detail["nodes"].get(node["name"], {}))
|
|
225
|
+
return view | {key: detail[key] for key in ("iterations", "axes", "tensors")}
|
|
168
226
|
|
|
169
227
|
|
|
170
228
|
def solved_iteration_spaces(
|
|
@@ -219,14 +277,22 @@ def _propagate_spatial_reuse(ssis: IterationSpaces, spatial_side: Tensor, tempor
|
|
|
219
277
|
|
|
220
278
|
|
|
221
279
|
def solved_mapping(workload: Workload, mapping: Mapping, solution: AllocationSolution) -> Mapping:
|
|
222
|
-
"""A copy of ``mapping`` with each transfer bound to the route and
|
|
223
|
-
|
|
280
|
+
"""A copy of ``mapping`` with each transfer bound to the route and memories the solution chose, and each input
|
|
281
|
+
whose placement the solution chose placed so."""
|
|
282
|
+
chosen = {
|
|
283
|
+
edge.name: route.placement
|
|
284
|
+
for tr, route in solution.transfer_routes.items()
|
|
285
|
+
if route.placement is not None
|
|
286
|
+
for edge in workload.predecessors(tr)
|
|
287
|
+
}
|
|
288
|
+
solved = mapping.with_edge_placements(chosen).copy()
|
|
289
|
+
placements = {tr: (placement,) for tr, placement in solution.memory_placements.items()}
|
|
224
290
|
for tr, route in solution.transfer_routes.items():
|
|
225
291
|
solved.set_for_node(
|
|
226
292
|
tr,
|
|
227
293
|
resource_allocation=(route,),
|
|
228
294
|
inter_core_tiling=tuple(),
|
|
229
|
-
memory_allocation=
|
|
295
|
+
memory_allocation=placements.get(tr, ()),
|
|
230
296
|
)
|
|
231
297
|
for tr in workload.get_transfer_nodes():
|
|
232
298
|
assert len(solved.get(tr).resource_allocation) == 1, (
|