[llvm] [NVPTX] Add ptxas verification and kernel test to sm-version test (PR #139543)
Puja Saha via llvm-commits
llvm-commits at lists.llvm.org
Tue May 13 06:27:31 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 %}
----------------
puja2196 wrote:
Yeah okay, Understood.
>From PTX ISA: http://sw-mobile-docs/CUDA/GPGPU/parallel-thread-execution/index.html#ptx-module-directives-target
Target string sm_20 introduced in PTX ISA version 2.0.
Target string sm_30 introduced in PTX ISA version 3.0.
Target string sm_35 introduced in PTX ISA version 3.1.
Target strings sm_32 and sm_50 introduced in PTX ISA version 4.0.
Target strings sm_37 and sm_52 introduced in PTX ISA version 4.1. and so on.....
And sm_20 will be supported with all PTX ISA version 2.0+. So In the line for sm_20, can we have like below:
; RUN: %if ptxas && ptxas-2.0+ %{ llc < %s -mtriple=nvptx -mcpu=sm_20 | %ptxas-verify -arch=sm_20 %}
instead of "%if ptxas && !ptxas-10.0"
Let me know what you think..
Also need some modifications in the PTX ISA versions wrt to the target based on the PTX ISA page.
https://github.com/llvm/llvm-project/pull/139543
More information about the llvm-commits
mailing list