libhsakmt: add API to support svm and xnack
Add function definitions to support SVM (shared virtual memory)
and xnack set.
Change-Id: Ia97ad9d0c449d8d500d799f702e1a58e87d65a56
Signed-off-by: Alex Sierra <alex.sierra@amd.com>
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
[ROCm/ROCR-Runtime commit: a352639df5]
This commit is contained in:
committed by
Kent Russell
parent
07b0758bee
commit
08e65a397a
@@ -1219,6 +1219,37 @@ hsaKmtSetMemoryUserData(
|
||||
void * UserData //IN
|
||||
);
|
||||
|
||||
/* Helper functions for calling KFD SVM ioctl */
|
||||
HSAKMT_STATUS
|
||||
HSAKMTAPI
|
||||
hsaKmtSVMSetAttr(
|
||||
void *start_addr, // IN: Start of the virtual address range (page-aligned)
|
||||
HSAuint64 size, // IN: size (page-aligned)
|
||||
unsigned int nattr, // IN: number of attributes
|
||||
HSA_SVM_ATTRIBUTE *attrs // IN: array of attributes
|
||||
);
|
||||
|
||||
HSAKMT_STATUS
|
||||
HSAKMTAPI
|
||||
hsaKmtSVMGetAttr(
|
||||
void *start_addr, // IN: Start of the virtual address range (page-aligned)
|
||||
HSAuint64 size, // IN: size (page aligned)
|
||||
unsigned int nattr, // IN: number of attributes
|
||||
HSA_SVM_ATTRIBUTE *attrs // IN/OUT: array of attributes
|
||||
);
|
||||
|
||||
HSAKMT_STATUS
|
||||
HSAKMTAPI
|
||||
hsaKmtSetXNACKMode(
|
||||
HSAint32 enable // IN: enable/disable XNACK node.
|
||||
);
|
||||
|
||||
HSAKMT_STATUS
|
||||
HSAKMTAPI
|
||||
hsaKmtGetXNACKMode(
|
||||
HSAint32 * enable // OUT: returns XNACK value.
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} //extern "C"
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user