Add support for register/deregister memory for dGPU
Allocate SVM address space for the registered memory and use new userptr support in KFD to create a system memory BO associated with the given user pointer. Map this BO at the SVM address for CPU access. MapMemoryToGPU can be used with the registered user pointer and will return the SVM address as alternate GPUVA. Change-Id: I4886e193c51fb6870a567878870c36bf8b5c3748
This commit is contained in:
+4
-4
@@ -374,8 +374,8 @@ hsaKmtFreeMemory(
|
||||
HSAKMT_STATUS
|
||||
HSAKMTAPI
|
||||
hsaKmtRegisterMemory(
|
||||
void* MemoryAddress, //IN (page-aligned)
|
||||
HSAuint64 MemorySizeInBytes //IN (page-aligned)
|
||||
void* MemoryAddress, //IN (cache-aligned)
|
||||
HSAuint64 MemorySizeInBytes //IN (cache-aligned)
|
||||
);
|
||||
|
||||
|
||||
@@ -386,8 +386,8 @@ hsaKmtRegisterMemory(
|
||||
HSAKMT_STATUS
|
||||
HSAKMTAPI
|
||||
hsaKmtRegisterMemoryToNodes(
|
||||
void *MemoryAddress, // IN (page-aligned)
|
||||
HSAuint64 MemorySizeInBytes, // IN (page-aligned)
|
||||
void *MemoryAddress, // IN (cache-aligned)
|
||||
HSAuint64 MemorySizeInBytes, // IN (cache-aligned)
|
||||
HSAuint64 NumberOfNodes, // IN
|
||||
HSAuint32* NodeArray // IN
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user