From 9d4c8ba4cd2bfdfba61efac9ddfe965bc46b01ae Mon Sep 17 00:00:00 2001 From: Kewen Meng Date: Tue, 28 Apr 2026 17:04:46 -0500 Subject: [PATCH 1/2] [Offload][AMDGPU][NFC] Improve message for warning non-XNACK runs --- offload/plugins-nextgen/amdgpu/src/rtl.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/offload/plugins-nextgen/amdgpu/src/rtl.cpp b/offload/plugins-nextgen/amdgpu/src/rtl.cpp index 0d83a5fa74a3b..9f43f4c0d1f1a 100644 --- a/offload/plugins-nextgen/amdgpu/src/rtl.cpp +++ b/offload/plugins-nextgen/amdgpu/src/rtl.cpp @@ -4818,10 +4818,11 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy { if (isUnifiedSharedMemory && !IsXnackEnabled) { MESSAGE0( "Running a program that requires XNACK on a system where XNACK is " - "disabled. This may cause problems when using an OS-allocated " - "pointer " - "inside a target region. " - "Re-run with HSA_XNACK=1 to remove this warning."); + "disabled or not supported. If your device supports XNACK, " + "re-run with HSA_XNACK=1. If your device does not support XNACK, " + "remove USM pragma and use map clauses instead. " + "Set OMPX_EAGER_ZERO_COPY_MAPS=1 for optimal zero-copy " + "performance on non-XNACK APUs."); if (OMPX_StrictSanityChecks) llvm_unreachable("User-requested hard stop on sanity check errors."); } From 67136af05550dedb90be3fd6f51ef794e60b0aa2 Mon Sep 17 00:00:00 2001 From: Kewen Meng Date: Wed, 29 Apr 2026 14:25:51 -0500 Subject: [PATCH 2/2] address comments --- offload/plugins-nextgen/amdgpu/src/rtl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/offload/plugins-nextgen/amdgpu/src/rtl.cpp b/offload/plugins-nextgen/amdgpu/src/rtl.cpp index 9f43f4c0d1f1a..415b5007c3feb 100644 --- a/offload/plugins-nextgen/amdgpu/src/rtl.cpp +++ b/offload/plugins-nextgen/amdgpu/src/rtl.cpp @@ -4822,7 +4822,7 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy { "re-run with HSA_XNACK=1. If your device does not support XNACK, " "remove USM pragma and use map clauses instead. " "Set OMPX_EAGER_ZERO_COPY_MAPS=1 for optimal zero-copy " - "performance on non-XNACK APUs."); + "performance on non-XNACK shared-memory devices."); if (OMPX_StrictSanityChecks) llvm_unreachable("User-requested hard stop on sanity check errors."); }