Add extended coherence memory flag
Add support for new flag for memory allocation that will provide system-scope coherent atomics Change-Id: I426d66223e8d2b570f69b4c0e61145ce9b2290d2
Dieser Commit ist enthalten in:
@@ -566,7 +566,8 @@ typedef struct _HsaMemFlags
|
||||
unsigned int Uncached: 1; // Caching flag for fine-grained memory on A+A HW platform
|
||||
unsigned int NoAddress: 1; // only do vram allocation, return a handle, not allocate virtual address.
|
||||
unsigned int OnlyAddress: 1; // only do virtal address allocation without vram allocation.
|
||||
unsigned int Reserved: 12;
|
||||
unsigned int ExtendedCoherent: 1; // system-scope coherence on atomic instructions
|
||||
unsigned int Reserved: 11;
|
||||
|
||||
} ui32;
|
||||
HSAuint32 Value;
|
||||
@@ -1372,6 +1373,7 @@ typedef enum _HSA_SVM_FLAGS {
|
||||
HSA_SVM_FLAG_GPU_EXEC = 0x00000010, // Allow execution on GPU
|
||||
HSA_SVM_FLAG_GPU_READ_MOSTLY = 0x00000020, // GPUs mostly read, may allow similar optimizations as RO, but writes fault
|
||||
HSA_SVM_FLAG_GPU_ALWAYS_MAPPED = 0x00000040, // Keep GPU memory mapping always valid as if XNACK is disable
|
||||
HSA_SVM_FLAG_EXT_COHERENT = 0x00000080, // Fine grained coherency between all devices using device-scope atomics
|
||||
} HSA_SVM_FLAGS;
|
||||
|
||||
typedef enum _HSA_SVM_ATTR_TYPE {
|
||||
|
||||
@@ -1027,6 +1027,7 @@ struct kfd_ioctl_acquire_vm_args {
|
||||
#define KFD_IOC_ALLOC_MEM_FLAGS_AQL_QUEUE_MEM (1 << 27)
|
||||
#define KFD_IOC_ALLOC_MEM_FLAGS_COHERENT (1 << 26)
|
||||
#define KFD_IOC_ALLOC_MEM_FLAGS_UNCACHED (1 << 25)
|
||||
#define KFD_IOC_ALLOC_MEM_FLAGS_EXT_COHERENT (1 << 24)
|
||||
|
||||
/* Allocate memory for later SVM (shared virtual memory) mapping.
|
||||
*
|
||||
@@ -1375,6 +1376,8 @@ struct kfd_ioctl_cross_memory_copy_args {
|
||||
#define KFD_IOCTL_SVM_FLAG_GPU_READ_MOSTLY 0x00000020
|
||||
/* Keep GPU memory mapping always valid as if XNACK is disable */
|
||||
#define KFD_IOCTL_SVM_FLAG_GPU_ALWAYS_MAPPED 0x00000040
|
||||
/* Fine grained coherency between all devices using device-scope atomics */
|
||||
#define KFD_IOCTL_SVM_FLAG_EXT_COHERENT 0x00000080
|
||||
|
||||
/**
|
||||
* kfd_ioctl_svm_op - SVM ioctl operations
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren