[Openmp-commits] [openmp] a487e0f - [NFC][OpenMP][libomptarget] Return null if error detected during allocation in NextGen AMDGPU
Kevin Sala via Openmp-commits
openmp-commits at lists.llvm.org
Wed Dec 21 16:48:08 PST 2022
Author: Kevin Sala
Date: 2022-12-22T01:46:33+01:00
New Revision: a487e0ffde98ffd04c28833cef30b311d9318b8a
URL: https://github.com/llvm/llvm-project/commit/a487e0ffde98ffd04c28833cef30b311d9318b8a
DIFF: https://github.com/llvm/llvm-project/commit/a487e0ffde98ffd04c28833cef30b311d9318b8a.diff
LOG: [NFC][OpenMP][libomptarget] Return null if error detected during allocation in NextGen AMDGPU
Added:
Modified:
openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
Removed:
################################################################################
diff --git a/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp b/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
index 901b9979bc4fd..73e3bd31406ba 100644
--- a/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
+++ b/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
@@ -2535,6 +2535,7 @@ void *AMDGPUDeviceTy::allocate(size_t Size, void *, TargetAllocTy Kind) {
// Enable all kernel agents to access the host pinned buffer.
if (auto Err = MemoryPool->enableAccess(Alloc, Size, KernelAgents)) {
REPORT("%s\n", toString(std::move(Err)).data());
+ return nullptr;
}
// Keep track of the host pinned allocations for optimizations in transfers.
More information about the Openmp-commits
mailing list