stream-dse 2.4.0__tar.gz → 2.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (288) hide show
  1. {stream_dse-2.4.0/stream_dse.egg-info → stream_dse-2.5.0}/PKG-INFO +1 -1
  2. {stream_dse-2.4.0 → stream_dse-2.5.0}/pyproject.toml +2 -2
  3. stream_dse-2.5.0/stream/__init__.py +1 -0
  4. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/api.py +10 -3
  5. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/compiler/kernels/gemm.py +14 -4
  6. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/compiler/kernels/mlir_aie.py +8 -3
  7. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/cost_model/communication_manager.py +8 -0
  8. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/hardware/architecture/memory.py +5 -1
  9. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/hardware/architecture/noc/communication_link.py +7 -1
  10. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/aie/hardware/whole_array_strix.yaml +4 -3
  11. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/mapping/capacity_tiler.py +41 -499
  12. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/mapping/generic_generator.py +3 -40
  13. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/opt/allocation/constraint_optimization/space.py +19 -1
  14. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/generation/fusion_group_iteration.py +6 -1
  15. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/generation/tile_search.py +29 -16
  16. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/workload/workload.py +13 -4
  17. {stream_dse-2.4.0 → stream_dse-2.5.0/stream_dse.egg-info}/PKG-INFO +1 -1
  18. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_data_layout.py +2 -2
  19. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_decode_kv.py +0 -32
  20. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_tpu_v7.py +6 -70
  21. stream_dse-2.4.0/stream/__init__.py +0 -1
  22. {stream_dse-2.4.0 → stream_dse-2.5.0}/LICENSE +0 -0
  23. {stream_dse-2.4.0 → stream_dse-2.5.0}/README.md +0 -0
  24. {stream_dse-2.4.0 → stream_dse-2.5.0}/setup.cfg +0 -0
  25. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/aie_setup.py +0 -0
  26. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/allocation/__init__.py +0 -0
  27. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/allocation/allocation.py +0 -0
  28. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/allocation/artifacts.py +0 -0
  29. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/allocation/lowering.py +0 -0
  30. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/allocation/problem.py +0 -0
  31. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/allocation/solution.py +0 -0
  32. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/allocation/steady_state.py +0 -0
  33. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/compiler/context/aie_context.py +0 -0
  34. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/compiler/dialects/__init__.py +0 -0
  35. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/compiler/dialects/stream.py +0 -0
  36. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/compiler/kernels/__init__.py +0 -0
  37. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/compiler/kernels/aie_kernel.py +0 -0
  38. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/compiler/kernels/binding.py +0 -0
  39. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/compiler/kernels/eltwise_mul.py +0 -0
  40. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/compiler/kernels/flash.py +0 -0
  41. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/compiler/kernels/library.py +0 -0
  42. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/compiler/kernels/registry.py +0 -0
  43. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/compiler/kernels/silu.py +0 -0
  44. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/compiler/kernels/softmax.py +0 -0
  45. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/compiler/transforms/__init__.py +0 -0
  46. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/compiler/transforms/aie_add_tracing_script.py +0 -0
  47. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/compiler/transforms/aie_convert_ofs.py +0 -0
  48. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/compiler/transforms/aie_dispatch.py +0 -0
  49. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/compiler/transforms/aie_move_tile_ops_up.py +0 -0
  50. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/compiler/transforms/aie_tiles.py +0 -0
  51. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/compiler/transforms/clear_memory_space.py +0 -0
  52. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/compiler/transforms/convert_aie_kernels.py +0 -0
  53. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/compiler/transforms/convert_stream_to_aie.py +0 -0
  54. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/compiler/transforms/hoist_scale_acquires.py +0 -0
  55. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/compiler/transforms/iteration_space_to_for.py +0 -0
  56. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/compiler/transforms/unroll.py +0 -0
  57. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/cost_model/bandwidth.py +0 -0
  58. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/cost_model/core_cost.py +0 -0
  59. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/cost_model/core_cost_lut.py +0 -0
  60. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/cost_model/layout.py +0 -0
  61. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/cost_model/memory_accesses.py +0 -0
  62. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/cost_model/roofline.py +0 -0
  63. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/datatypes.py +0 -0
  64. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/frontends/__init__.py +0 -0
  65. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/frontends/onnx.py +0 -0
  66. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/frontends/torch_export.py +0 -0
  67. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/hardware/architecture/accelerator.py +0 -0
  68. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/hardware/architecture/backends/__init__.py +0 -0
  69. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/hardware/architecture/backends/aie2.py +0 -0
  70. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/hardware/architecture/backends/zigzag.py +0 -0
  71. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/hardware/architecture/core.py +0 -0
  72. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/hardware/bundle.py +0 -0
  73. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/hardware/cost.py +0 -0
  74. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/hardware/ports.py +0 -0
  75. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/aie/hardware/cores/aie_tile.yaml +0 -0
  76. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/aie/hardware/cores/mem_tile_256KB.yaml +0 -0
  77. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/aie/hardware/cores/mem_tile_512KB.yaml +0 -0
  78. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/aie/hardware/single_col.yaml +0 -0
  79. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/aie/hardware/single_core.yaml +0 -0
  80. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/aie/hardware/whole_array.yaml +0 -0
  81. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/aie/kernels/aie2p.toml +0 -0
  82. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/aie/mapping/make_gemm_mapping.py +0 -0
  83. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/aie/mapping/make_swiglu_mapping.py +0 -0
  84. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/aie/workload/make_onnx_gemm.py +0 -0
  85. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/aie/workload/make_onnx_swiglu.py +0 -0
  86. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/examples/hardware/cores/eyeriss_like.yaml +0 -0
  87. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/examples/hardware/cores/fusemax_array.yaml +0 -0
  88. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/examples/hardware/cores/fusemax_vec.yaml +0 -0
  89. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/examples/hardware/cores/meta_prototype.yaml +0 -0
  90. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/examples/hardware/cores/pooling.yaml +0 -0
  91. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/examples/hardware/cores/simba_chiplet.yaml +0 -0
  92. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/examples/hardware/cores/simd.yaml +0 -0
  93. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/examples/hardware/cores/tpu_like.yaml +0 -0
  94. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/examples/hardware/cores/tpu_v7_mxu.yaml +0 -0
  95. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/examples/hardware/cores/tpu_v7_vmem.yaml +0 -0
  96. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/examples/hardware/cores/tpu_v7_vpu.yaml +0 -0
  97. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/examples/hardware/eyeriss_like_dual_core.yaml +0 -0
  98. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/examples/hardware/eyeriss_like_quad_core.yaml +0 -0
  99. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/examples/hardware/eyeriss_like_single_core.yaml +0 -0
  100. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/examples/hardware/fusemax.yaml +0 -0
  101. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/examples/hardware/meta_prototype_dual_core_simd_offchip.yaml +0 -0
  102. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/examples/hardware/simba.yaml +0 -0
  103. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/examples/hardware/simba_small.yaml +0 -0
  104. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/examples/hardware/tpu_like_quad_core.yaml +0 -0
  105. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/examples/hardware/tpu_v7_ironwood.yaml +0 -0
  106. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/testing/hardware/cores/pooling.yaml +0 -0
  107. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/testing/hardware/cores/shared_testing_core1.yaml +0 -0
  108. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/testing/hardware/cores/shared_testing_core2.yaml +0 -0
  109. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/testing/hardware/cores/simd.yaml +0 -0
  110. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/testing/hardware/cores/testing_core1.yaml +0 -0
  111. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/testing/hardware/cores/testing_core2.yaml +0 -0
  112. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/testing/hardware/cores/tpu_like.yaml +0 -0
  113. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/testing/hardware/tpu_like_quad_core.yaml +0 -0
  114. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/testing/hardware/tpu_like_ring_hbm.yaml +0 -0
  115. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/testing/hardware/tpu_v7_ironwood_hbm_per_chiplet.yaml +0 -0
  116. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/testing/mapping/make_2_conv_mapping.py +0 -0
  117. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/testing/workload/make_2_conv.py +0 -0
  118. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/testing/workload/make_attention_head.py +0 -0
  119. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/testing/workload/make_conv_relu_flatten_gemm.py +0 -0
  120. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/testing/workload/make_decode_attention.py +0 -0
  121. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/testing/workload/make_resnet_subgraph.py +0 -0
  122. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/testing/workload/make_scan.py +0 -0
  123. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/inputs/testing/workload/make_swiglu.py +0 -0
  124. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/instrumentation.py +0 -0
  125. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/ir/__init__.py +0 -0
  126. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/ir/accelerator.py +0 -0
  127. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/ir/allocation.py +0 -0
  128. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/ir/graph_view.py +0 -0
  129. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/ir/infeasibility.py +0 -0
  130. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/ir/roofline.py +0 -0
  131. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/ir/workload.py +0 -0
  132. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/mapping/blocks.py +0 -0
  133. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/mapping/chain_placement.py +0 -0
  134. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/mapping/mapping.py +0 -0
  135. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/mapping/work_share.py +0 -0
  136. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/mcp/__init__.py +0 -0
  137. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/mcp/jobs.py +0 -0
  138. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/mcp/server.py +0 -0
  139. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/opt/__init__.py +0 -0
  140. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/opt/allocation/__init__.py +0 -0
  141. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/opt/allocation/constraint_optimization/__init__.py +0 -0
  142. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/opt/allocation/constraint_optimization/allocation_model.py +0 -0
  143. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/opt/allocation/constraint_optimization/diagnosis.py +0 -0
  144. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/opt/allocation/constraint_optimization/families/__init__.py +0 -0
  145. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/opt/allocation/constraint_optimization/families/aie2.py +0 -0
  146. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/opt/allocation/constraint_optimization/families/dma.py +0 -0
  147. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/opt/allocation/constraint_optimization/families/energy.py +0 -0
  148. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/opt/allocation/constraint_optimization/families/latency.py +0 -0
  149. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/opt/allocation/constraint_optimization/families/memory.py +0 -0
  150. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/opt/allocation/constraint_optimization/families/memory_ports.py +0 -0
  151. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/opt/allocation/constraint_optimization/families/offchip.py +0 -0
  152. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/opt/allocation/constraint_optimization/families/overlap.py +0 -0
  153. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/opt/allocation/constraint_optimization/families/reuse.py +0 -0
  154. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/opt/allocation/constraint_optimization/families/routing.py +0 -0
  155. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/opt/allocation/constraint_optimization/families/traffic.py +0 -0
  156. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/opt/allocation/constraint_optimization/formulation.py +0 -0
  157. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/opt/allocation/constraint_optimization/hardware.py +0 -0
  158. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/opt/allocation/constraint_optimization/layouts.py +0 -0
  159. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/opt/allocation/constraint_optimization/quantities.py +0 -0
  160. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/opt/allocation/constraint_optimization/report.py +0 -0
  161. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/opt/allocation/constraint_optimization/utils.py +0 -0
  162. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/opt/solver/__init__.py +0 -0
  163. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/opt/solver/solver.py +0 -0
  164. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/parser/accelerator_factory.py +0 -0
  165. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/parser/accelerator_validator.py +0 -0
  166. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/parser/core_validator.py +0 -0
  167. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/parser/mapping_factory.py +0 -0
  168. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/parser/mapping_parser.py +0 -0
  169. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/parser/mapping_validator.py +0 -0
  170. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/parser/onnx/batch_norm.py +0 -0
  171. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/parser/onnx/conv.py +0 -0
  172. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/parser/onnx/einsum.py +0 -0
  173. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/parser/onnx/elementwise.py +0 -0
  174. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/parser/onnx/gemm.py +0 -0
  175. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/parser/onnx/global_average_pool.py +0 -0
  176. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/parser/onnx/layout.py +0 -0
  177. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/parser/onnx/matmul.py +0 -0
  178. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/parser/onnx/max_pool.py +0 -0
  179. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/parser/onnx/model.py +0 -0
  180. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/parser/onnx/normalization.py +0 -0
  181. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/parser/onnx/operator_parser.py +0 -0
  182. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/parser/onnx/reduce.py +0 -0
  183. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/parser/onnx/slice_gather.py +0 -0
  184. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/parser/onnx/utils.py +0 -0
  185. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/plugins.py +0 -0
  186. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/profiling.py +0 -0
  187. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/__init__.py +0 -0
  188. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/allocation/steady_state_allocation.py +0 -0
  189. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/allocation/steady_state_lowering.py +0 -0
  190. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/codegen/aie_code_generation.py +0 -0
  191. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/codegen/backends.py +0 -0
  192. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/context.py +0 -0
  193. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/estimation/accelforge/__init__.py +0 -0
  194. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/estimation/accelforge/arch.py +0 -0
  195. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/estimation/accelforge/backend.py +0 -0
  196. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/estimation/accelforge/library.py +0 -0
  197. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/estimation/accelforge/mapper.py +0 -0
  198. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/estimation/accelforge/tree.py +0 -0
  199. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/estimation/accelforge/workload.py +0 -0
  200. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/estimation/aie_cost_estimator.py +0 -0
  201. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/estimation/core_cost_backends.py +0 -0
  202. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/estimation/core_cost_estimation.py +0 -0
  203. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/estimation/memory_accesses_estimation.py +0 -0
  204. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/estimation/zigzag_cost_estimator.py +0 -0
  205. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/generation/fixed_mapping_generation.py +0 -0
  206. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/generation/flash_decoding.py +0 -0
  207. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/generation/fusion_analysis.py +0 -0
  208. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/generation/fusion_proposal.py +0 -0
  209. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/generation/generic_mapping_generation.py +0 -0
  210. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/generation/kernel_state.py +0 -0
  211. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/generation/mapping_generators.py +0 -0
  212. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/generation/normalization_expansion.py +0 -0
  213. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/generation/placement_generation.py +0 -0
  214. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/generation/structural_dedup.py +0 -0
  215. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/generation/tiling_generation.py +0 -0
  216. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/parsing/accelerator_parser.py +0 -0
  217. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/parsing/onnx_model_parser.py +0 -0
  218. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/stages/stage.py +0 -0
  219. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/visualization/hardware_graph.py +0 -0
  220. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/visualization/steady_state_trace.py +0 -0
  221. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/workload/_svg.py +0 -0
  222. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/workload/access_relation.py +0 -0
  223. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/workload/affine_access.py +0 -0
  224. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/workload/affine_exact.py +0 -0
  225. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/workload/affine_transform.py +0 -0
  226. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/workload/blocks/__init__.py +0 -0
  227. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/workload/blocks/library.py +0 -0
  228. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/workload/data_movement.py +0 -0
  229. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/workload/decompose.py +0 -0
  230. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/workload/demand.py +0 -0
  231. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/workload/fusion/__init__.py +0 -0
  232. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/workload/fusion/analysis.py +0 -0
  233. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/workload/fusion/proposer.py +0 -0
  234. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/workload/iterator_type.py +0 -0
  235. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/workload/models.py +0 -0
  236. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/workload/node.py +0 -0
  237. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/workload/node_key.py +0 -0
  238. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/workload/normalization.py +0 -0
  239. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/workload/post_ops.py +0 -0
  240. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/workload/rewrites/__init__.py +0 -0
  241. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/workload/rewrites/base.py +0 -0
  242. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/workload/rewrites/flash_attention.py +0 -0
  243. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/workload/rewrites/flash_decoding.py +0 -0
  244. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/workload/rewrites/reference.py +0 -0
  245. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/workload/steady_state/computation.py +0 -0
  246. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/workload/steady_state/iteration_space.py +0 -0
  247. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/workload/steady_state/node.py +0 -0
  248. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/workload/structure/__init__.py +0 -0
  249. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/workload/structure/block_detect.py +0 -0
  250. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/workload/structure/wl.py +0 -0
  251. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/workload/tensor.py +0 -0
  252. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream/workload/utils.py +0 -0
  253. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream_dse.egg-info/SOURCES.txt +0 -0
  254. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream_dse.egg-info/dependency_links.txt +0 -0
  255. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream_dse.egg-info/entry_points.txt +0 -0
  256. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream_dse.egg-info/requires.txt +0 -0
  257. {stream_dse-2.4.0 → stream_dse-2.5.0}/stream_dse.egg-info/top_level.txt +0 -0
  258. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_absent_latency.py +0 -0
  259. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_accelerator_ir.py +0 -0
  260. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_boundary_coupling.py +0 -0
  261. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_ci_workflow.py +0 -0
  262. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_co.py +0 -0
  263. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_conv_windows.py +0 -0
  264. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_copy_sets.py +0 -0
  265. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_core_cost_lut_caching.py +0 -0
  266. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_core_validation.py +0 -0
  267. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_decode_attention.py +0 -0
  268. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_edge_placements.py +0 -0
  269. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_epilogue_latency.py +0 -0
  270. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_generic_mapping.py +0 -0
  271. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_hardware_bundle.py +0 -0
  272. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_hardware_combinations.py +0 -0
  273. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_layout_einsum_reduce.py +0 -0
  274. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_mapping_validation.py +0 -0
  275. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_metrics_capture.py +0 -0
  276. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_on_chip_placement.py +0 -0
  277. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_precision.py +0 -0
  278. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_render_metrics_comment.py +0 -0
  279. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_resnet_mapping.py +0 -0
  280. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_resnet_patterns.py +0 -0
  281. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_roofline.py +0 -0
  282. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_sliding_halos.py +0 -0
  283. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_split_sliding_step.py +0 -0
  284. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_steady_state_detail.py +0 -0
  285. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_steady_state_ir.py +0 -0
  286. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_strided_gather.py +0 -0
  287. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_systolic.py +0 -0
  288. {stream_dse-2.4.0 → stream_dse-2.5.0}/tests/test_transfer_demand.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stream-dse
3
- Version: 2.4.0
3
+ Version: 2.5.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
@@ -21,7 +21,7 @@ namespaces = true
21
21
 
22
22
  [project]
23
23
  name = "stream-dse"
24
- version = "2.4.0"
24
+ version = "2.5.0"
25
25
  description = "Stream - Multi-core accelerator design space exploration with layer-fused scheduling"
26
26
  readme = "README.md"
27
27
  authors = [{ name = "Arne Symons", email = "arne.symons@kuleuven.be" }, { name = "Linyan Mei", email = "linyan.mei@kuleuven.be" }]
@@ -148,7 +148,7 @@ generic = "stream.stages.generation.mapping_generators:GENERIC_MAPPING"
148
148
  Homepage = "https://github.com/KULeuven-MICAS/stream"
149
149
 
150
150
  [tool.bumpver]
151
- current_version = "2.4.0"
151
+ current_version = "2.5.0"
152
152
  version_pattern = "MAJOR.MINOR.PATCH"
153
153
  commit_message = "bump version {old_version} -> {new_version}"
154
154
  commit = true
@@ -0,0 +1 @@
1
+ __version__ = "2.5.0"
@@ -175,16 +175,21 @@ def select_mapping(
175
175
  return min(estimates, key=lambda estimate: estimate.cycles)
176
176
 
177
177
 
178
- def generate_code(
178
+ def generate_code( # noqa: PLR0913
179
179
  hardware: str | Accelerator,
180
180
  workload: Any,
181
181
  output_path: str,
182
182
  mapping: str | None = None,
183
183
  options: SolveOptions | None = None,
184
+ estimate: MappingEstimate | None = None,
184
185
  ) -> MappingEstimate:
185
186
  """:func:`evaluate_mapping`, with the code generation backend that claims the accelerator writing
186
- each fused group's design under ``output_path/group_<index>``."""
187
- return _solve(hardware, workload, output_path, mapping, options or SolveOptions(), codegen=True)
187
+ each fused group's design under ``output_path/group_<index>``. Given the ``estimate`` of the same hardware,
188
+ workload, mapping and options, each group takes the tile candidate the estimate chose instead of searching again."""
189
+ if estimate is not None and estimate.mapping != mapping:
190
+ raise ValueError(f"The estimate prices mapping {estimate.mapping!r}, not {mapping!r}.")
191
+ choices = estimate.context.get("group_tile_choices") if estimate is not None else None
192
+ return _solve(hardware, workload, output_path, mapping, options or SolveOptions(), codegen=True, choices=choices)
188
193
 
189
194
 
190
195
  def _maps_layers(mapping: str) -> bool:
@@ -199,6 +204,7 @@ def _solve(
199
204
  mapping: str | None,
200
205
  options: SolveOptions,
201
206
  codegen: bool,
207
+ choices: dict[int, tuple[int, int]] | None = None,
202
208
  ) -> MappingEstimate:
203
209
  observers = build_instrumentation("generate_code" if codegen else "evaluate_mapping", options.instrumentation)
204
210
  try:
@@ -231,6 +237,7 @@ def _solve(
231
237
  families=families,
232
238
  kernel_library=options.kernel_library,
233
239
  tile_search=options.tile_search,
240
+ tile_choices=choices,
234
241
  time_limit_s=options.time_limit_s,
235
242
  solver_log=options.solver_log,
236
243
  artifacts=options.artifacts,
@@ -43,10 +43,19 @@ class GemmKernel(AIEKernelWithZeroing):
43
43
  """The elementwise kernels, by their registry names, the core runs on each output tile once its sum is done, in
44
44
  order: the first reads the sum cast to the output's type, each writes the output, and a binary one also reads the
45
45
  node's next input after its two operands, at the output tile."""
46
+ b_col_maj: bool = False
47
+ """B is stored (n, k), K innermost, as a linear layer holds its weight; mm.cc built with ``B_COL_MAJ`` reads its
48
+ tile of it in MAC blocks of n by k."""
46
49
 
47
50
  @property
48
51
  def unique_name(self) -> str:
49
- return "_".join([f"{self.library_name}_{self.m}_{self.k}_{self.n}", *self.post_ops])
52
+ return "_".join(
53
+ [
54
+ f"{self.library_name}_{self.m}_{self.k}_{self.n}",
55
+ *(["b_col_maj"] if self.b_col_maj else []),
56
+ *self.post_ops,
57
+ ]
58
+ )
50
59
 
51
60
  @property
52
61
  def SCRATCH_BITS(self) -> int: # noqa: N802
@@ -89,7 +98,7 @@ class GemmKernel(AIEKernelWithZeroing):
89
98
  r, s, t = self.mac["m"], self.mac["k"], self.mac["n"]
90
99
  return [
91
100
  tiled_layout(self.m, self.k, r, s),
92
- tiled_layout(self.k, self.n, s, t),
101
+ tiled_layout(self.n, self.k, t, s) if self.b_col_maj else tiled_layout(self.k, self.n, s, t),
93
102
  *[tiled_layout(self.m, self.n, r, t)] * self.post_op_inputs(),
94
103
  tiled_layout(self.m, self.n, r, t),
95
104
  ]
@@ -98,7 +107,8 @@ class GemmKernel(AIEKernelWithZeroing):
98
107
  """The object file is compiled for one tile, so a mapping that tiles the loop
99
108
  differently would read past its operands."""
100
109
  assert op.output is not None
101
- tiles = ((self.m, self.k), (self.k, self.n), *[(self.m, self.n)] * (self.post_op_inputs() + 1))
110
+ b = (self.n, self.k) if self.b_col_maj else (self.k, self.n)
111
+ tiles = ((self.m, self.k), b, *[(self.m, self.n)] * (self.post_op_inputs() + 1))
102
112
  for operand, expected in zip(op.inputs, tiles, strict=True):
103
113
  shape = tuple(cast(MemRefType[AnyDenseElement], operand.type).get_shape())
104
114
  # Leading axes of extent one are the batch index the call is made at.
@@ -117,7 +127,7 @@ class GemmKernel(AIEKernelWithZeroing):
117
127
  return "fp32" if self.library is not None and self.spec.binding is not None else None
118
128
 
119
129
  def binding_options(self) -> dict[str, bool]:
120
- return {"accumulate": self.ACCUMULATOR is not None}
130
+ return {"accumulate": self.ACCUMULATOR is not None} | ({"b_col_maj": True} if self.b_col_maj else {})
121
131
 
122
132
  def bind(self, call: str, dims: dict[str, int], bindings: Bindings) -> Binding:
123
133
  """A post-op's call binds as its own kernel at the output tile."""
@@ -32,12 +32,17 @@ def _target(npu: str) -> bool:
32
32
  return device.arch is AIEArch.AIE2p
33
33
 
34
34
 
35
- def mm(npu: str, m: int, k: int, n: int, bfp16: bool = True, accumulate: bool = False) -> linalg.MatrixKernel:
35
+ def mm(
36
+ npu: str, m: int, k: int, n: int, bfp16: bool = True, accumulate: bool = False, b_col_maj: bool = False
37
+ ) -> linalg.MatrixKernel:
36
38
  """mm.cc as IRON's GEMM builds it, its multiplies in bfp16 when ``bfp16`` (``Precision.MEDIUM``), else bf16; where
37
- it ``accumulate``s, into a float tile, with the cast of that tile to the bf16 output beside it."""
39
+ it ``accumulate``s, into a float tile, with the cast of that tile to the bf16 output beside it. ``b_col_maj``
40
+ reads B stored (n, k)."""
38
41
  _target(npu)
39
42
  output = np.float32 if accumulate else bfloat16
40
- kernel = linalg.mm(m, k, n, bfloat16, output, emulate_bf16_mmul_with_bfp16=bfp16, round_conv_even=True)
43
+ kernel = linalg.mm(
44
+ m, k, n, bfloat16, output, b_col_maj=b_col_maj, emulate_bf16_mmul_with_bfp16=bfp16, round_conv_even=True
45
+ )
41
46
  if accumulate:
42
47
  kernel.cast = datamovement.convert_copy(m * n)
43
48
  return kernel
@@ -53,6 +53,14 @@ class MulticastPathPlan:
53
53
  placement: "EdgePlacement | None" = None
54
54
  _shares: dict[tuple, float] = field(default_factory=dict, init=False, compare=False, repr=False)
55
55
  _sent: dict[Memory, Sent] = field(default_factory=dict, init=False, compare=False, repr=False)
56
+ _hash: list[int] = field(default_factory=list, init=False, compare=False, repr=False)
57
+
58
+ def __hash__(self) -> int:
59
+ """The hash of the fields compared, computed once: a route keys most of what a model builds per route."""
60
+ if not self._hash:
61
+ compared = (self.sources, self.targets, self.total_hops_objective, self.links_used, self.pairs)
62
+ self._hash.append(hash((*compared, self.hop_demand, self.placement)))
63
+ return self._hash[0]
56
64
 
57
65
  def links_at(self, memory: Memory, leaving: bool) -> tuple["CommunicationLink", ...]:
58
66
  """The links of the route's hops that leave ``memory`` (``leaving``) or enter it."""
@@ -117,9 +117,13 @@ class Memory:
117
117
  def __eq__(self, other: object) -> bool:
118
118
  return isinstance(other, Memory) and self._order == other._order
119
119
 
120
+ @cached_property
121
+ def _hash(self) -> int:
122
+ return hash((self.offchip, tuple(core_id for core_id, _ in self._order[1])))
123
+
120
124
  def __hash__(self) -> int:
121
125
  """By its cores, so neither the run nor the memory's name changes how sets of memories iterate."""
122
- return hash((self.offchip, tuple(core_id for core_id, _ in self._order[1])))
126
+ return self._hash
123
127
 
124
128
  def __lt__(self, other: Memory) -> bool:
125
129
  """Off-chip last, the others by the cores viewing them, as cores order by id; the name parts only memories no
@@ -1,5 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
+ from functools import cached_property
4
+
3
5
  from stream.hardware.architecture.core import Core
4
6
  from stream.hardware.architecture.memory import Memory
5
7
 
@@ -71,9 +73,13 @@ class CommunicationLink:
71
73
  def __repr__(self) -> str:
72
74
  return str(self)
73
75
 
74
- def __hash__(self) -> int:
76
+ @cached_property
77
+ def _hash(self) -> int:
75
78
  return hash(self._key)
76
79
 
80
+ def __hash__(self) -> int:
81
+ return self._hash
82
+
77
83
  def __eq__(self, other: object) -> bool:
78
84
  return isinstance(other, CommunicationLink) and self._key == other._key
79
85
 
@@ -92,9 +92,10 @@ bandwidth: # bits per cycle at 1.8 GHz, scripts/benchmark/shim_ddr_bandwidth.py
92
92
  read: {32: 19.4, 64: 39.6, 128: 66.0, 256: 69.6, 512: 138.6}
93
93
  write: {32: 19.8, 64: 39.1, 128: 60.3, 256: 61.7, 512: 125.6}
94
94
  adjacent:
95
- # adjacent runs: neighbouring channels move neighbouring runs of the same rows, the faster of 8 and 16 channels
96
- read: {32: 83.9, 64: 172.7, 128: 246.3, 256: 252.4, 512: 251.5}
97
- write: {32: 44.3, 64: 83.3, 128: 147.5, 256: 213.1, 512: 252.8}
95
+ # adjacent runs: one channel per column, neighbouring channels moving neighbouring runs of one column block of
96
+ # each row, as a GEMM operand split over the columns is read and written
97
+ read: {32: 35.0, 64: 81.8, 128: 153.4, 256: 219.9, 512: 239.4}
98
+ write: {32: 20.0, 64: 39.1, 128: 78.5, 256: 154.7, 512: 243.6}
98
99
  reconfiguration: # fit to measurements/strix_group_runs.json by tests/unit/test_hardware_described_costs.py
99
100
  cycles_per_core: 18683
100
101
  cycles_per_group: 54934