Adding support to hsaKmtMapMemoryToGPUNodes

Change-Id: Iab6222402a43c3cd31b0efc5a316a6482986258e
Signed-off-by: Ben Goz <ben.goz@amd.com>


[ROCm/ROCR-Runtime commit: 7070f7ec5e]
This commit is contained in:
Ben Goz
2016-01-28 15:33:56 +02:00
parent 60bbf00fb1
commit 18aab410cc
6 changed files with 76 additions and 15 deletions
+15
View File
@@ -416,6 +416,21 @@ hsaKmtMapMemoryToGPU(
HSAuint64* AlternateVAGPU //OUT (page-aligned)
);
/**
Ensures that the memory is resident and can be accessed by GPUs
*/
HSAKMT_STATUS
HSAKMTAPI
hsaKmtMapMemoryToGPUNodes(
void* MemoryAddress, //IN (page-aligned)
HSAuint64 MemorySizeInBytes, //IN (page-aligned)
HSAuint64* AlternateVAGPU, //OUT (page-aligned)
HsaMemMapFlags MemMapFlags, //IN
HSAuint64 NumberOfNodes, //IN
HSAuint32* NodeArray //IN
);
/**
Releases the residency of the memory
*/
+2 -2
View File
@@ -476,7 +476,7 @@ typedef struct _HsaMemMapFlags
struct
{
unsigned int Reserved1 : 1; //
unsigned int CachePolicy : 4; // see HSA_CACHING_TYPE
unsigned int CachePolicy : 2; // see HSA_CACHING_TYPE
unsigned int ReadOnly : 1; // memory is not modified while mapped
// allows migration scale-out
unsigned int PageSize : 2; // see HSA_PAGE_SIZE, hint to use
@@ -492,7 +492,7 @@ typedef struct _HsaMemMapFlags
// may trigger eviction of nonessential
// data from the memory, reduces latency
// “cleanup hint” only, may be ignored
unsigned int Reserved : 21;
unsigned int Reserved : 23;
};
HSAuint32 Value;
};