)]}'
{
  "commit": "c77a5f5350a1f167fb4e752c1fb31a82e11f300c",
  "tree": "708ea563dc2dbcc0a463bece1048c4d70d7ef602",
  "parents": [
    "756668022bdc35107ce01d2dfbbfc20f5d0faf73",
    "1acbedc9599945b7116b8245b12ed75d723136cd"
  ],
  "author": {
    "name": "Ben Vanik",
    "email": "ben.vanik@gmail.com",
    "time": "Tue Aug 27 15:51:17 2024 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Aug 27 15:51:17 2024 -0700"
  },
  "message": "Merging simplified HAL bindings branch. (#18366)\n\nThis removes the concept of descriptor sets and pipeline layouts from\r\nthe HAL and switches programs to using a flat list of bindings per\r\ndispatch as real programs rarely benefited and will do so less as\r\ncommand buffer reuse is enabled. Command buffer recording is now\r\nstateless as the information in push constants and push descriptor set\r\ncommands are carried per dispatch and there\u0027s no need to track pipeline\r\nlayouts. Pipeline layouts are still present in a reduced form in the\r\ncompiler IR in order to handle dispatch ABI in a normalized way but it\u0027s\r\nup to the TargetBackends to encode them. Encoded metadata for pipeline\r\nlayouts is now embedded in the target-specific executables for targets\r\nthat require them (Metal/Vulkan/WebGPU/D3D12) and a reduced set of\r\ninformation is embedded for others. This simplifies the HAL API quite a\r\nbit, makes implementing the HAL easier as targets have more freedom in\r\nhow constants and bindings are mapped to lower-level implementations,\r\nand in practice improves command buffer recording latency as there are\r\nfewer VM calls per dispatch on average.\r\n\r\nSince the flatbuffers needed to change to include the new metadata that\r\npreviously was handled via the HAL APIs this branch also modernizes and\r\nnormalizes the flatbuffers across targets to both better match the\r\nimplementation and support features like multiple shader modules/kernel\r\nlibraries/etc per HAL executable (even if the compiler isn\u0027t linking\r\nthem yet). This reorganization is required to effectively manage cached\r\nresources - before the compiler would deduplicate pipeline layouts\r\nacross all executables but now that each executable is responsible for\r\nthat having 1000 executables means that there will be 1000 pipeline\r\nlayouts even if most are the same. Perhaps this will serve as good\r\nmotivation to finally finish linking in all backends :) Debug info is\r\nalso consistently added for all targets and processed for tracing and\r\nfactored such that new debug info can be added per-exported function\r\nwithout needing to change per-target code.\r\n\r\nThere are many IR changes here and many test updates: most of the tests\r\nthat were updated are in codegen and should not be using HAL ops at all.\r\nAs codegen test cleanup continues to switch from HAL ops to basic\r\nfunctions future changes to the HAL IR will be easier. Notable changes\r\ninclude:\r\n* Renamed `push_constants` to `constants` (as there is no longer a\r\n`push_constants` API)\r\n* Dropped `#hal.descriptor_set.layout`\r\n* Removed ordinal from `#hal.descriptor_set.binding` (as ordinals are\r\nnow implicit)\r\n* Renamed `#hal.descriptor_set.binding` to `#hal.pipeline.binding`\r\n* Removed `set` from `hal.interface.binding.subspan`\r\n* Removed `#hal.interface.binding` and the spooky action at a distance\r\n`hal.interface.binding` attr now that ordinals are implicit\r\n\r\nMetal/CUDA/Vulkan/HIP/CPU have all been updated to the new binding\r\nmodel. WebGPU has had some changes applied but needs some significant\r\nspecialized work due to its existing push constant emulation requiring\r\ncompiler-side descriptor sets. That\u0027s left for future work when that\r\nexperimental backend is revived.\r\n\r\nThis bumps the HAL version to 5 (types removed and methods changed) and\r\nthe CPU executable library version to 5 (added reserved per-export\r\nfields for future use).\r\n\r\nFixes #18154.",
  "tree_diff": []
}
