From cb956dc239a036517f8b07f205faac4833bf469b Mon Sep 17 00:00:00 2001 From: Felix Kuehling Date: Wed, 10 Mar 2021 20:38:51 -0500 Subject: [PATCH] Revert "libhsakmt: add API to support svm and xnack" This reverts commit 08e65a397a7c12e4cf37ed3c5056fb44b2f36a5f. SVM is not ready yet. This was merged by accident. Change-Id: I1bee102823e7e612be8e8f2e0f50580e8692cc80 Signed-off-by: Felix Kuehling [ROCm/ROCR-Runtime commit: 5edd00136dbf3308b05813489a236d9dc1d3ed9c] --- projects/rocr-runtime/include/hsakmt.h | 31 --------------------- projects/rocr-runtime/include/hsakmttypes.h | 29 ------------------- 2 files changed, 60 deletions(-) diff --git a/projects/rocr-runtime/include/hsakmt.h b/projects/rocr-runtime/include/hsakmt.h index 39b1a0c792..c311f34b2e 100644 --- a/projects/rocr-runtime/include/hsakmt.h +++ b/projects/rocr-runtime/include/hsakmt.h @@ -1254,37 +1254,6 @@ hsaKmtSPMSetDestBuffer( bool *isSPMDataLoss //OUT ); -/* 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 diff --git a/projects/rocr-runtime/include/hsakmttypes.h b/projects/rocr-runtime/include/hsakmttypes.h index afc811d2c9..a12c5c1200 100644 --- a/projects/rocr-runtime/include/hsakmttypes.h +++ b/projects/rocr-runtime/include/hsakmttypes.h @@ -1297,35 +1297,6 @@ typedef struct _HsaMemoryRange { HSAuint64 SizeInBytes; // Size of above memory } HsaMemoryRange; -typedef enum _HSA_SVM_FLAGS { - HSA_SVM_FLAG_HOST_ACCESS = 0x00000001, // Guarantee host access to memory - HSA_SVM_FLAG_COHERENT = 0x00000002, // Fine grained coherency between all devices with access - HSA_SVM_FLAG_HIVE_LOCAL = 0x00000004, // Use any GPU in same hive as preferred device - HSA_SVM_FLAG_GPU_RO = 0x00000008, // GPUs only read, allows replication - HSA_SVM_FLAG_GPU_EXEC = 0x00000010, // Allow execution on GPU -} HSA_SVM_FLAGS; - -typedef enum _HSA_SVM_ATTR_TYPE { - HSA_SVM_ATTR_PREFERRED_LOC, // gpuid of the preferred location, 0 for - // system memory, INVALID_NODEID for - // "don't care" - HSA_SVM_ATTR_PREFETCH_LOC, // gpuid of the prefetch location, 0 for - // system memory. Setting this triggers an - // immediate prefetch (migration) - HSA_SVM_ATTR_ACCESS, - HSA_SVM_ATTR_ACCESS_IN_PLACE, - HSA_SVM_ATTR_NO_ACCESS, // specify memory access for the gpuid given - // by the attribute value - HSA_SVM_ATTR_SET_FLAGS, // bitmask of flags to set (see HSA_SVM_FLAGS) - HSA_SVM_ATTR_CLR_FLAGS, // bitmask of flags to clear - HSA_SVM_ATTR_GRANULARITY // migration granularity (log2 num pages) -} HSA_SVM_ATTR_TYPE; - -typedef struct _HSA_SVM_ATTRIBUTE { - HSAuint32 type; // attribute type (see enum HSA_SVM_ATTR_TYPE) - HSAuint32 value; // attribute value -} HSA_SVM_ATTRIBUTE; - #pragma pack(pop, hsakmttypes_h)