)]}'
{
  "commit": "f2aff785db4cbd3dbc3c696900e6073a9087994b",
  "tree": "e6730667980d833db3640fb1ce5fa8fab189e415",
  "parents": [
    "8823fe65dcfa6f95985b14be5db40b1d86edbe10"
  ],
  "author": {
    "name": "Pan Zhang",
    "email": "98025960+zhangpan2001@users.noreply.github.com",
    "time": "Tue Oct 06 22:16:35 2026 +0800"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Oct 06 16:16:35 2026 +0200"
  },
  "message": "[GlobalOpt] Keep strided input maps when the producer can fuse (#24950)\n\nFactoring `dim * cst` strides out of a contraction-like generic inserts\na strided `tensor.extract_slice` between the contraction and its input.\nWhen the input has an elementwise producer (a dequantize feeding a 1x1\nstride-2 convolution, say), the slice blocks both fusion paths:\nelementwise fusion requires the producer to directly define the\nconsumer\u0027s operand, and tile-based producer fusion only supports\nunit-stride slices. Codegen falls back to materializing the producer as\na whole-tensor stack allocation in every workgroup: a 3.2 MB alloca for\na 1x256x56x56xf32 dequantize, well over the 32 KB stack limit, and the\ncompile fails.\n\nSkip the factoring only when the strided input\u0027s producer can fuse\nelementwise into the contraction and into every other user of its\nresult, so the fusion actually eliminates the producer. Codegen then\nmerges the producer into the contraction, which reads the input directly\nthrough the strided map with no intermediate tensor. Producers that are\nmaterialized anyway (e.g. a result also returned from the function) keep\nthe factored projected-permutation input map.\n\nStrided contractions with a fusable producer now lower through the\ngeneric path instead of contraction selection such as AMDGPU MFMA, the\noriginal motivation for the factoring, in exchange for eliminating the\nintermediate tensor. Strided contractions on dispatch-boundary inputs\nkeep the factored form.\n\nFixes #24752\n\nTests: iree-opt --split-input-file --mlir-print-local-scope\n-iree-global-opt-convert-strided-contraction-to-contraction\ncompiler/src/iree/compiler/GlobalOptimization/test/strided_contraction_to_contraction.mlir\n\nSigned-off-by: zhangpan \u003c98025960+zhangpan2001@users.noreply.github.com\u003e\nCo-authored-by: OpenAI \u003cnoreply@openai.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f97394857f2c678f72387c952fb5b07e4baf9c7b",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/GlobalOptimization/ConvertStridedContractionToContraction.cpp",
      "new_id": "7034b77873181c1cff60c1b1d25fb9a5e0f06a02",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/GlobalOptimization/ConvertStridedContractionToContraction.cpp"
    },
    {
      "type": "modify",
      "old_id": "780bfbf4d22f9569530d37b69ed971bca650f356",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/GlobalOptimization/test/strided_contraction_to_contraction.mlir",
      "new_id": "0a69fe226905b6b859e9e2c6fc76a8cab20445eb",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/GlobalOptimization/test/strided_contraction_to_contraction.mlir"
    }
  ]
}
