[llvm] [NVPTX] Improved support for grid_constant (PR #97112)
Artem Belevich via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 11 16:29:36 PDT 2024
Artem-B wrote:
@akshayrdeodhar , @jholewinski -- is `cvta.param` intended to be used on *any* `.param` data? Can it be used in `__device__` functions if we know we never write to the pointer? Or is it intended to be used on kernels only?
NVCC appears to use it for the kernels only, but I can't tell if that's an inherent restriction on the instruction use, or if it just happens that NVCC enables it for parameters with `__grid_constant__` argument only, which can be used only by the kernels.
[PTX specs](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cvta) do not seem to specify it explicitly. They do link to "kernel function parameters" when they mention `.param`, but other than that it reads as if the instruction is applicable to all `.param` space data.
https://github.com/llvm/llvm-project/pull/97112
More information about the llvm-commits
mailing list