)]}'
{
  "commit": "7755c301e942b11ff869cfa6df86c6f438e2e757",
  "tree": "4e7cd0d6a4030b6120d1ef995c540403565cb0e7",
  "parents": [
    "53daa9513bbc9c0dbbc1300a9337f263d151a0cb"
  ],
  "author": {
    "name": "Ben Vanik",
    "email": "ben.vanik@gmail.com",
    "time": "Thu Aug 21 08:30:16 2025 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Thu Aug 21 15:30:16 2025 +0000"
  },
  "message": "Adding iree_hal_device_queue_host_call and emulation.  (#21653)\n\nThis allows for both blocking and non-blocking device-\u003ehost calls.\n\nEmulation is provided targets that aren\u0027t yet using their native\nfeatures (CUDA/HIP/Metal) or don\u0027t have them (Vulkan), but it should\nnever be used once we start relying on this for programs as the\nperformance is terrible. The CPU sync and task implementations are done\nhere as the emulation is incompatible with sync semantics and it\u0027s\npossible to implement it on the task system fairly easily.\n\nI split out the existing queue emulation utilities out of the device.c\nso high-fidelity backends can eventually not even link that code in. I\nadded the host call emulation in its own target so we can avoid\nintroducing threading dependencies into `iree::hal` for the emulation\n(and makes it clearer what\u0027s part of the API vs what\u0027s an implementation\ndetail).\n\nI suspect there may be some HIP flakes and we can disable the CTS\nthere/file issues if they pop up. I think there\u0027s a few cases in the HIP\nsemaphore that don\u0027t quite work but it\u0027d be better to improve the\nsemaphore tests first. HIP is using an emulated host call here and\nthat\u0027s pretty much just a thread and some semaphores and should be\npossible to test independent of the host call logic.\n\nFixes #21631.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "9f80d4919309e46a777f355262722f7693677ce4",
      "old_mode": 33188,
      "old_path": "build_tools/cmake/iree_copts.cmake",
      "new_id": "5b9b9ba03fcb98739284dd2be23337c801e2f4dc",
      "new_mode": 33188,
      "new_path": "build_tools/cmake/iree_copts.cmake"
    },
    {
      "type": "modify",
      "old_id": "12d1a44a6e99a5b79d6edb2d6a50b0fcd3b5184d",
      "old_mode": 33188,
      "old_path": "experimental/webgpu/BUILD.bazel",
      "new_id": "8484e960b0fe56c2809d93e199583ddcd9b8a8b7",
      "new_mode": 33188,
      "new_path": "experimental/webgpu/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "fa04820896662f0d11782d92d63ab904b0107147",
      "old_mode": 33188,
      "old_path": "experimental/webgpu/CMakeLists.txt",
      "new_id": "dec651f466f10184e1a03d9378018097d1d80cf4",
      "new_mode": 33188,
      "new_path": "experimental/webgpu/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "d80e7ac0d71fff8f8e40ca2063b51445d2e1e129",
      "old_mode": 33188,
      "old_path": "experimental/webgpu/webgpu_device.c",
      "new_id": "a4c04141cbfdf5a8cc7f52cc2429fee8928b95f1",
      "new_mode": 33188,
      "new_path": "experimental/webgpu/webgpu_device.c"
    },
    {
      "type": "modify",
      "old_id": "037124afbc63132b71c5c09ad9f5238aada2c675",
      "old_mode": 33188,
      "old_path": "runtime/src/CMakeLists.txt",
      "new_id": "30e6237c83e03949767212a781fd1e590d2226bf",
      "new_mode": 33188,
      "new_path": "runtime/src/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "041c39331179ab311d89c834e0699d768cdc35f6",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/base/config.h",
      "new_id": "cf92e8247372249c9c4ea42c11d071607b882336",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/base/config.h"
    },
    {
      "type": "modify",
      "old_id": "1e7ea8fc151941ca3a6b9b7bc6d7041571394c35",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/cts/CMakeLists.txt",
      "new_id": "b57df89fa423d9d0bc3f0bc1f72bbf133c4d26df",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/cts/CMakeLists.txt"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "49e0dc10c2b066230569111dc1cea8ee8acd51a7",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/cts/queue_host_call_test.h"
    },
    {
      "type": "modify",
      "old_id": "ad160a997112ca659fc54351ae89d8428b03b92d",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/device.c",
      "new_id": "77b0fb74759729691c5877e0a26c98194a5fd094",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/device.c"
    },
    {
      "type": "modify",
      "old_id": "2021745c375f03c026f8bf97f16c22ef89617df7",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/device.h",
      "new_id": "37800035b371cde12cfe91379688b06ae240068d",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/device.h"
    },
    {
      "type": "modify",
      "old_id": "5a29e02ae309e5ddb7e549bccb19d6ccf1787eb4",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/amdgpu/logical_device.c",
      "new_id": "432330e46075c16d267440c6803346c295356dc6",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/amdgpu/logical_device.c"
    },
    {
      "type": "modify",
      "old_id": "a11998411082b5787b4bc51f805a4ef95dccc480",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/amdgpu/virtual_queue.h",
      "new_id": "5c28e675b664ec7d1c6fcb3c66bac7aaed858985",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/amdgpu/virtual_queue.h"
    },
    {
      "type": "modify",
      "old_id": "29cbec7ac286c075f61a496565997c474f2a2e4a",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/cuda/BUILD.bazel",
      "new_id": "940d59201fe9d23639476710a56a8995771869d8",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/cuda/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "03ec177c5efad07cd5340a2aefcbca73881918e8",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/cuda/CMakeLists.txt",
      "new_id": "4005932b719a281263917d62f5d08ebe85870996",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/cuda/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "4459030732de89352dcf48327d49f953ae5ce0cf",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/cuda/cuda_device.c",
      "new_id": "c2f2eb8e0b03eade626d594eb532d4c22f8322f1",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/cuda/cuda_device.c"
    },
    {
      "type": "modify",
      "old_id": "dc9355853fc4aec4a96bca45d728ba5e4f864f0a",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/hip/CMakeLists.txt",
      "new_id": "484eb98b00c68b85136e25ff2c668a67498ab9b9",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/hip/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "277c9e604551f8ef113964276cad98294be659bb",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/hip/event_semaphore.c",
      "new_id": "c223929d82e671baad4de7623dee025643c39910",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/hip/event_semaphore.c"
    },
    {
      "type": "modify",
      "old_id": "4c26a28c53f76599bfad0e86ea1263c7ff98bc17",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/hip/hip_device.c",
      "new_id": "d7a7dd1e96ccd62d7fcb202733853fdf847d24d3",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/hip/hip_device.c"
    },
    {
      "type": "modify",
      "old_id": "5650640fef22f45f971f94f75f8f51252e54db4d",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/local_sync/BUILD.bazel",
      "new_id": "dd86e719886152f1b8918a69b7ad70fccd338610",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/local_sync/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "5fc8af6e1b7fe47bee6b6baf0e0a67e4aa4cffa9",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/local_sync/CMakeLists.txt",
      "new_id": "bca06c72bf8c32b389197b24526b641089f671cb",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/local_sync/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "7f4f211a6f956cfd04624437a81190d97eefcb23",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/local_sync/sync_device.c",
      "new_id": "7f5e2bb01357337c3b6ac99a5e02b54f4febcf72",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/local_sync/sync_device.c"
    },
    {
      "type": "modify",
      "old_id": "48b78c8669d46517cefaf279e0a584fd478c5837",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/local_task/BUILD.bazel",
      "new_id": "3038016db01b1070abe47561c2772885bcbfc71f",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/local_task/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "042ff6b5f942f84ccf3993c3fdd4a65012abbd13",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/local_task/CMakeLists.txt",
      "new_id": "c7f5a6ee524d1403d895efac2166bd81e84bed7f",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/local_task/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "45e4c8e7b404633e75fdd590f5674fe5b6ed0221",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/local_task/task_device.c",
      "new_id": "030e7e48eff2755e993f98d03610e8a0f715fbad",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/local_task/task_device.c"
    },
    {
      "type": "modify",
      "old_id": "cdd4c227176dcadb26dfa37d863031fb41e7fcba",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/local_task/task_queue.c",
      "new_id": "9cb06aed3cc952c0116921fc545fd209035b9385",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/local_task/task_queue.c"
    },
    {
      "type": "modify",
      "old_id": "91065ff50cef7cfdd6210c8e243604389c835e6d",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/local_task/task_queue.h",
      "new_id": "d5daa5cef1c7bf65cc98f446c6a06831507df696",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/local_task/task_queue.h"
    },
    {
      "type": "modify",
      "old_id": "62cd17dab47aee1989e43d0975b907960e674572",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/local_task/task_semaphore.c",
      "new_id": "c7454936c6f42904497581c51104b8df19bfbf3c",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/local_task/task_semaphore.c"
    },
    {
      "type": "modify",
      "old_id": "9331d2d0e582ad7b506b3b8a180a566897d688cf",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/metal/CMakeLists.txt",
      "new_id": "c2a991ea17ef6a66b977159ecc72c96d217a1c03",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/metal/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "33028ddbe86d14d2646e6fc27d94b7b5806fe7ed",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/metal/metal_device.m",
      "new_id": "ac264b905edf9da1db884f82034926c65a67fe7f",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/metal/metal_device.m"
    },
    {
      "type": "modify",
      "old_id": "5343034c77652c76d3ead1b9c99f0dc7c7eda225",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/null/BUILD.bazel",
      "new_id": "b28ba504c567541c12c7c81653c527fb721a1c4e",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/null/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "fa9f96a79101ef6a7397e1862a08629c17fcf666",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/null/CMakeLists.txt",
      "new_id": "dbdc92576439cc457991864f8fbe8ef4db0a7bce",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/null/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "0d9cc725fa331e44a17616f4dc0551e48125c7c4",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/null/device.c",
      "new_id": "9ddedc1ce794e5c883410019b7b3640c8961caa9",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/null/device.c"
    },
    {
      "type": "modify",
      "old_id": "ef91748101ea0aafc49cdf9c299784d4fe8113fb",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/vulkan/BUILD.bazel",
      "new_id": "15d792488a00e050aac4c90d5f3cc0ac9e628869",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/vulkan/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "7444ef3a8486b85c7253c45789e7afc30a13d38e",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/vulkan/CMakeLists.txt",
      "new_id": "0bd351ac3dfd6ea9030ae6ef6846eb37efd692f5",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/vulkan/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "20ac8067180b3bd2c3447c6c6b9d9c91f968656f",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/vulkan/native_semaphore.cc",
      "new_id": "2d51410870e2ed4e6dadf7b8a73e263fe4d3bcbf",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/vulkan/native_semaphore.cc"
    },
    {
      "type": "modify",
      "old_id": "b9a42f7fd9894ffa2d3aad1675495c16398ff090",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/vulkan/vulkan_device.cc",
      "new_id": "dd6f24b66823fa342dcc1a506c3cf280a73c4045",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/vulkan/vulkan_device.cc"
    },
    {
      "type": "modify",
      "old_id": "58da6ac480a801d4fe5bb6c910456e8d81be88c8",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/semaphore.c",
      "new_id": "c29001c3e95b2ed6212a544b91b6c43571568646",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/semaphore.c"
    },
    {
      "type": "modify",
      "old_id": "13927622f22cfbe56210e9d9c3dc0312804883e3",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/semaphore.h",
      "new_id": "b246e6a58784b0dcf5c54103fe37356ea971fdb5",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/semaphore.h"
    },
    {
      "type": "modify",
      "old_id": "61cd73d3a0ae31fca275d68287e64ec11fc16afb",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/utils/BUILD.bazel",
      "new_id": "309e19ed5d99ae9782125d2b86b3327bbc96cda3",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/utils/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "e47c9ab1c4c3bee3a7c66c40e81b4171bc2b2619",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/utils/CMakeLists.txt",
      "new_id": "bc7bfb3f4ac2d05ddff8e2bb3b75104a8831ca08",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/utils/CMakeLists.txt"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "aa88ea67f107fa8a66e98025eccb693aa7cb090d",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/utils/queue_emulation.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "2854b4f124e0aca71d61c171526a72d98b0fefff",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/utils/queue_emulation.h"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "8241c90c88e2b8accc06f0fe557bcd96f151db2b",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/utils/queue_host_call_emulation.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "45201d81d6dff85f0ef4784f3f96f9bc47d64a98",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/utils/queue_host_call_emulation.h"
    }
  ]
}
