Skip to content

Commit 7445a0a

Browse files
committed
[SYCL] Fix kernel name mangling for CUDA/HIP offload with shared libraries
SYCL kernel names are generated during template instantiation using MangleContext. When using SYCL offload to CUDA/HIP, kernel names must be consistent across compilation units, including shared libraries compiled separately. Previous approach only handled cross-ABI scenarios (Microsoft host + Itanium device). This left same-ABI scenarios (Itanium host + Itanium device) broken for shared libraries, as each compilation unit would generate different lambda numbering, resulting in runtime errors: No kernel named _ZTSZZ21performIncrementationENK... was found Solution: For SYCL offload compilation, always use createDeviceMangleContext() instead of createMangleContext(). Device mangling context uses DeviceLambdaManglingNumbers which provides globally consistent lambda numbering across compilation units. This ensures identical kernel names for: - Cross-ABI: Microsoft host + Itanium device (Windows + CUDA/HIP) - Same-ABI: Itanium host + Itanium device (Linux + CUDA/HIP) - Shared libraries compiled separately (.so/.dll) Fixes CMPLRLLVM-69642 Fixes CMPLRLLVM-69415
1 parent 307759c commit 7445a0a

File tree

4 files changed

+326
-367
lines changed

4 files changed

+326
-367
lines changed

a.out

681 KB
Binary file not shown.

0 commit comments

Comments
 (0)