)]}'
{
  "commit": "a67fb36f2bf9e866b10ab4503c0139e1cffec393",
  "tree": "87300461be652460866e2c27f7618efd451387fb",
  "parents": [
    "a937cf9adc8886732970a849491bc35f6341f991"
  ],
  "author": {
    "name": "Benoit Jacob",
    "email": "jacob.benoit.1@gmail.com",
    "time": "Tue Jun 16 08:26:43 2026 -0400"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Jun 16 14:26:43 2026 +0200"
  },
  "message": "[Codegen][CPU] Register embedded ukernel bitcode + provider lookup. (#24568)\n\nWires the LLVMCPU plugin and the `#iree_cpu.ukernel_provider` attribute\nto actually resolve ukernel bitcode:\n\n* On plugin init, the embedded `iree_uk_cpu_bitcode` TOC is iterated and\neach `.bc` is added to the global `EmbeddedDataDirectory` (mirrors\n`addAMDGPUUkernelBitcodeToGlobalEmbeddedDataDirectory` in\n`ROCMTarget.cpp`).\n\n* `UKernelProviderAttr::createAndReplaceWithUkernelOp` now resolves the\nbitcode by name: user-supplied `hal.executable.objects` ancestors first\n(BYO and BYO-override paths), then the embedded directory. If found and\nnot already on the op, the attribute is attached to the source op; the\ndefault `LowerBitcodeUKernelsPass` rewrite then preserves it on the\nresulting `ukernel.generic`. The provider still returns `std::nullopt`\nfor the rewrite itself — specialized `inner_tiled` handling (scalar\n`intrinsics_{m,n,k}` + outer K count + ACC inner stride) lands with\nSelectUKernels in a follow-up.\n\n* Filename match is `\u003cukernelName\u003e.\u003cfeatures\u003e.bc` (or bare\n`\u003cukernelName\u003e.bc`), matching the build rules under\n`compiler/plugins/target/LLVMCPU/builtins/ukernel/`. Multi-variant\ndisambiguation by target feature set also lands with SelectUKernels.\n\nBUILD.bazel: LLVMCPU plugin gains a dep on\n\n`//compiler/plugins/target/LLVMCPU/builtins/ukernel:iree_uk_cpu_bitcode`,\nand the `iree_cpu` dialect picks up HAL IR + `EmbeddedDataDirectory` so\nthe provider implementation can live with the attribute (consistent with\nhow `ROCMUkernelBitcodeSupport.cpp` sits inside the ROCM dialect).\n\nTests: a three-way lit test (`lookup_builtin_and_byo.mlir`) covers each\nbranch of the lookup:\n1. Built-in only — no user objects; expect a `dense_resource\u003c…\u003e` with\nthe embedded bf16 bitcode (2732 bytes) attached.\n2. BYO override — user supplies bitcode under the built-in\u0027s filename;\nexpect the user\u0027s bytes to flow through unchanged (and CHECK-NOT against\n`dense_resource` to catch a regression where the provider silently swaps\nin the embedded copy).\n3. Pure BYO — user-only name with no matching built-in; expect the\nuser\u0027s bitcode to surface on the rewritten op.\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": "8181ef5fce20aa4a220e3608cda386436750e167",
      "old_mode": 33188,
      "old_path": "compiler/plugins/target/LLVMCPU/BUILD.bazel",
      "new_id": "c2bb72567abcee30974fd43b4a1edab2b4b6a7ee",
      "new_mode": 33188,
      "new_path": "compiler/plugins/target/LLVMCPU/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "dc9e1d6752faf6c19d400c08a524c318095c2469",
      "old_mode": 33188,
      "old_path": "compiler/plugins/target/LLVMCPU/CMakeLists.txt",
      "new_id": "345f3899386de0731ed58bfca4f305deb2baf034",
      "new_mode": 33188,
      "new_path": "compiler/plugins/target/LLVMCPU/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "e5334da0df1f0d9769285ac876b31957d9c337c3",
      "old_mode": 33188,
      "old_path": "compiler/plugins/target/LLVMCPU/LLVMCPUTarget.cpp",
      "new_id": "ad04206acafff383f08d026fb50a8ce2f0a901bc",
      "new_mode": 33188,
      "new_path": "compiler/plugins/target/LLVMCPU/LLVMCPUTarget.cpp"
    },
    {
      "type": "modify",
      "old_id": "5ff5b4496c4c555fac84aaf1ebb60cf53a5dcc42",
      "old_mode": 33188,
      "old_path": "compiler/plugins/target/LLVMCPU/builtins/ukernel/test/BUILD.bazel",
      "new_id": "ff9a4b3e9bc669bb3017413ac3e1d3fea91db51a",
      "new_mode": 33188,
      "new_path": "compiler/plugins/target/LLVMCPU/builtins/ukernel/test/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "1671a1eb4ac2faeb957f79a40f809502af014f0d",
      "old_mode": 33188,
      "old_path": "compiler/plugins/target/LLVMCPU/builtins/ukernel/test/CMakeLists.txt",
      "new_id": "9da211357a00885900157b0305c0d4d414531230",
      "new_mode": 33188,
      "new_path": "compiler/plugins/target/LLVMCPU/builtins/ukernel/test/CMakeLists.txt"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "586c697b420ef7eb23f5ab092006b6ccbb4e3c5b",
      "new_mode": 33188,
      "new_path": "compiler/plugins/target/LLVMCPU/builtins/ukernel/test/lookup_builtin_and_byo.mlir"
    },
    {
      "type": "modify",
      "old_id": "efa42afa52c2cb69b92e4c4ddaa08396d45e1e50",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/Dialect/CPU/IR/BUILD.bazel",
      "new_id": "8ef21153443ce75c065fd76fbad0710deedbd8d1",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/Dialect/CPU/IR/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "e3fe5542766cb25b928196e0bb7aeeaf152f779c",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/Dialect/CPU/IR/CMakeLists.txt",
      "new_id": "6ff98357f6527f5946a653b1f005a327a2153c6f",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/Dialect/CPU/IR/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "60ed072df6a9eb333dd2cfe89e054cc57388d729",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/Dialect/CPU/IR/IREECPUAttrs.cpp",
      "new_id": "e1c867b2cfa616862fb38e493776972ca5db194b",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/Dialect/CPU/IR/IREECPUAttrs.cpp"
    }
  ]
}
