Merge gfx90a into amd-staging

Conflicts:
	CMakeLists.txt
	include/hsakmt.h
	src/libhsakmt.h
	src/libhsakmt.ver
	src/queues.c
	src/topology.c
	tests/kfdtest/src/KFDMemoryTest.cpp
	tests/kfdtest/src/KFDTestUtil.hpp

Signed-off-by: Kent Russell <kent.russell@amd.com>
Change-Id: Ic2732e7c0b5e42c1a3a91223f65a65064b602181
This commit is contained in:
Kent Russell
2021-03-02 07:48:22 -05:00
33 changed files with 1260 additions and 73 deletions
+31 -1
View File
@@ -541,7 +541,8 @@ typedef struct _HsaMemFlags
// and optimal alignment requirements
unsigned int FixedAddress : 1; // Allocate memory at specified virtual address. Fail if address is not free.
unsigned int NoNUMABind: 1; // Don't bind system memory to a specific NUMA node
unsigned int Reserved : 15;
unsigned int Uncached: 1; // Caching flag for fine-grained memory on A+A HW platform
unsigned int Reserved : 14;
} ui32;
HSAuint32 Value;
@@ -1296,6 +1297,35 @@ 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)