HomePhabricator

[CUDA] Added conversion functions to builtin vars.

Authored by tra on Sep 24 2020, 10:47 AM.

Description

[CUDA] Added conversion functions to builtin vars.

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. Clang uses a special type for the builtin variables, so
that path does not work. Instead, this patch adds conversion function to the
builtin variable classes. that will allow them to be converted to dim3 and uint3.

Differential Revision: https://reviews.llvm.org/D88250

Details

Committed
traSep 24 2020, 2:33 PM
Differential Revision
D88250: [CUDA] Added dim3/uint3 conversion functions to builtin vars.
Parents
rG2a96f47c5ffc: [AArch64] __builtin_return_address for PAuth.
Branches
Unknown
Tags
Unknown