Similar to D146767
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/CodeGen/NVPTX/local-variable-big.ll | ||
---|---|---|
9 | Such a large allocation will certainly cause all sorts of other issues -- we can't allocate that much on a GPU, as it would have to be done for thousands of threads simultaneously. PTXAS will accept large values, but appears to overflow internally, so the SASS it produces is broken. With valies more than 2GB (signed overflow?) it does not allocate anything on stack at all. With larger valies NVCC just crashes. https://godbolt.org/z/En716v36P Ideally we should error out and tell the user that we can't produce sensible code for values that do not fit in 31 bits. |
Such a large allocation will certainly cause all sorts of other issues -- we can't allocate that much on a GPU, as it would have to be done for thousands of threads simultaneously.
Also the stack register on NVIDIA GPUs is 32-bit.
PTXAS will accept large values, but appears to overflow internally, so the SASS it produces is broken. With valies more than 2GB (signed overflow?) it does not allocate anything on stack at all. With larger valies NVCC just crashes. https://godbolt.org/z/En716v36P
Ideally we should error out and tell the user that we can't produce sensible code for values that do not fit in 31 bits.