[llvm] [NVPTX] Add ptxas verification and kernel test to sm-version test (PR #139543)
Artem Belevich via llvm-commits
llvm-commits at lists.llvm.org
Tue May 13 11:24:27 PDT 2025
================
@@ -56,6 +56,64 @@
; RUN: llc < %s -mtriple=nvptx64 -mcpu=sm_121 | FileCheck %s --check-prefix=SM121
; RUN: llc < %s -mtriple=nvptx64 -mcpu=sm_121a | FileCheck %s --check-prefix=SM121a
+; RUN: %if ptxas %{ llc < %s -mtriple=nvptx -mcpu=sm_20 | %ptxas-verify %}
----------------
Artem-B wrote:
Not quite.
`ptxas-X.Y` means "ptxas version X.Y or newer" which usually aligns with "CUDA SDK version X.Y". You need to find the range of CUDA versions that support the SM you need (https://en.wikipedia.org/wiki/CUDA#GPUs_supported) and the range of versions that support the PTX version you want (https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#release-notes-ptx-release-history)
Then constrain ptxas version to the union of those CUDA version ranges.
https://github.com/llvm/llvm-project/pull/139543
More information about the llvm-commits
mailing list