kernels in anonymous name space needs to have unique name
to avoid duplicate symbols.
Details
- Reviewers
tra - Commits
- rG4ea1d435099f: [CUDA][HIP] Externalize kernels in anonymous name space
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/test/CodeGenCUDA/kernel-in-anon-ns.cu | ||
---|---|---|
14 | Will the externalized names be uniquified as well? E.g. if we compile with -fgpu-rdc, we do want the kernels to be externally visible, but we also don't want the names to clash if we have two TUs having the same external name for them. |
clang/test/CodeGenCUDA/kernel-in-anon-ns.cu | ||
---|---|---|
14 | Yes, the kernel name is uniquified with a hash of the source path and compile options. |
LGTM overall.
clang/test/CodeGenCUDA/kernel-in-anon-ns.cu | ||
---|---|---|
14 | Then we should probably include the unique suffix in the CHECK line. The RUN lines already provide specific cuid, so the fuffix will always be the same. |
clang/test/CodeGenCUDA/kernel-in-anon-ns.cu | ||
---|---|---|
14 | will do when committing |
Will the externalized names be uniquified as well?
E.g. if we compile with -fgpu-rdc, we do want the kernels to be externally visible, but we also don't want the names to clash if we have two TUs having the same external name for them.