)]}'
{
  "commit": "42f300cbf843982f52e3ee73d35c5d17f4a84d71",
  "tree": "829c00481d5cd634a409731e1cbe133e628183c4",
  "parents": [
    "fa27b1c0fcc1122ec5a3c11a50c9a85ab264bf8b"
  ],
  "author": {
    "name": "Alex Vasile",
    "email": "48962821+Alex-Vasile@users.noreply.github.com",
    "time": "Mon Jun 29 08:56:43 2026 -0400"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon Jun 29 14:56:43 2026 +0200"
  },
  "message": "[Metal] Fix staging buffer overflow on large update_buffer uploads (#24643)\n\nupdate_buffer payloads were appended into the single device-shared,\nfixed-capacity (default 128 KiB) staging buffer. Its offset only resets\nwhen all command buffers using it are destroyed, so an oversized host\nupload chunked by the generic queue_emulated_update (e.g. a ~1 MiB\nupload split into 64 KiB pieces, all recorded into one command buffer)\nexhausts the region on the third chunk and fails with\nRESOURCE_EXHAUSTED. This also forced bulk updates to compete with\ndispatch argument buffers for the budget the 128 KiB constant was sized\nfor.\n\nKeep the shared staging buffer as an opportunistic fast path for\npayloads that fit, and spill to a dedicated shared-storage MTLBuffer\nwhen one does not fit the remaining capacity. Dedicated buffers are\nretained for the command buffer\u0027s lifetime (released in\ncommand_buffer_reset, which runs only after the GPU completes via the\nsubmission resource set) and used as the blit-copy source. This handles\narbitrary update sizes and counts without touching the driver-generic\nqueue_emulation chunking, matching how Vulkan and CUDA capture update\npayloads per-command rather than in a shared fixed region.\n\nFixes the aligned16_mib sub-case of\nCTS/CommandBufferCopyBufferTest.CopySizeAndAlignmentClasses/metal.\n\nSigned-off-by: Alex Vasile\n\u003c48962821+Alex-Vasile@users.noreply.github.com\u003e\n\nSigned-off-by: Alex Vasile \u003c48962821+Alex-Vasile@users.noreply.github.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "acefdcd14f9a32543e40590986d8f1116fad9f43",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/metal/direct_command_buffer.m",
      "new_id": "30ccaf2fe3ad5a12265ba81e70198ebf0619d481",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/metal/direct_command_buffer.m"
    }
  ]
}
