)]}'
{
  "commit": "2b05c5dbb2f2ecb27c0d3941e80ee8d2f16e890d",
  "tree": "80a1713b2bf8e7286bf567475ecf600c2f0d646a",
  "parents": [
    "389229ea7f58db038f3de185afe58e76abef407d"
  ],
  "author": {
    "name": "WMC",
    "email": "tnwilly@gmail.com",
    "time": "Wed Sep 16 22:11:06 2026 +0800"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Sep 16 16:11:06 2026 +0200"
  },
  "message": "[CUDA] Preserve executable export names independently from PTX symbols (#24889)\n\n## Motivation\n\nWhile testing [Qwen3.8-27B](https://huggingface.co/Qwen/Qwen3.8-27B)\nend-to-end with IREE, I found a CUDA executable lookup failure.\n\n## Summary\n\nCUDA executable serialization sanitizes kernel names for PTX, but\npreviously used that same sanitized name as the IREE executable export\nidentity.\n\nThis breaks modules whose generated dispatch names contain characters\nthat are not valid PTX symbols, such as `$`. Turbine-exported modules\ncan contain names such as `forward$async_dispatch_*`: compilation\nsucceeds, but CUDA executable creation fails at runtime.\n\nThis change stores the original IREE export name separately from the\nsanitized PTX kernel symbol:\n\n- `kernel_name` remains the sanitized symbol used by\n`cuModuleGetFunction`.\n- `export_name` preserves the original name used by\n`hal.executable.lookup.function`.\n\n`export_name` is an appended optional FlatBuffer field. Updated runtimes\nfall back to `kernel_name` when loading older VMFBs that do not contain\nit.\n\n\n## Minimal reproduction\n\nA standalone IREE module with a public function containing `$`\nreproduces the failure:\n\n```mlir\nfunc.func @qwen$prefill(%input: tensor\u003c4xf32\u003e) -\u003e tensor\u003c4xf32\u003e {\n  %output \u003d tensor.empty() : tensor\u003c4xf32\u003e\n  %result \u003d linalg.generic {\n      indexing_maps \u003d [\n        affine_map\u003c(d0) -\u003e (d0)\u003e,\n        affine_map\u003c(d0) -\u003e (d0)\u003e\n      ],\n      iterator_types \u003d [\"parallel\"]\n    }\n    ins(%input : tensor\u003c4xf32\u003e) outs(%output : tensor\u003c4xf32\u003e) {\n      ^bb0(%in: f32, %out: f32):\n        %scaled \u003d arith.mulf %in, %in : f32\n        linalg.yield %scaled : f32\n    } -\u003e tensor\u003c4xf32\u003e\n  return %result : tensor\u003c4xf32\u003e\n}\n```\n\n```\niree-compile repro.mlir \\\n  --iree-hal-target-backends\u003dcuda \\\n  --iree-cuda-target\u003dsm_120 \\\n  --iree-cuda-target-features\u003d+ptx87 \\\n  -o repro.vmfb\n\niree-run-module \\\n  --module\u003drepro.vmfb \\\n  --device\u003dcuda \\\n  --function\u003d\u0027qwen$prefill\u0027 \\\n  --input\u003d4xf32\u003d1\n```\n\n## Error\n```\nNOT_FOUND; function \u0027qwen$prefill\u0027 not found in executable\n```\nChanging only the public symbol to `@qwen_prefill` succeeds and produces\nthe expected result.\n\n## Testing\n\nBuilt `iree-compile` and `iree-run-module`, then ran the repro on CUDA\nSM120 with PTX 8.7.\nAfter this change it succeeds:\n\n```text\nEXEC @qwen$prefill\nresult[0]: hal.buffer_view\n4xf32\u003d1 1 1 1\n```\n\nSigned-off-by: weimin023 \u003ctnwilly@gmail.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "239e85ce9653e146c1b58af94cd22009f239f2cf",
      "old_mode": 33188,
      "old_path": "compiler/plugins/target/CUDA/CUDATarget.cpp",
      "new_id": "97b84f38d422bf9fc5f2a8ef7a0ec44cfc4b8f5d",
      "new_mode": 33188,
      "new_path": "compiler/plugins/target/CUDA/CUDATarget.cpp"
    },
    {
      "type": "modify",
      "old_id": "93d9d6f36adb54b154f371c4dfc1561e6532aa8e",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/cuda/native_executable.c",
      "new_id": "29fcc7f29154c1c75cc6798ef7ba646ac4bd318c",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/cuda/native_executable.c"
    },
    {
      "type": "modify",
      "old_id": "afb2834829f0d24a3bf19f5985839a45a5810e6e",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/schemas/cuda_executable_def.fbs",
      "new_id": "038d125777e5bdb617001a06af3aacd24033362e",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/schemas/cuda_executable_def.fbs"
    }
  ]
}
