)]}'
{
  "commit": "ecbcdebe23a6e70ca5e350734c341c79eac98c72",
  "tree": "6fe0e48e2738ffa7ea219c4d38fe93ecae6a5916",
  "parents": [
    "a1b922ff46551fedae1c171e9ac3918f50005d31"
  ],
  "author": {
    "name": "Pooja Hemashekar",
    "email": "hemashekar@roofline.ai",
    "time": "Fri Aug 28 10:52:32 2026 +0200"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Fri Aug 28 10:52:32 2026 +0200"
  },
  "message": "[HAL] Fix inline execution models (initializer inlining and dispatch ABI) (#24827)\n\nThe inline execution models were broken end-to-end in both the compiler\nand runtime.\n\nOn the compiler side, the `HAL_Loader` and `HAL_Inline` dialects did not\nsupport inlining, preventing `CombineInitializers` pass from combining\ninitializers containing their ops. This broke `inline-dynamic`\ncompilation generally, and stateful programs using mutable globals under\nboth `inline-dynamic` and `inline-static`.\n\nOn the runtime side, the `hal_loader` dispatch shim incorrectly\naccounted for padding in the fixed portion of the VM cconv arguments by\nusing the C struct size, causing `inline-dynamic` dispatches to fail\nwith an argument/result signature mismatch.\n\nThe runtime also leaked the inline HAL storage buffer wrapper on\nrelease. VM buffer destruction also assumed that every buffer was\ncreated by `iree_vm_buffer_create/clone` as a single aligned allocation\ncontaining both the `iree_vm_buffer_t` handle and its data. Inline HAL\ninstead embeds the handle inside a wrapper struct that maps an\n`iree_hal_buffer_t`, initializing it in place with\n`iree_vm_buffer_initialize`. Such buffers must invoke the wrapper’s\ncustom allocator to release the underlying HAL buffer and free the\nwrapper, rather than calling `iree_allocator_free_aligned` on the\nembedded handle. Since nothing else in the handle distinguishes the two\ncases at destroy time, create/clone now tag their buffers with\n`IREE_VM_BUFFER_ACCESS_COALLOCATED` (set internally), and destroy takes\nthe free-aligned path only for tagged buffers; all others pass the\nhandle to their allocator.\n\nThis PR adds the required inliner interfaces, fixes the dispatch\nargument handling, distinguishes co-allocated and in-place-initialized\nVM buffers during destruction, and adds compiler/runtime coverage for\nthe affected execution models and buffer lifetimes.\n\nAssisted-by: Claude Code\n\n---------\n\nSigned-off-by: Pooja Hemashekar \u003chemashekar@roofline.ai\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "52bdf367df85645b4286000fa3109a2fa7010212",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Modules/HAL/Inline/IR/BUILD.bazel",
      "new_id": "86e7d746459b1e0b036059dba7c4698842f72b6d",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Modules/HAL/Inline/IR/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "461a557454fa95c53f623083f4f0b85e9c293778",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Modules/HAL/Inline/IR/HALInlineDialect.cpp",
      "new_id": "98deb011f14b27003bcbb533381bff63c42c3ef4",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Modules/HAL/Inline/IR/HALInlineDialect.cpp"
    },
    {
      "type": "modify",
      "old_id": "0f575dec174e6b27e0401366e82245c5e7343759",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Modules/HAL/Loader/IR/BUILD.bazel",
      "new_id": "2135610c178205ae07cd91bc82b0b8ae7b7a1640",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Modules/HAL/Loader/IR/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "e34c1e8614104d3b4c2a60d0bbed6a766d4c000e",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Modules/HAL/Loader/IR/HALLoaderDialect.cpp",
      "new_id": "067930e70b779129a94577a1b27eaba3278425f5",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Modules/HAL/Loader/IR/HALLoaderDialect.cpp"
    },
    {
      "type": "modify",
      "old_id": "350cf32270730da646f48ab3a548949bcee4455f",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/modules/hal/inline/module.c",
      "new_id": "eb3aaf0eea2e6ccf4fecb43dce026038ae3dd1c0",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/modules/hal/inline/module.c"
    },
    {
      "type": "modify",
      "old_id": "063190d69e068a23e3ea8f98581593ca88f157af",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/modules/hal/loader/module.c",
      "new_id": "7b53bdc9f24c3babda7bc3ead9949318586e9155",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/modules/hal/loader/module.c"
    },
    {
      "type": "modify",
      "old_id": "1b861375a67284cad8568f8579382aa774807e3a",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/modules/hal/module.c",
      "new_id": "6c51b138a38668fc61f95545898c8176068a4be0",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/modules/hal/module.c"
    },
    {
      "type": "modify",
      "old_id": "f903a16a20288ed52d8c2461014fb557a282b09a",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/vm/buffer.c",
      "new_id": "d4e8b6e2d671e6a087e69982ae7f7bf0f9789afa",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/vm/buffer.c"
    },
    {
      "type": "modify",
      "old_id": "18fc8d61663106932069c4f813d596148ed76382",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/vm/buffer.h",
      "new_id": "88084fa1b84b512c4ca453d2f1c8a23ae5ed4f3c",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/vm/buffer.h"
    },
    {
      "type": "modify",
      "old_id": "a3801b2002935c0af2b5c94955f39dc220969418",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/vm/buffer_test.cc",
      "new_id": "94b71456cb0aa4f120b223ee6d304a4e65382779",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/vm/buffer_test.cc"
    },
    {
      "type": "modify",
      "old_id": "fafafa864bf04774c4f803695c18d24505c788c8",
      "old_mode": 33188,
      "old_path": "tests/compiler_driver/BUILD.bazel",
      "new_id": "a463f5d67306a963f460bc0bcc34c594736bf22f",
      "new_mode": 33188,
      "new_path": "tests/compiler_driver/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "5ebc0fc6b7de80b1f9384f71428543b92667fa6b",
      "old_mode": 33188,
      "old_path": "tests/compiler_driver/CMakeLists.txt",
      "new_id": "df0a623f27730ca76b3c3bd81914ac4bc2f17260",
      "new_mode": 33188,
      "new_path": "tests/compiler_driver/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "c2e7cd0b5c0fba3d6d72b10dd4da8a791bd154de",
      "old_mode": 33188,
      "old_path": "tests/compiler_driver/inline_dynamic_hal_executable.mlir",
      "new_id": "536ac43dc245dddb7c0d79a5abb448e9217f43f9",
      "new_mode": 33188,
      "new_path": "tests/compiler_driver/inline_dynamic_hal_executable.mlir"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "40bd4f0bc4719090952621723157f6d700e84044",
      "new_mode": 33188,
      "new_path": "tests/compiler_driver/inline_hal_mutable_global.mlir"
    },
    {
      "type": "modify",
      "old_id": "d71a77340b9abdb8891c919c65f3f8471d109310",
      "old_mode": 33188,
      "old_path": "tools/test/BUILD.bazel",
      "new_id": "ed42d7b5ac0ae3835c02940659bd10e8441aa2fa",
      "new_mode": 33188,
      "new_path": "tools/test/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "04e11b467f2344e062ae494d470ed6dc30cbfa16",
      "old_mode": 33188,
      "old_path": "tools/test/CMakeLists.txt",
      "new_id": "effeaf4835026594f1358e0bc4520c01b2038f5c",
      "new_mode": 33188,
      "new_path": "tools/test/CMakeLists.txt"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "08b1fa986fd19d371812b267846b8281f7911976",
      "new_mode": 33188,
      "new_path": "tools/test/iree-run-module-inline-dynamic.mlir"
    }
  ]
}
