[PATCH] D80858: [CUDA][HIP] Support accessing static device variable in host code
Michael Liao via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 28 00:29:36 PDT 2020
hliao 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.
In fact, 'nvcc' does that by globalizing that static device variable.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80858/new/
https://reviews.llvm.org/D80858
More information about the cfe-commits
mailing list