)]}'
{
  "commit": "bbd7080627002b111a76623d49d3ab41c10c410b",
  "tree": "31242cba5643080100b606c0cda26478150f804e",
  "parents": [
    "1b1aebbcab41b3022d6af0d635f64fc29bff735e"
  ],
  "author": {
    "name": "Benoit Jacob",
    "email": "jacob.benoit.1@gmail.com",
    "time": "Wed Jun 17 10:26:53 2026 -0400"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Jun 17 14:26:53 2026 +0000"
  },
  "message": "[Codegen][CPU] Wire LowerBitcodeUKernels into the Mmt4dTilingExpert pipeline. (#24570)\n\nCompletes the new-style C-ukernel pipeline integration:\n\n* `LLVMCPUTarget.cpp`: install `iree_codegen.ukernel_provider \u003d\n#iree_cpu.ukernel_provider` on every LLVMCPU executable target config\nwhenever `--iree-llvmcpu-enable-llvm-ukernels` is non-empty. This\nmirrors what ROCM does and is what lets the generic\n`LowerBitcodeUKernelsPass` find the CPU provider for the\nbitcode-lookup-and-attach.\n\n* `KernelDispatch.cpp::setRootConfig(InnerTiledOp)`: when\n`selectUKernel` returns a descriptor, set the reduction-dim vector tile\nsize to 0 (untiled) instead of 1 (unrolled). The ukernel\u0027s C function\ntakes the outer K extent as a runtime argument (`k_outer`) and runs the\nK loop itself; pre-unrolling here would both defeat that and bloat the\nIR. Matches the equivalent split in\n`setDataTiledMmaInnerTiledLoweringConfig` on the GPU side.\n\n* `Passes.cpp::addMmt4dTilingExpertPassPipeline`: insert\n`createLowerBitcodeUKernelsPass()` between the parallel-tile and\nreduction-tile passes. A nop when no op carries a `iree_codegen.ukernel`\ndescriptor, so it stays in the default pipeline. The companion\n`LowerUKernelOpsToCalls` already runs after bufferization (in\n`addLowerToLLVMPasses`); together they implement the user\u0027s \"early\n`inner_tiled` -\u003e `ukernel.generic` on tensors; late `ukernel.generic` -\u003e\n`func.call` on memrefs\" split.\n\nLit test (`select_ukernel.mlir`) gains a second RUN line that chains\n`iree-llvmcpu-select-lowering-strategy` with\n`iree-codegen-lower-bitcode-ukernels` and asserts:\n- the `inner_tiled` is rewritten to `iree_codegen.ukernel.generic`\ncarrying the right `iree_uk_mma_x86_avx512bf16_1x16x2_f32_bf16` name;\n- the matching bitcode appears as `hal.executable.objects` (resolved\nfrom the global `EmbeddedDataDirectory` populated at LLVMCPU plugin\ninit);\n- and the original `inner_tiled` is gone, guarding against the rewrite\nsilently no-op\u0027ing on a regression.\n\nAn end-to-end `iree-compile` test would also be desirable, but the\ncurrent pipeline state needs more wiring (workgroup-distribution\nverifier complains about the bufferization-introduced copy ops around\nthe workgroup loop, on both the ukernel and non-ukernel paths) — that\ninvestigation belongs with the follow-up commit that fills in real\nukernel bodies and an actual numerical matmul test.\n\nProgress towards https://github.com/iree-org/iree/issues/24574.\n\nSigned-off-by: Benoit Jacob \u003cjacob.benoit.1@gmail.com\u003e\nCo-authored-by: Claude Opus 4.7 \u003cnoreply@anthropic.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ad04206acafff383f08d026fb50a8ce2f0a901bc",
      "old_mode": 33188,
      "old_path": "compiler/plugins/target/LLVMCPU/LLVMCPUTarget.cpp",
      "new_id": "fda303590f3126c1891895dd2d24146f6ee283a4",
      "new_mode": 33188,
      "new_path": "compiler/plugins/target/LLVMCPU/LLVMCPUTarget.cpp"
    },
    {
      "type": "modify",
      "old_id": "6fc0834106f9ddaacb5be86805adfaeda5c9164e",
      "old_mode": 33188,
      "old_path": "compiler/plugins/target/LLVMCPU/builtins/ukernel/test/select_ukernel.mlir",
      "new_id": "2952f41f1868443f870e47df207ab0ed10d11919",
      "new_mode": 33188,
      "new_path": "compiler/plugins/target/LLVMCPU/builtins/ukernel/test/select_ukernel.mlir"
    },
    {
      "type": "modify",
      "old_id": "8c4791b25fe1c73212f225059cc8efd11a521974",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/LLVMCPU/KernelDispatch.cpp",
      "new_id": "c075923be8085dbfb9aa4fd01fe48ab693552997",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/LLVMCPU/KernelDispatch.cpp"
    },
    {
      "type": "modify",
      "old_id": "e9f4fb681dd44765103e173586df4e9943abaab4",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/LLVMCPU/Passes.cpp",
      "new_id": "16020e87e972b4a72a3529eedbdd5e3ab1c2d2c0",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/LLVMCPU/Passes.cpp"
    }
  ]
}
