[PATCH] D85223: [CUDA][HIP] Support accessing static device variable in host code for -fgpu-rdc
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 9 10:59:21 PST 2021
tra added a comment.
What breaks existing abstractions is that we produce N ELF objects from a single TU and the meaning of `static` becomes fuzzy. On one hand, we don't want that static symbol to be visible across objects on the same target, at the same time we do want it to be visible across host/device objects compiled from the same TU. ELF does not have a way to express it. Making such symbols visible with an unique suffix seems to be a reasonable tradeoff. We probably have more options available for AMDGPU. E.g. as you've suggested, give runtime extra clues about referencing these variables across host/device boundary without resorting to making them externally visible. However, we don't have that flexibility for NVPTX.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85223/new/
https://reviews.llvm.org/D85223
More information about the cfe-commits
mailing list