VMM: return error if memory-only handle alloc fail
Return HSA_STATUS_ERROR_OUT_OF_RESOURCES if thunk call to allocate
memory handle returns NULL.
Change-Id: I6cf74f93f7d606416414ea7c2354db86aeef3137
Signed-off-by: Chris Freehill <cfreehil@amd.com>
[ROCm/ROCR-Runtime commit: beb9a42998]
This commit is contained in:
committed by
Chris Freehill
parent
5f30d083d0
commit
60e43e8dec
@@ -245,9 +245,9 @@ hsa_status_t MemoryRegion::AllocateImpl(size_t& size, AllocateFlags alloc_flags,
|
||||
*address = AllocateKfdMemory(kmt_alloc_flags, node_id, size);
|
||||
}
|
||||
|
||||
if (kmt_alloc_flags.ui32.NoAddress) return HSA_STATUS_SUCCESS;
|
||||
|
||||
if (*address != nullptr) {
|
||||
if (kmt_alloc_flags.ui32.NoAddress) return HSA_STATUS_SUCCESS;
|
||||
|
||||
// Commit the memory.
|
||||
// For system memory, on non-restricted allocation, map it to all GPUs. On
|
||||
// restricted allocation, only CPU is allowed to access by default, so
|
||||
|
||||
Reference in New Issue
Block a user