)]}'
{
  "commit": "aefe97b939f6884b9ffb48f602b9cee6f867f115",
  "tree": "ff057a2595953c1e1f5466cc6dcc3366f74f8fa9",
  "parents": [
    "cff4b04858d8207a5c94f113bbf99407a1322db7"
  ],
  "author": {
    "name": "Ben Vanik",
    "email": "ben.vanik@gmail.com",
    "time": "Fri May 15 15:12:30 2026 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Fri May 15 15:12:30 2026 -0700"
  },
  "message": "[AMDGPU] Embed prebuilt AMDGPU device binaries (#24498)\n\nThe AMDGPU HAL runtime needs a small builtin device library for blit,\ndispatch, and timestamp kernels. Building that library through the\nnormal runtime target required an AMDGPU-capable clang from the\nthird_party LLVM checkout, making accidental runtime rebuilds extremely\nexpensive and tying the runtime to the monorepo compiler checkout.\n\nThis adds a device/binaries package that embeds checked-in HSACO code\nobjects for the default generic support set: gfx9-generic, gfx90a,\ngfx9-4-generic, gfx10-1-generic, gfx10-3-generic, gfx11-generic, and\ngfx12-generic. Default builds consume those blobs and do not require\nROCm or LLVM producer tools.\n\nDefault/prebuilt scenarios:\n```\n  iree-bazel-build //runtime/src/iree/hal/drivers/amdgpu/device/binaries:toc\n\n  cmake -DIREE_HAL_AMDGPU_DEVICE_BINARY_BUILD_MODE\u003dprebuilt ...\n```\n\nLive source-build scenarios for HAL developers:\n```\n  iree-bazel-build \\\n      --config\u003damdgpu_device_binaries_source_rocm \\\n      --repo_env\u003dIREE_HAL_AMDGPU_DEVICE_TOOLCHAIN_ROCM_PATH\u003d/path/to/rocm \\\n      //runtime/src/iree/hal/drivers/amdgpu/device/binaries:toc\n\n  iree-bazel-build \\\n      --config\u003damdgpu_device_binaries_source_llvm_project \\\n      //runtime/src/iree/hal/drivers/amdgpu/device/binaries:toc\n\n  cmake \\\n      -DIREE_HAL_AMDGPU_DEVICE_BINARY_BUILD_MODE\u003dsource \\\n      -DIREE_HAL_AMDGPU_DEVICE_TOOLCHAIN\u003drocm \\\n      -DIREE_HAL_AMDGPU_DEVICE_TOOLCHAIN_ROCM_PATH\u003d/path/to/rocm ...\n```\n\nRegenerating the checked-in set is explicit:\n```\n  python build_tools/scripts/amdgpu_device_binaries.py \\\n    --output-dir runtime/src/iree/hal/drivers/amdgpu/device/binaries/prebuilt \\\n    --rocm-path /path/to/rocm \\\n    --targets gfx9-generic,gfx90a,gfx9-4-generic,gfx10-1-generic,gfx10-3-generic,gfx11-generic,gfx12-generic\n```\n\nThe target map is authored once in Python and generates the Bazel,\nCMake, and runtime lookup fragments. That keeps the ROCm/TheRock family\nvocabulary, exact target map, and generic code-object fallback table\naligned without adding a manifest whose inventory, history, and hashes\nwould duplicate Git.\n\nThe pragmatic tradeoff is accepting checked-in binaries for code that\nchanges rarely. The current seven HSACO files are about 151 KiB raw,\nabout 40 KiB as loose Git blobs, and about 27 KiB in a Git pack, so the\nrepository cost is a few tens of KiB instead of a mandatory LLVM/ROCm\ndependency on every runtime build.\n\nThis does not add general AMDGPU fatbin support. The builtin runtime\nlibrary now has a TOC of target-specific blobs and runtime selection;\nCTS, samples, and other normal HAL executables still use the existing\nROCm test target plumbing until the AMDGPU executable format grows real\nmulti-variant support.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "3480e1fc5d19038687a154456eb443bf543a6b96",
      "old_mode": 33188,
      "old_path": "MODULE.bazel",
      "new_id": "3dfc1ca270c34fefe2171034c9efbdb98b45c230",
      "new_mode": 33188,
      "new_path": "MODULE.bazel"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e4c0d031bec42da9238025d029ff2639c1461dbc",
      "new_mode": 33188,
      "new_path": "build_tools/bazel/amdgpu_device_toolchain_repo.bzl"
    },
    {
      "type": "modify",
      "old_id": "41d116a92ad8bc587f0a72cd320f4576e27b6be2",
      "old_mode": 33188,
      "old_path": "build_tools/bazel/extensions.bzl",
      "new_id": "3d292b071d5c5cf26335adec4f4386ad982131c6",
      "new_mode": 33188,
      "new_path": "build_tools/bazel/extensions.bzl"
    },
    {
      "type": "modify",
      "old_id": "0f0fbf1d1fe0986ae6ad7613405c39fac5b951d5",
      "old_mode": 33188,
      "old_path": "build_tools/bazel/iree.bazelrc",
      "new_id": "9a085e45dfbde49f3f39b156c738d7a61d3b2b1f",
      "new_mode": 33188,
      "new_path": "build_tools/bazel/iree.bazelrc"
    },
    {
      "type": "modify",
      "old_id": "b4aa95d2f2ec75254980aaa2a0f45c8a62aa0a0a",
      "old_mode": 33188,
      "old_path": "build_tools/bazel/iree_amdgpu_binary.bzl",
      "new_id": "9a29b74f29398218453d1406955504a814e2157f",
      "new_mode": 33188,
      "new_path": "build_tools/bazel/iree_amdgpu_binary.bzl"
    },
    {
      "type": "modify",
      "old_id": "543c624e69bf3e6d650605a54819045c4e4ad463",
      "old_mode": 33188,
      "old_path": "build_tools/bazel_to_cmake/bazel_to_cmake_converter.py",
      "new_id": "64b1f2c9ec3fe5e820eea8c3aaec16c4573f3f17",
      "new_mode": 33188,
      "new_path": "build_tools/bazel_to_cmake/bazel_to_cmake_converter.py"
    },
    {
      "type": "modify",
      "old_id": "1124f0435c252299bbe1e13dba0f431fd8cd4a4a",
      "old_mode": 33188,
      "old_path": "build_tools/cmake/iree_amdgpu_binary.cmake",
      "new_id": "a025c027257aaaa0522cbc5c0297328a4c748601",
      "new_mode": 33188,
      "new_path": "build_tools/cmake/iree_amdgpu_binary.cmake"
    },
    {
      "type": "modify",
      "old_id": "4d9377ad5f9e881e2f058f329f668e89184f0911",
      "old_mode": 33188,
      "old_path": "build_tools/cmake/iree_llvm.cmake",
      "new_id": "0c52e3253dee09521e74c5255667de8f9290b811",
      "new_mode": 33188,
      "new_path": "build_tools/cmake/iree_llvm.cmake"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "ec351f5c9cdcda30b90f367fac5029107442c8ea",
      "new_mode": 33188,
      "new_path": "build_tools/scripts/BUILD.bazel"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "9016d346afebd1c254ceee7349f48fad0794a0e7",
      "new_mode": 33261,
      "new_path": "build_tools/scripts/amdgpu_device_binaries.py"
    },
    {
      "type": "modify",
      "old_id": "c637a313d4d29874ac836d6555d0893a4b50dcd8",
      "old_mode": 33261,
      "old_path": "build_tools/scripts/amdgpu_target_map.py",
      "new_id": "679be9dc1d5a6b60c8211b8a4e81e52170f5dfaa",
      "new_mode": 33261,
      "new_path": "build_tools/scripts/amdgpu_target_map.py"
    },
    {
      "type": "modify",
      "old_id": "e35cca66a6048d7546c720ce24889ef3ae7a6593",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/amdgpu/BUILD.bazel",
      "new_id": "be77679b3d3d5f1dc869dde36866a87246d0b525",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/amdgpu/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "4aa0bb8bf88a6e477258b4bc1d1bb71e3eda7648",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/amdgpu/CMakeLists.txt",
      "new_id": "e2bf10ddab392ae89ed00461f8006abf2520fde4",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/amdgpu/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "05d1861a8801a6143abd94dce99e0ef439e003a7",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/amdgpu/README.md",
      "new_id": "dc402ad31e2dd5e3b546ab6f1dab5c7a5c669142",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/amdgpu/README.md"
    },
    {
      "type": "modify",
      "old_id": "0ec0147cd5211d26981813510ecbf317d7e0089b",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/amdgpu/abi/BUILD.bazel",
      "new_id": "1586fda13e0aaa2c7d78d8adf689b856b9fff9e9",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/amdgpu/abi/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "2c6cc74c2a0346de8e5cca86dd92b90f26f67b17",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/amdgpu/abi/CMakeLists.txt",
      "new_id": "5cd25c443c31653d0edc8e31a6fb4c92e73d0f44",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/amdgpu/abi/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "2cc367a4ba1cb4c0fdd3d8d7b7cfa4b41c8401e2",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/amdgpu/device/BUILD.bazel",
      "new_id": "7a5ef96a9ce9190cfa8041140ad57c631d7ef255",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/amdgpu/device/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "c7c716c032afce980a272161700b67a5a9e0e22b",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/amdgpu/device/binaries/BUILD.bazel",
      "new_id": "eb52cf173fd7823d200c627adb2d8b47c5a9111b",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/amdgpu/device/binaries/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "b4a541e9e7b58710717f0350a5990b07f6bc701d",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/amdgpu/device/binaries/CMakeLists.txt",
      "new_id": "00edc68389bafc33b04e32e95b41235b58207785",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/amdgpu/device/binaries/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "e12cb009d61cf4bb40993297ab7afaa79e9dd3fa",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/amdgpu/device/binaries/README.md",
      "new_id": "4efaafa17088c351a319bb96839ba8954eae37c3",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/amdgpu/device/binaries/README.md"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "9f576fb399d7d7dfaa3d33274bfe4563744bcd20",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/amdgpu/device/binaries/prebuilt/BUILD.bazel"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "31613d123604b56d7d63e0bfe3182bc99a7c68c1",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/amdgpu/device/binaries/prebuilt/CMakeLists.txt"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "6acc53ba7e6cb3a670c4eebe313620560fdf5fed",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/amdgpu/device/binaries/prebuilt/amdgcn-amd-amdhsa--gfx10-1-generic.so"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "3d40e627c90e74428a2e67a4e43621d0d9969896",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/amdgpu/device/binaries/prebuilt/amdgcn-amd-amdhsa--gfx10-3-generic.so"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "45bde6b76f857f4a40d4b7eb0b505006a84153e6",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/amdgpu/device/binaries/prebuilt/amdgcn-amd-amdhsa--gfx11-generic.so"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "f1ecefa0661007159f532c89ff4d4997864cf7fc",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/amdgpu/device/binaries/prebuilt/amdgcn-amd-amdhsa--gfx12-generic.so"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "750194aa0d999821a4002e80853bb9e15e8fa95b",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/amdgpu/device/binaries/prebuilt/amdgcn-amd-amdhsa--gfx9-4-generic.so"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "15e6fc4b830ee742cba3cb6c53efd6b3e2408c8d",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/amdgpu/device/binaries/prebuilt/amdgcn-amd-amdhsa--gfx9-generic.so"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "92544dbfea12f303dac7a9a00ee66ee9f4a89168",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/amdgpu/device/binaries/prebuilt/amdgcn-amd-amdhsa--gfx90a.so"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "ec52480235ec1c1103555b8e395f3c9f5d00a361",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/amdgpu/device/binaries/source/BUILD.bazel"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e7954f48646ea1ba41fa9ddb26ea62b91b59def3",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/amdgpu/device/binaries/source/CMakeLists.txt"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "c53638c757c460cc64f07bd32f8861a7c1680753",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/amdgpu/device/binaries/source/targets.bzl"
    },
    {
      "type": "modify",
      "old_id": "820c0d3926a5633fbd33a7b756a108cbcb5a5733",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/amdgpu/device/binaries/target_map.bzl",
      "new_id": "ff71641ac1e7566631b39e8d398f2d12ab41af95",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/amdgpu/device/binaries/target_map.bzl"
    },
    {
      "type": "modify",
      "old_id": "42cb5efa1d6ffa1843955e7a736490a59a97892f",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/amdgpu/device/binaries/target_map.cmake",
      "new_id": "da91101427b6455cc71856400ecc775dd6dad798",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/amdgpu/device/binaries/target_map.cmake"
    },
    {
      "type": "modify",
      "old_id": "4e9d860cc3105850fed8e11333e159430e050905",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/amdgpu/device/binaries/targets.bzl",
      "new_id": "85d1b76741d8c76b14d48356f552dc935e35f6c2",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/amdgpu/device/binaries/targets.bzl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "61b7cc98685989e135e9c68ffe202f03d93a8a7b",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/amdgpu/device/device_bitcode_sources.bzl"
    },
    {
      "type": "modify",
      "old_id": "26a318e0680f7e762dfebd79d8619ef8cae9430b",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/amdgpu/device/support/common.h",
      "new_id": "e7b328ea7aa5769cf6d6c034664bcbeb604db72e",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/amdgpu/device/support/common.h"
    },
    {
      "type": "modify",
      "old_id": "61feadb1664d6bec77f84de308a034c7eb1dbbe3",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/amdgpu/util/device_library_target_test.cc",
      "new_id": "27fe08f71493430d5805da66c9f22e9c000b55e6",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/amdgpu/util/device_library_target_test.cc"
    },
    {
      "type": "modify",
      "old_id": "0e3bad14dbe1e519a0aeaf90d1b4cb25ff61b0c7",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/amdgpu/util/target_id.c",
      "new_id": "93dcb0dcccf8727005b2cb24a3dc0161445e4c6e",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/amdgpu/util/target_id.c"
    }
  ]
}
