[clang] [llvm] [NVPTX] Revamp NVVMIntrRange pass (PR #94422)

Artem Belevich via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 5 11:36:36 PDT 2024


Artem-B wrote:

> I've also re-enabled this pass in the TM, it was disabled years ago due to "numerical discrepancies" https://reviews.llvm.org/D96166. In our testing we haven't seen any issues with adding ranges to intrinsics, and I cannot find any further info about what issues were encountered.

I suspect part of the problem may be that the pass is initialized with a wrong default SM, and we may end up with a wrong range and that affects assumed grid size limits. IIRC the issue was fairly rare, so I would not be surprised if it's still there, just hard to reproduce. 

https://github.com/llvm/llvm-project/blob/461dcd4a000fa2b88759a275bc6803b89efc5972/llvm/lib/Target/NVPTX/NVVMIntrRange.cpp#L40

Considering that sm_20 is literally gone, we should at least bump the default SM there to be sm_35 so that we give correct ranges for the current GPU users.

https://github.com/llvm/llvm-project/pull/94422


More information about the llvm-commits mailing list