Implement flat scratch support for dGPU
hsaKmtAllocMemory only allocates aligned address space and sets up
the scratch_physical aperture to match the allocated address space.
Actual allocation of backing memory happens in hsaKmtMapMemoryToGPU.
Change-Id: Ie709815ab9bedb3d682e096b4005fdfb5e94d3a7
[ROCm/ROCR-Runtime commit: 5131ab4e64]
This commit is contained in:
@@ -155,7 +155,7 @@ hsaKmtAllocMemory(
|
||||
return HSAKMT_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (!MemFlags.ui32.HostAccess && MemFlags.ui32.NonPaged) {
|
||||
if (!MemFlags.ui32.HostAccess && MemFlags.ui32.NonPaged && !MemFlags.ui32.Scratch) {
|
||||
*MemoryAddress = fmm_allocate_device(gpu_id, SizeInBytes);
|
||||
|
||||
if (*MemoryAddress == NULL)
|
||||
@@ -163,7 +163,7 @@ hsaKmtAllocMemory(
|
||||
|
||||
return HSAKMT_STATUS_SUCCESS;
|
||||
}
|
||||
if (MemFlags.ui32.HostAccess && MemFlags.ui32.Scratch ) {
|
||||
if (MemFlags.ui32.Scratch ) {
|
||||
*MemoryAddress = fmm_allocate_scratch(gpu_id, SizeInBytes);
|
||||
|
||||
if (*MemoryAddress == NULL)
|
||||
|
||||
Reference in New Issue
Block a user