Skip to content

[NVPTX] disable combine-mad test for newer ptxas #93919

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

Conversation

AlexMaclean
Copy link
Member

No description provided.

@AlexMaclean AlexMaclean requested a review from Artem-B May 31, 2024 04:02
@AlexMaclean AlexMaclean self-assigned this May 31, 2024
@llvmbot
Copy link
Member

llvmbot commented May 31, 2024

@llvm/pr-subscribers-backend-nvptx

Author: Alex MacLean (AlexMaclean)

Changes

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

1 Files Affected:

  • (modified) llvm/test/CodeGen/NVPTX/combine-mad.ll (+2-2)
diff --git a/llvm/test/CodeGen/NVPTX/combine-mad.ll b/llvm/test/CodeGen/NVPTX/combine-mad.ll
index fba389afdca39..df4f842c822ce 100644
--- a/llvm/test/CodeGen/NVPTX/combine-mad.ll
+++ b/llvm/test/CodeGen/NVPTX/combine-mad.ll
@@ -1,8 +1,8 @@
 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
 ; RUN: llc < %s -mtriple=nvptx -mcpu=sm_20 -O1 | FileCheck %s
 ; RUN: llc < %s -mtriple=nvptx64 -mcpu=sm_20 -O1 | FileCheck %s
-; RUN: %if ptxas %{ llc < %s -mtriple=nvptx -mcpu=sm_20 -O1 | %ptxas-verify %}
-; RUN: %if ptxas %{ llc < %s -mtriple=nvptx64 -mcpu=sm_20 -O1 | %ptxas-verify %}
+; RUN: %if ptxas && !ptxas-12.0 %{ llc < %s -mtriple=nvptx -mcpu=sm_20 -O1 | %ptxas-verify %}
+; RUN: %if ptxas && !ptxas-12.0 %{ llc < %s -mtriple=nvptx64 -mcpu=sm_20 -O1 | %ptxas-verify %}
 
 define i32 @test1(i32 %n, i32 %m) {
 ;

@AlexMaclean
Copy link
Member Author

@Artem-B, this addresses your request from #93628 (comment). Can you clarify what version of ptxas you're using and what error you're seeing?

@Artem-B
Copy link
Member

Artem-B commented May 31, 2024

@Artem-B, this addresses your request from #93628 (comment). Can you clarify what version of ptxas you're using and what error you're seeing?

The error:

[  4] ; RUN: %if ptxas %{ llc < %s -mtriple=nvptx -mcpu=sm_20 -O1 | %ptxas-verify %} [FAIL]
 llc < /build/work/ea8b3a3717bb294ac025e537a8aabcc8890c/google3/runfiles/google3/third_party/llvm/llvm-project/llvm/test/CodeGen/NVPTX/combine-mad.ll -mtriple=nvptx -mcpu=sm_20 -O1 | /build/work/ea8b3a3717bb294ac025e537a8aabcc8890c/google3/runfiles/google3/third_party/gpus/cuda_12_0/bin/ptxas -arch=sm_60 -c -o /dev/null - 
ptxas warning :  64 Bit host architecture (--machine) being used mismatches with .address_size of 32 bits
ptxas fatal   :  32-Bit compilation is no longer supported
Command failed: exit status 255

; RUN: %if ptxas %{ llc < %s -mtriple=nvptx -mcpu=sm_20 -O1 | %ptxas-verify %}
; RUN: %if ptxas %{ llc < %s -mtriple=nvptx64 -mcpu=sm_20 -O1 | %ptxas-verify %}
; RUN: %if ptxas && !ptxas-12.0 %{ llc < %s -mtriple=nvptx -mcpu=sm_20 -O1 | %ptxas-verify %}
; RUN: %if ptxas && !ptxas-12.0 %{ llc < %s -mtriple=nvptx64 -mcpu=sm_20 -O1 | %ptxas-verify %}
Copy link
Member

Choose a reason for hiding this comment

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

This line does not need the change. 64-bit variant works everywhere.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Member

@Artem-B Artem-B left a comment

Choose a reason for hiding this comment

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

The change should apply to line 4 only. The change itself is fine.

You can (and should run LLVM tests with LLVM_PTXAS_EXECUTABLE= set to point to ptxas from a recent CUDA version.

@AlexMaclean AlexMaclean merged commit 661d64b into llvm:main Jun 1, 2024
7 checks passed
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