[PATCH] D80858: [CUDA][HIP] Support accessing static device variable in host code for -fno-gpu-rdc

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 10 13:45:26 PDT 2020


yaxunl added a comment.

In D80858#2207898 <https://reviews.llvm.org/D80858#2207898>, @tra wrote:

>> We can restrict externalization to constant variables with explicit 'constant' attributes only, which should fix this issue.
>
> SGTM. If it does not have explicit device-side attribute, it's never going to need to cross host/device boundary. I guess this applies to vars with `__device__` attribute, too.

I think we only add implicit `__constant__`  attributes for variables, not `__device__` attributes.

The fix is here https://reviews.llvm.org/D85686


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80858/new/

https://reviews.llvm.org/D80858



More information about the cfe-commits mailing list