diff --git a/projects/rocr-runtime/libhsakmt/src/fmm.c b/projects/rocr-runtime/libhsakmt/src/fmm.c index 6ddf363742..5fb73effa4 100644 --- a/projects/rocr-runtime/libhsakmt/src/fmm.c +++ b/projects/rocr-runtime/libhsakmt/src/fmm.c @@ -1830,6 +1830,10 @@ static void *fmm_allocate_host_gpu(uint32_t gpu_id, uint32_t node_id, void *addr if (mflags.ui32.AQLQueueMemory) size = MemorySizeInBytes * 2; + /* special case for va allocation without real memory alloc */ + if (mflags.ui32.OnlyAddress) + return fmm_allocate_va(gpu_id, address, size, aperture, alignment, mflags); + /* Paged memory is allocated as a userptr mapping, non-paged * memory is allocated from KFD */ diff --git a/projects/rocr-runtime/libhsakmt/src/memory.c b/projects/rocr-runtime/libhsakmt/src/memory.c index 7e072bd165..ba2a2175bb 100644 --- a/projects/rocr-runtime/libhsakmt/src/memory.c +++ b/projects/rocr-runtime/libhsakmt/src/memory.c @@ -176,7 +176,8 @@ HSAKMT_STATUS HSAKMTAPI hsaKmtAllocMemoryAlign(HSAuint32 PreferredNode, } /* GPU allocated system memory */ - if (!gpu_id || !MemFlags.ui32.NonPaged || hsakmt_zfb_support || MemFlags.ui32.GTTAccess) { + if (!gpu_id || !MemFlags.ui32.NonPaged || hsakmt_zfb_support || MemFlags.ui32.GTTAccess + || MemFlags.ui32.OnlyAddress) { /* Backwards compatibility hack: Allocate system memory if app * asks for paged memory from a GPU node. */