Skip to content

Conversation

@ergawy
Copy link
Member

@ergawy ergawy commented Jul 4, 2025

Fixes a Windows bot failure caused by #146667. Just run the test if an AMD GPU target is registered. Hopefully, the bot now passes.

Test coverage is not reduced since bbc is still run on all platforms.

Fixes a Windows bot failure caused by #146667. Just run the test if an
AMD GPU target is registered. Hopefully, the bot now passes.

Test quality is not reduced since `bbc` is still run on all platforms.
@llvmbot llvmbot added flang Flang issues not falling into any other category flang:fir-hlfir flang:openmp labels Jul 4, 2025
@ergawy ergawy requested review from luporl and tblah July 4, 2025 05:43
@llvmbot
Copy link
Member

llvmbot commented Jul 4, 2025

@llvm/pr-subscribers-flang-fir-hlfir

Author: Kareem Ergawy (ergawy)

Changes

Fixes a Windows bot failure caused by #146667. Just run the test if an AMD GPU target is registered. Hopefully, the bot now passes.

Test quality is not reduced since bbc is still run on all platforms.


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

1 Files Affected:

  • (modified) flang/test/Lower/OpenMP/parallel-reduction-array.f90 (+2-1)
diff --git a/flang/test/Lower/OpenMP/parallel-reduction-array.f90 b/flang/test/Lower/OpenMP/parallel-reduction-array.f90
index 4f889d9a4e77f..d410714b1573e 100644
--- a/flang/test/Lower/OpenMP/parallel-reduction-array.f90
+++ b/flang/test/Lower/OpenMP/parallel-reduction-array.f90
@@ -2,7 +2,8 @@
 ! RUN: %flang_fc1 -emit-hlfir -fopenmp -o - %s 2>&1 | FileCheck %s --check-prefix=CPU
 
 ! RUN: bbc -emit-hlfir -fopenmp -fopenmp-is-target-device -fopenmp-is-gpu -o - %s 2>&1 | FileCheck %s --check-prefix=GPU
-! RUN: %flang_fc1 -triple amdgcn-amd-amdhsa -emit-hlfir -fopenmp -fopenmp-is-target-device -o - %s 2>&1 | FileCheck %s --check-prefix=GPU
+! RUN: %if amdgpu-registered-target %{ %flang_fc1 -triple amdgcn-amd-amdhsa -emit-hlfir -fopenmp -fopenmp-is-target-device -o - %s 2>&1 | \
+! RUN: FileCheck %s --check-prefix=GPU %}
 
 program reduce
 integer, dimension(3) :: i = 0

@llvmbot
Copy link
Member

llvmbot commented Jul 4, 2025

@llvm/pr-subscribers-flang-openmp

Author: Kareem Ergawy (ergawy)

Changes

Fixes a Windows bot failure caused by #146667. Just run the test if an AMD GPU target is registered. Hopefully, the bot now passes.

Test quality is not reduced since bbc is still run on all platforms.


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

1 Files Affected:

  • (modified) flang/test/Lower/OpenMP/parallel-reduction-array.f90 (+2-1)
diff --git a/flang/test/Lower/OpenMP/parallel-reduction-array.f90 b/flang/test/Lower/OpenMP/parallel-reduction-array.f90
index 4f889d9a4e77f..d410714b1573e 100644
--- a/flang/test/Lower/OpenMP/parallel-reduction-array.f90
+++ b/flang/test/Lower/OpenMP/parallel-reduction-array.f90
@@ -2,7 +2,8 @@
 ! RUN: %flang_fc1 -emit-hlfir -fopenmp -o - %s 2>&1 | FileCheck %s --check-prefix=CPU
 
 ! RUN: bbc -emit-hlfir -fopenmp -fopenmp-is-target-device -fopenmp-is-gpu -o - %s 2>&1 | FileCheck %s --check-prefix=GPU
-! RUN: %flang_fc1 -triple amdgcn-amd-amdhsa -emit-hlfir -fopenmp -fopenmp-is-target-device -o - %s 2>&1 | FileCheck %s --check-prefix=GPU
+! RUN: %if amdgpu-registered-target %{ %flang_fc1 -triple amdgcn-amd-amdhsa -emit-hlfir -fopenmp -fopenmp-is-target-device -o - %s 2>&1 | \
+! RUN: FileCheck %s --check-prefix=GPU %}
 
 program reduce
 integer, dimension(3) :: i = 0

Copy link
Collaborator

@DavidSpickett DavidSpickett left a comment

Choose a reason for hiding this comment

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

LGTM

@DavidSpickett DavidSpickett merged commit 3e78aff into main Jul 4, 2025
13 checks passed
@DavidSpickett DavidSpickett deleted the users/ergawy/run_test_if_amdgpu_is_registered branch July 4, 2025 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flang:fir-hlfir flang:openmp flang Flang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants