[PATCH] D88345: [CUDA] Allow local `static const {__constant__, __device__}` variables.
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 1 13:53:38 PDT 2020
tra added a comment.
I've verified that clang with this patch can compile Tensorflow and that it can also compile `cooperative_groups.h` from CUDA-11.
================
Comment at: clang/test/SemaCUDA/device-var-init.cu:404
__host__ __device__ void hd_sema() {
static int x = 42;
}
----------------
yaxunl wrote:
> how does this work in device compilation? Is this equivalent to `static __device__ int x = 42`?
Correct.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88345/new/
https://reviews.llvm.org/D88345
More information about the cfe-commits
mailing list