[PATCH] D80858: [CUDA][HIP] Support accessing static device variable in host code
Yaxun Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 27 19:56:42 PDT 2020
yaxunl added a comment.
In D80858#2177159 <https://reviews.llvm.org/D80858#2177159>, @tra wrote:
> It's a good point. Perhaps this is one of the cases where we should *not* follow nvcc.
> We can't have our cake (preserve static behavior) and eat it (treat it as non-static in case something on the host side may decide to use an API which uses symbol names). Something's got to give. While we could make it work in some cases, I don't think we can make it work consistently.
> I think it would be reasonable to restrict APIs that access symbols by name to be applicable to visible symbols only.
Agree, we only need to support accessing static device var by shadow var (runtime API), which is sufficient for most apps.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80858/new/
https://reviews.llvm.org/D80858
More information about the cfe-commits
mailing list