)]}'
{
  "commit": "069c0796ec527fabce82db8c7d67e60218f81804",
  "tree": "d9fcc366fd693e84d1b89c7b1daacd77b5fbe4c1",
  "parents": [
    "516031078c9bc188111a27fc3faf43e13827a9e4"
  ],
  "author": {
    "name": "Eric Feng",
    "email": "55723758+efric@users.noreply.github.com",
    "time": "Tue Dec 02 14:55:37 2025 -0800"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Dec 02 14:55:37 2025 -0800"
  },
  "message": "[LLVMGPU][Codegen] Reland \"Emit packed chain FMA from select multi_reductions and contracts\" (#22789)\n\nReland after [correcting torch_ops\ntolerances](https://github.com/iree-org/iree-test-suites/pull/138)\n\n\u003d\u003d\u003d\u003d\n\nThis patch teaches the vector lowering pipeline to:\n\n1. Rewrite `vector.multi_reduction\u003cadd\u003e` whose input is `arith.mulf`\ninto a `vector.contract` via\n`vector::populateVectorReductionToContractPatterns`\n2. Lower a restricted set of `vector.contract` into packed FMA chains.\n\nPreviously lowering `vector.multi_reduction` of the same form produced\nelementwise pack-muls per K-slice and then reduced them with a\nleft-associated, serial chain of `v_add_f{16, 32}`\n\n`(mul(a0 ,b0) + (mul(a1, b1) + … + acc`\n\nThe new lowering emits a single nested FMA chain and folds the\naccumulation into the `math.fma` c-operand\n\n`fma(a0 ,b0, fma(a1, b1, fma(a2, b2, fma(a3, b3, acc))))`\n\nTo do this, we first permute the reduction and parallel dimensions of\nthe `LHS` and `RHS` to the order of `[reduction, ..., parallel, ...]`.\nThe `LHS` and `RHS` are then collapsed to a 2D shape of `{Π reduction\ndimensions, Π parallel dimensions}`. Then we form the FMA chain by\niterating backwards, seeded by the accumulator.\n\nNot all forms of `vector.contract` are suitable in the current approach.\nFor example, when an operand drops a parallel iterator as in matmul-like\ncontracts. We require both sides to share the same 2D tuple. Unsupported\ncases fall back to the existing lowering.\n\nFixes: #21483 (variant of original issue; for [issue\n#21513](https://github.com/iree-org/iree/issues/21513)).\n\nci-extra: test_torch\n\n---------\n\nSigned-off-by: Eric Feng \u003cEric.Feng@amd.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "51bf2d8e1205ce55ac407530806674a2a9f63dd6",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/LLVMGPU/LLVMGPUVectorLowering.cpp",
      "new_id": "7388d87486df6352f0c12efbd07a5b5cae01df6b",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/LLVMGPU/LLVMGPUVectorLowering.cpp"
    },
    {
      "type": "modify",
      "old_id": "fdca4fb2f58f1be8004e60ec21fb57fb881cfdf1",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/LLVMGPU/test/nvvm_pipeline_test.mlir",
      "new_id": "a444e649bbe9e5c1cb11f731ce11680594b8ecce",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/LLVMGPU/test/nvvm_pipeline_test.mlir"
    },
    {
      "type": "modify",
      "old_id": "2a60395500422764ed724db14e3ae10662976ed5",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/LLVMGPU/test/rocdl_pipeline_test.mlir",
      "new_id": "c626c61a61d93ee6498f0f08068c41972ed8f0b5",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/LLVMGPU/test/rocdl_pipeline_test.mlir"
    },
    {
      "type": "modify",
      "old_id": "1697c86edc74544a4d6e0134a39befebf72f5c42",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/LLVMGPU/test/vector_lowering.mlir",
      "new_id": "dd2094bd6e3254aceedf5d47a3ea1822298527e4",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/LLVMGPU/test/vector_lowering.mlir"
    }
  ]
}
