[Openmp-commits] [openmp] 383d488 - [openmp][flang][offloading] Do not use fixed device IDs in checks (#78973)
via Openmp-commits
openmp-commits at lists.llvm.org
Wed Jan 24 02:52:11 PST 2024
Author: Kareem Ergawy
Date: 2024-01-24T11:52:06+01:00
New Revision: 383d488b0bd68f1abd58c2d0114f82c54ee286d1
URL: https://github.com/llvm/llvm-project/commit/383d488b0bd68f1abd58c2d0114f82c54ee286d1
DIFF: https://github.com/llvm/llvm-project/commit/383d488b0bd68f1abd58c2d0114f82c54ee286d1.diff
LOG: [openmp][flang][offloading] Do not use fixed device IDs in checks (#78973)
Fixes a small issues in an offloading test where the test dependec on
the host and device being assigned certains numeric IDs. This however is
not stable and fails in situations where any of the devices is assigned
an ID different from the expected value. The fix just checks that
offloading succeeded by making sure the IDs are different.
The test was failing locally for me.
Added:
Modified:
openmp/libomptarget/test/offloading/fortran/target_map_common_block1.f90
Removed:
################################################################################
diff --git a/openmp/libomptarget/test/offloading/fortran/target_map_common_block1.f90 b/openmp/libomptarget/test/offloading/fortran/target_map_common_block1.f90
index 35bbe511d9314d8..6aaa66d6449b6d7 100644
--- a/openmp/libomptarget/test/offloading/fortran/target_map_common_block1.f90
+++ b/openmp/libomptarget/test/offloading/fortran/target_map_common_block1.f90
@@ -20,9 +20,9 @@ program main
devices(2) = omp_get_device_num()
!$omp end target
print *, "var1 after target = ", var1
- print *, "devices: ", devices
+ print *, "devices are
diff erent? ", (devices(1) /= devices(2))
end program
! CHECK: var1 before target = 10
! CHECK: var1 after target = 20
-! CHECK: devices: 1 0
+! CHECK: devices are
diff erent? T
More information about the Openmp-commits
mailing list