Skip to content
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

clang: Fix hipstdpar test relying on default target #111975

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

arsenm
Copy link
Contributor

@arsenm arsenm commented Oct 11, 2024

Use explicit target and stop restricting hosts it can run on.

Use explicit target and stop restricting hosts it can run on.
Copy link
Contributor Author

arsenm commented Oct 11, 2024

@arsenm arsenm added the clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' label Oct 11, 2024 — with Graphite App
@llvmbot
Copy link
Collaborator

llvmbot commented Oct 11, 2024

@llvm/pr-subscribers-clang

@llvm/pr-subscribers-clang-driver

Author: Matt Arsenault (arsenm)

Changes

Use explicit target and stop restricting hosts it can run on.


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

1 Files Affected:

  • (modified) clang/test/Driver/hipstdpar.c (+6-10)
diff --git a/clang/test/Driver/hipstdpar.c b/clang/test/Driver/hipstdpar.c
index 32e040ef70d754..b759c5fb2084a3 100644
--- a/clang/test/Driver/hipstdpar.c
+++ b/clang/test/Driver/hipstdpar.c
@@ -1,21 +1,17 @@
-// REQUIRES: x86-registered-target
-// REQUIRES: amdgpu-registered-target
-// REQUIRES: system-linux
-// UNSUPPORTED: target={{.*}}-zos{{.*}}
-// XFAIL: target={{.*}}hexagon{{.*}}
-// XFAIL: target={{.*}}-scei{{.*}}
-// XFAIL: target={{.*}}-sie{{.*}}
+// REQUIRES: x86-registered-target, amdgpu-registered-target
 
-// RUN: not %clang -### --hipstdpar --hipstdpar-path=/does/not/exist -nogpulib \
+// RUN: not %clang -### --target=x86_64-unknown-linux-gnu \
+// RUN:   --hipstdpar --hipstdpar-path=/does/not/exist -nogpulib    \
 // RUN:   -nogpuinc --compile %s 2>&1 | \
 // RUN:   FileCheck --check-prefix=HIPSTDPAR-MISSING-LIB %s
-// RUN: %clang -### --hipstdpar --hipstdpar-path=%S/Inputs/hipstdpar \
+// RUN: %clang -### --target=x86_64-unknown-linux-gnu \
+// RUN:   --hipstdpar --hipstdpar-path=%S/Inputs/hipstdpar             \
 // RUN:   --hipstdpar-thrust-path=%S/Inputs/hipstdpar/thrust \
 // RUN:   --hipstdpar-prim-path=%S/Inputs/hipstdpar/rocprim \
 // RUN:   -nogpulib -nogpuinc --compile %s 2>&1 | \
 // RUN:   FileCheck --check-prefix=HIPSTDPAR-COMPILE %s
 // RUN: touch %t.o
-// RUN: %clang -### --hipstdpar %t.o 2>&1 | FileCheck --check-prefix=HIPSTDPAR-LINK %s
+// RUN: %clang -### --target=x86_64-unknown-linux-gnu --hipstdpar %t.o 2>&1 | FileCheck --check-prefix=HIPSTDPAR-LINK %s
 
 // HIPSTDPAR-MISSING-LIB: error: cannot find HIP Standard Parallelism Acceleration library; provide it via '--hipstdpar-path'
 // HIPSTDPAR-COMPILE: "-x" "hip"

@arsenm arsenm marked this pull request as ready for review October 11, 2024 10:46
@llvmbot llvmbot added the clang Clang issues not falling into any other category label Oct 11, 2024
@@ -1,21 +1,17 @@
// REQUIRES: x86-registered-target
// REQUIRES: amdgpu-registered-target
// REQUIRES: system-linux
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if the removal of system-linux would cause issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a pile of workarounds, there's no reason any of these tests should be host dependent

@AlexVlx
Copy link
Contributor

AlexVlx commented Oct 11, 2024

@arsenm what are you actually trying to fix and what do you expect this to do?

@arsenm
Copy link
Contributor Author

arsenm commented Oct 11, 2024

@arsenm what are you actually trying to fix and what do you expect this to do?

Fix not running tests except on linux. We should have maximum host test coverage, and this test has no reason to depend on the host. All it needs is the explicit target instead of relying on the default

@arsenm
Copy link
Contributor Author

arsenm commented Oct 11, 2024

Window bot passed, which was the important bit. Linux failed on a different test entirely

Copy link
Contributor

@perry-ca perry-ca left a comment

Choose a reason for hiding this comment

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

This works on z/OS. Thanks for fixing it.

@arsenm arsenm merged commit 5b330a7 into main Oct 15, 2024
11 of 13 checks passed
@arsenm arsenm deleted the users/arsenm/hipstdpar-fix-host-dependent-test branch October 15, 2024 05:45
DanielCChen pushed a commit to DanielCChen/llvm-project that referenced this pull request Oct 16, 2024
Use explicit target and stop restricting hosts it can run on.
bricknerb pushed a commit to bricknerb/llvm-project that referenced this pull request Oct 17, 2024
Use explicit target and stop restricting hosts it can run on.
EricWF pushed a commit to efcs/llvm-project that referenced this pull request Oct 22, 2024
Use explicit target and stop restricting hosts it can run on.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants