Skip to content

[NVPTX] Fix ptxas tests from #135444 #136782

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 22, 2025
Merged

Conversation

modiking
Copy link
Contributor

ptxas needs to be updated to the correct arch to match what llc is outputting

@llvmbot
Copy link
Member

llvmbot commented Apr 22, 2025

@llvm/pr-subscribers-backend-nvptx

Author: None (modiking)

Changes

ptxas needs to be updated to the correct arch to match what llc is outputting


Full diff: https://github.com/llvm/llvm-project/pull/136782.diff

2 Files Affected:

  • (modified) llvm/test/CodeGen/NVPTX/addrspacecast-ptx64.ll (+2-2)
  • (modified) llvm/test/CodeGen/NVPTX/distributed-shared-cluster.ll (+1-1)
diff --git a/llvm/test/CodeGen/NVPTX/addrspacecast-ptx64.ll b/llvm/test/CodeGen/NVPTX/addrspacecast-ptx64.ll
index afd0a7fded64e..01326db9a8b16 100644
--- a/llvm/test/CodeGen/NVPTX/addrspacecast-ptx64.ll
+++ b/llvm/test/CodeGen/NVPTX/addrspacecast-ptx64.ll
@@ -1,8 +1,8 @@
 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
 ; RUN: llc -O0 < %s -mtriple=nvptx64 -mcpu=sm_90 -mattr=+ptx78 | FileCheck %s -check-prefixes=NOPTRCONV
 ; RUN: llc -O0 < %s -mtriple=nvptx64 -mcpu=sm_90 -mattr=+ptx78 --nvptx-short-ptr | FileCheck %s -check-prefixes=PTRCONV
-; RUN: %if ptxas-12.8 %{ llc -O0 < %s -mtriple=nvptx64 -mcpu=sm_90 -mattr=+ptx78 | %ptxas-verify %}
-; RUN: %if ptxas-12.8 %{ llc -O0 < %s -mtriple=nvptx64 -mcpu=sm_90 -mattr=+ptx78 --nvptx-short-ptr | %ptxas-verify %}
+; RUN: %if ptxas-12.8 %{ llc -O0 < %s -mtriple=nvptx64 -mcpu=sm_90 -mattr=+ptx78 | %ptxas-verify -arch=sm_90 %}
+; RUN: %if ptxas-12.8 %{ llc -O0 < %s -mtriple=nvptx64 -mcpu=sm_90 -mattr=+ptx78 --nvptx-short-ptr | %ptxas-verify -arch=sm_90 %}
 
 ; ALL-LABEL: conv_shared_cluster_to_generic
 define i32 @conv_shared_cluster_to_generic(ptr addrspace(7) %ptr) {
diff --git a/llvm/test/CodeGen/NVPTX/distributed-shared-cluster.ll b/llvm/test/CodeGen/NVPTX/distributed-shared-cluster.ll
index 8b6c554aeb9f2..10f3b9f36f95a 100644
--- a/llvm/test/CodeGen/NVPTX/distributed-shared-cluster.ll
+++ b/llvm/test/CodeGen/NVPTX/distributed-shared-cluster.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
 ; RUN: llc < %s -o - -mcpu=sm_90 -mattr=+ptx78 | FileCheck %s
-; RUN: %if ptxas-12.0 %{ llc < %s -mcpu=sm_90 -mattr=+ptx78| %ptxas-verify -arch=sm_90 %}
+; RUN: %if ptxas-12.8 %{ llc < %s -mcpu=sm_90 -mattr=+ptx78| %ptxas-verify -arch=sm_90 %}
 
 target triple = "nvptx64-nvidia-cuda"
 

Copy link
Member

@AlexMaclean AlexMaclean left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, assuming this has been verified locally with LLVM_PTXAS_EXECUTABLE

@modiking
Copy link
Contributor Author

LGTM, assuming this has been verified locally with LLVM_PTXAS_EXECUTABLE

Yep. Thanks for the quick review!

/data/mmo/llvm-project/build-rel$ LLVM_PTXAS_EXECUTABLE=/data/mmo/cuda-12.8/bin/ptxas /data/mmo/llvm-project/build-rel/bin/llvm-lit /data/mmo/llvm-project/llvm/test/CodeGen/NVPTX/distributed-shared-cluster.ll /data/mmo/llvm-project/llvm/tes
t/CodeGen/NVPTX/addrspacecast-ptx64.ll
-- Testing: 2 tests, 2 workers --
PASS: LLVM :: CodeGen/NVPTX/distributed-shared-cluster.ll (1 of 2)
PASS: LLVM :: CodeGen/NVPTX/addrspacecast-ptx64.ll (2 of 2)

Testing Time: 0.44s

Total Discovered Tests: 2

Passed: 2 (100.00%)

@modiking modiking merged commit 8dbf92e into llvm:main Apr 22, 2025
8 of 12 checks passed
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
ptxas needs to be updated to the correct arch to match what llc is
outputting
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
ptxas needs to be updated to the correct arch to match what llc is
outputting
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
ptxas needs to be updated to the correct arch to match what llc is
outputting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants