[PATCH] D88250: [CUDA] Added dim3/uint3 conversion functions to builtin vars.
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 24 11:08:34 PDT 2020
tra created this revision.
tra added a reviewer: jlebar.
Herald added subscribers: sanjoy.google, bixia, yaxunl.
Herald added a project: clang.
tra requested review of this revision.
This is needed to compile some headers in CUDA-11 that assume that threadIdx is
implicitly convertible to dim3. With NVCC, threadIdx is uint3 and there's
dim3(uint3) constructor, so that works. Clang uses a special type for the threadIdx,
so dim3 can't be constructed from it. Instead, this patch adds conversion function to the
builtin variable classes.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D88250
Files:
clang/lib/Headers/__clang_cuda_builtin_vars.h
clang/lib/Headers/__clang_cuda_runtime_wrapper.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88250.294119.patch
Type: text/x-patch
Size: 3294 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200924/64eee4df/attachment-0001.bin>
More information about the cfe-commits
mailing list