diff options
author | Yaxun (Sam) Liu <yaxun.liu@amd.com> | 2023-09-14 15:56:02 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-14 15:56:02 -0400 |
commit | d7e1932f857986df039b222619623428dc4ffe30 (patch) | |
tree | ec59d7075e70cb222fdaf4d39ff82d7778a49887 /llvm/docs/tutorial | |
parent | cafb6284d18bbdb952ae6d5e4aa97912d57dbfb8 (diff) | |
download | llvm-d7e1932f857986df039b222619623428dc4ffe30.zip llvm-d7e1932f857986df039b222619623428dc4ffe30.tar.gz llvm-d7e1932f857986df039b222619623428dc4ffe30.tar.bz2 |
[HIP] Fix comdat of template kernel handle (#66283)
Currently, clang emits LLVM IR that fails verifier for the following
code:
```
template<typename T>
__global__ void foo(T x);
void bar() {
foo<<<1, 1>>>(0);
}
```
This is due to clang putting the kernel handle for foo into comdat,
which is not allowed, since the kernel handle is a declaration.
The siutation is similar to calling a declaration-only template
function. The callee will be a declaration in LLVM IR and won't be put
into comdat. This is in contrast to calling a template function with
body, which will be put into comdat.
Fixes: SWDEV-419769
Diffstat (limited to 'llvm/docs/tutorial')
0 files changed, 0 insertions, 0 deletions