Repository navigation
[SYCL][Driver] Select the device sanitizer library for all intel_gpu_* aliases - #23494
KornevNikita merged 3 commits into
Conversation
…* aliases The device sanitizer library was selected by comparing the -fsycl-targets value with the exact strings intel_gpu_pvc and intel_gpu_dg2*, so aliases of the same devices, e.g. intel_gpu_12_60_7 for PVC or intel_gpu_12_55_8 and intel_gpu_acm_g10 for DG2, got the generic library. Resolve the alias to the device first, as done for -device with spir64_gen.
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
1 open finding
What changed in this PR
This PR fixes SYCL device sanitizer library selection for Intel GPU target aliases by resolving intel_gpu_* aliases to their canonical Gen device first, ensuring PVC/DG2 aliases get the correct sanitizer bitcode libraries.
Changes:
- Add driver logic to resolve
intel_gpu_*targets before selecting PVC/DG2 sanitizer libraries. - Extend driver tests to cover sanitizer library selection for PVC/DG2 alias targets (e.g.,
intel_gpu_12_60_7,intel_gpu_12_55_8,intel_gpu_acm_g10).
| File | Description |
|---|---|
| clang/test/Driver/sycl-device-lib.cpp | Adds RUN lines to validate sanitizer library selection for additional Intel GPU alias targets. |
| clang/lib/Driver/ToolChains/SYCL.cpp | Resolves Intel GPU aliases prior to deciding which device sanitizer library set (PVC/DG2) to link. |
🧠 Review effort: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
iclsrc
left a comment
There was a problem hiding this comment.
The change looks correct. getSingleBuildTarget now resolves intel_gpu_* aliases through resolveGenDevice. As a result, intel_gpu_12_60_7 selects the PVC sanitizer library, and intel_gpu_12_55_8 and intel_gpu_acm_g* select the DG2 library, as do intel_gpu_dg2 and intel_gpu_dg2_g*. The old starts_with("intel_gpu_dg2") behavior is preserved, because dg2_g10/11/12 resolve to acm_g10/11/12. I only read the code and did not build or run the tests. I found no correctness issues. The tests cover the new aliases for the ASan, MSan and TSan PVC paths and the ASan DG2 path. I left one minor readability suggestion inline.
|
@intel/llvm-gatekeepers please consider merging |
The bundler, runtime and sanitizer library fixes have landed in sycl (intel#23491, intel#23493, intel#23494), so their copies are dropped here. The linker wrapper fix is updated to the version in intel#23492.

Fixes #23490.
The device sanitizer library was selected by comparing
-fsycl-targetswith the exact stringsintel_gpu_pvcandintel_gpu_dg2*, so aliases such asintel_gpu_12_60_7(PVC) orintel_gpu_12_55_8andintel_gpu_acm_g10(DG2) got the generic library. The alias is now resolved first.Split out of #23441, which moves users from
-device 12.60.7tointel_gpu_<arch>.