Skip to content

[OpenMP][Offload] Fix typo in error message #142589

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
Jun 3, 2025

Conversation

jplehr
Copy link
Contributor

@jplehr jplehr commented Jun 3, 2025

It appears that the spelling was incorrect in those test cases. At least on machines with ROCm version > 6.3.

I had no chance to test with ROCm version version < 6.2 and would be interested in the result if someone has the chance.

It appears that the spelling was incorrect in those test cases. At least
on machines with ROCm version > 6.3.

I had no chance to test with ROCm version version < 6.2 and would be
interested in the result if someone has the chance.
@jplehr jplehr requested review from jdoerfert and jhuber6 June 3, 2025 11:53
@llvmbot llvmbot added the offload label Jun 3, 2025
@llvmbot
Copy link
Member

llvmbot commented Jun 3, 2025

@llvm/pr-subscribers-offload

Author: Jan Patrick Lehr (jplehr)

Changes

It appears that the spelling was incorrect in those test cases. At least on machines with ROCm version > 6.3.

I had no chance to test with ROCm version version < 6.2 and would be interested in the result if someone has the chance.


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

4 Files Affected:

  • (modified) offload/test/sanitizer/ptr_outside_alloc_1.c (+1-1)
  • (modified) offload/test/sanitizer/ptr_outside_alloc_2.c (+1-1)
  • (modified) offload/test/sanitizer/use_after_free_1.c (+1-1)
  • (modified) offload/test/sanitizer/use_after_free_2.c (+1-1)
diff --git a/offload/test/sanitizer/ptr_outside_alloc_1.c b/offload/test/sanitizer/ptr_outside_alloc_1.c
index 0e72941afde87..bdd028352e403 100644
--- a/offload/test/sanitizer/ptr_outside_alloc_1.c
+++ b/offload/test/sanitizer/ptr_outside_alloc_1.c
@@ -27,7 +27,7 @@ int main() {
     *P = 3;
   }
   // clang-format off
-// CHECK: OFFLOAD ERROR: Memory access fault by GPU {{.*}} (agent 0x{{.*}}) at virtual address [[PTR:0x[0-9a-z]*]]. Reasons: {{.*}}
+// CHECK: OFFLOAD ERROR: memory access fault by GPU {{.*}} (agent 0x{{.*}}) at virtual address [[PTR:0x[0-9a-z]*]]. Reasons: {{.*}}
 // NTRCE: Use 'OFFLOAD_TRACK_ALLOCATION_TRACES=true' to track device allocations
 // TRACE: Device pointer [[PTR]] does not point into any (current or prior) host-issued allocation.
 // TRACE: Closest host-issued allocation (distance 4096 bytes; might be by page):
diff --git a/offload/test/sanitizer/ptr_outside_alloc_2.c b/offload/test/sanitizer/ptr_outside_alloc_2.c
index 750d54b86317c..6a67962f9eb32 100644
--- a/offload/test/sanitizer/ptr_outside_alloc_2.c
+++ b/offload/test/sanitizer/ptr_outside_alloc_2.c
@@ -18,7 +18,7 @@ int main() {
 #pragma omp target map(A[ : N])
   { A[N] = 3; }
   // clang-format off
-// CHECK: OFFLOAD ERROR: Memory access fault by GPU {{.*}} (agent 0x{{.*}}) at virtual address [[PTR:0x[0-9a-z]*]]. Reasons: {{.*}}
+// CHECK: OFFLOAD ERROR: memory access fault by GPU {{.*}} (agent 0x{{.*}}) at virtual address [[PTR:0x[0-9a-z]*]]. Reasons: {{.*}}
 // CHECK: Device pointer [[PTR]] does not point into any (current or prior) host-issued allocation.
 // CHECK: Closest host-issued allocation (distance 1 byte; might be by page):
 // CHECK: Last allocation of size 1073741824
diff --git a/offload/test/sanitizer/use_after_free_1.c b/offload/test/sanitizer/use_after_free_1.c
index 0ed86f66332ce..c4783c5c36df9 100644
--- a/offload/test/sanitizer/use_after_free_1.c
+++ b/offload/test/sanitizer/use_after_free_1.c
@@ -28,7 +28,7 @@ int main() {
   }
   llvm_omp_target_free_host(A, omp_get_default_device());
   // clang-format off
-// CHECK: OFFLOAD ERROR: Memory access fault by GPU {{.*}} (agent 0x{{.*}}) at virtual address [[PTR:0x[0-9a-z]*]]. Reasons: {{.*}}
+// CHECK: OFFLOAD ERROR: memory access fault by GPU {{.*}} (agent 0x{{.*}}) at virtual address [[PTR:0x[0-9a-z]*]]. Reasons: {{.*}}
 // NTRCE: Use 'OFFLOAD_TRACK_ALLOCATION_TRACES=true' to track device allocations
 // TRACE: Device pointer [[PTR]] points into prior host-issued allocation:
 // TRACE: Last deallocation:
diff --git a/offload/test/sanitizer/use_after_free_2.c b/offload/test/sanitizer/use_after_free_2.c
index f4e7f0fa0184d..02aa453d0a975 100644
--- a/offload/test/sanitizer/use_after_free_2.c
+++ b/offload/test/sanitizer/use_after_free_2.c
@@ -22,7 +22,7 @@ int main() {
     *P = 3;
   }
   // clang-format off
-// CHECK: OFFLOAD ERROR: Memory access fault by GPU {{.*}} (agent 0x{{.*}}) at virtual address [[PTR:0x[0-9a-z]*]]. Reasons: {{.*}}
+// CHECK: OFFLOAD ERROR: memory access fault by GPU {{.*}} (agent 0x{{.*}}) at virtual address [[PTR:0x[0-9a-z]*]]. Reasons: {{.*}}
 // CHECK: Device pointer [[PTR]] points into prior host-issued allocation:
 // CHECK: Last deallocation:
 // CHECK: Last allocation of size 1073741824

Copy link

github-actions bot commented Jun 3, 2025

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff HEAD~1 HEAD --extensions c -- offload/test/sanitizer/ptr_outside_alloc_1.c offload/test/sanitizer/ptr_outside_alloc_2.c offload/test/sanitizer/use_after_free_1.c offload/test/sanitizer/use_after_free_2.c
View the diff from clang-format here.
diff --git a/offload/test/sanitizer/ptr_outside_alloc_2.c b/offload/test/sanitizer/ptr_outside_alloc_2.c
index 6a67962f9..472f3f84b 100644
--- a/offload/test/sanitizer/ptr_outside_alloc_2.c
+++ b/offload/test/sanitizer/ptr_outside_alloc_2.c
@@ -22,5 +22,5 @@ int main() {
 // CHECK: Device pointer [[PTR]] does not point into any (current or prior) host-issued allocation.
 // CHECK: Closest host-issued allocation (distance 1 byte; might be by page):
 // CHECK: Last allocation of size 1073741824
-// clang-format on
+  // clang-format on
 }

@jhuber6 jhuber6 merged commit e97f42e into llvm:main Jun 3, 2025
10 of 11 checks passed
@jplehr jplehr deleted the fix/typo-in-omptarget-tests branch June 3, 2025 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants