)]}'
{
  "commit": "ed4d7da767ae2dcaa5904d483a04661b79a48fa6",
  "tree": "a83c65205813d51adc97cda70d0610845226f93f",
  "parents": [
    "b1683a29b49578766fcf3d252ead02a8465b7cb5"
  ],
  "author": {
    "name": "Jelle Schühmacher",
    "email": "schuehmacher@roofline.ai",
    "time": "Tue Nov 10 15:31:52 2026 +0100"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Nov 10 15:31:52 2026 +0100"
  },
  "message": "[StableHLO] Add plugin registration for composite and custom-call rewrites (#25067)\n\nCompiler plugins need to recognize StableHLO composites and custom calls\nbefore input conversion removes their identity. Add a TargetRegistry and\npreprocessing pipeline helper through the existing compiler plugin hook.\n\nComposite handlers register by exact name and version; custom-call\nhandlers register by target name. Passes own immutable registry\nsnapshots, and registrations can declare the dialects their handlers\ncreate.\n\nHandlers receive the original operation, including all operands and\nregions. They validate applicability before modifying IR and leave IR\nunchanged when declining. Remaining composites retain their\ndecomposition fallback. Custom calls with effects, aliases, tokens, or\nfutures are excluded from registered dispatch.\n\nThe preprocessing helper checks for unsupported mixed StableHLO/VHLO\ninput, deserializes VHLO, and runs registered rewrites before ordinary\ninput conversion.\n\nThis provides the specialization point used by PyTorch → TorchAX exports\nto preserve operations such as attention and quantization through\nStableHLO lowering. Mutable model buffers remain explicit state inputs\nand outputs; buffer donation enables storage reuse independently of\ncomposite specialization.\n\nThis PR supplies the registry and preprocessing infrastructure.\nProducer-specific handlers and alias-support opt-in are separate\nchanges. Tests cover registry ownership and matching, preprocessing,\noriginal operand/region preservation, and chained declines followed by\ndecomposition fallback.\n\nAssisted-by: codex\n\n---------\n\nSigned-off-by: Jelle Schuhmacher \u003cschuehmacher@roofline.ai\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "9801560f948b2265b2ac44146e052d788881bb65",
      "old_mode": 33188,
      "old_path": "build_tools/bazel_to_cmake/bazel_to_cmake_targets.py",
      "new_id": "81473e3693d920f8ebd014b66b8dfef27afed35a",
      "new_mode": 33188,
      "new_path": "build_tools/bazel_to_cmake/bazel_to_cmake_targets.py"
    },
    {
      "type": "modify",
      "old_id": "72311385fd75abd81ca2802388368d2cf591b5ad",
      "old_mode": 33188,
      "old_path": "compiler/plugins/input/StableHLO/Conversion/BUILD.bazel",
      "new_id": "1d48f10f3172739988f6f2eb46a615ffdc648d36",
      "new_mode": 33188,
      "new_path": "compiler/plugins/input/StableHLO/Conversion/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "018b4372cba5101abcb762f9c514f9bf4c7f52af",
      "old_mode": 33188,
      "old_path": "compiler/plugins/input/StableHLO/Conversion/CMakeLists.txt",
      "new_id": "fae31b17b1c4088bc1f75be79f6363464928db16",
      "new_mode": 33188,
      "new_path": "compiler/plugins/input/StableHLO/Conversion/CMakeLists.txt"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "eac1653268dafec0cc69dd94e7a33415bffa9168",
      "new_mode": 33188,
      "new_path": "compiler/plugins/input/StableHLO/Conversion/CustomCallAndCompositePreprocessing.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "5b8a95847f88f9ed8970bc8a9f25d23a6203293e",
      "new_mode": 33188,
      "new_path": "compiler/plugins/input/StableHLO/Conversion/CustomCallAndCompositePreprocessing.h"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "dbaab514c91277f909de1b9cbcacaeaf9dcfc058",
      "new_mode": 33188,
      "new_path": "compiler/plugins/input/StableHLO/Conversion/StableHLOCustomCallMetadata.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "13302afe3e84724ded0ba40d8a57e30350fa2ad3",
      "new_mode": 33188,
      "new_path": "compiler/plugins/input/StableHLO/Conversion/StableHLOCustomCallMetadata.h"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "47e72c96a0fab83080ee19066a2845a46e394e4f",
      "new_mode": 33188,
      "new_path": "compiler/plugins/input/StableHLO/Conversion/TargetRegistry.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "91edca63126499ea92ba474a684d764b26104bb6",
      "new_mode": 33188,
      "new_path": "compiler/plugins/input/StableHLO/Conversion/TargetRegistry.h"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "f53dee241a1ee9f3b1afb43de838e64a5e39abaa",
      "new_mode": 33188,
      "new_path": "compiler/plugins/input/StableHLO/Conversion/TargetRegistryPasses.td"
    },
    {
      "type": "modify",
      "old_id": "3a3b2f6f342cc49335b8aa4943237462845967e2",
      "old_mode": 33188,
      "old_path": "compiler/plugins/input/StableHLO/Conversion/test/BUILD.bazel",
      "new_id": "987fd79131ece9ef12e8b837de2c84dc960a5cb4",
      "new_mode": 33188,
      "new_path": "compiler/plugins/input/StableHLO/Conversion/test/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "5e024aee850dacf8d6f84f6ed5ad4bf50ba9d8e0",
      "old_mode": 33188,
      "old_path": "compiler/plugins/input/StableHLO/Conversion/test/CMakeLists.txt",
      "new_id": "e16872047c7fb7c106b146891a98692cd5932361",
      "new_mode": 33188,
      "new_path": "compiler/plugins/input/StableHLO/Conversion/test/CMakeLists.txt"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "2f7cd96ee5f5f31ac8201c6e7932b1571f3c1115",
      "new_mode": 33188,
      "new_path": "compiler/plugins/input/StableHLO/Conversion/test/CustomCallAndCompositePreprocessingTest.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "16d80a9348c2f121d4a8e6edccc19f6f028b34fd",
      "new_mode": 33188,
      "new_path": "compiler/plugins/input/StableHLO/Conversion/test/TargetPipelineTest.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "24a4b47b2a18405211bb84d2e669b144ce8111b9",
      "new_mode": 33188,
      "new_path": "compiler/plugins/input/StableHLO/Conversion/test/TargetRegistryTest.cpp"
    }
  ]
}
