[llvm] [OFFLOAD] Fix an issue with nested close, alloc mapping when using USM (PR #208122)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 8 18:15:49 PDT 2026
================
@@ -0,0 +1,32 @@
+// RUN: %libomptarget-compile-run-and-check-generic
+
+// REQUIRES: unified_shared_memory
+// UNSUPPORTED: clang-6, clang-7, clang-8, clang-9
+
+// amdgpu runtime crash
+// Fails on nvptx with error: an illegal memory access was encountered
+// UNSUPPORTED: amdgcn-amd-amdhsa
+// UNSUPPORTED: nvptx64-nvidia-cuda
+// UNSUPPORTED: nvptx64-nvidia-cuda-LTO
+// UNSUPPORTED: intelgpu
+
+#pragma omp requires unified_shared_memory
+
+#include <stdio.h>
+
+int main() {
+ double base[10] = {0};
----------------
fineg74 wrote:
Added a test to track mappings in USM mode. For declare_target it looks like it behaves kind of strange : i.e. with or without USM mode it doesn't update the global declare_target array. And crashes if you try to make OOB access to the sub section of that array. I am not sure what is the expected behavior in this case but it is probably a separate issue that probably need to be addressed separately
https://github.com/llvm/llvm-project/pull/208122
More information about the llvm-commits
mailing list