libhsakmt: Add support for hsaKmtAvailableMemory
New API function to report available memory per GPU Signed-off-by: Daniel Phillips <Daniel.Phillips@amd.com> Change-Id: I63c1e4ca0020c657977ab3635947ab0ed0a81440
This commit is contained in:
zatwierdzone przez
David Yat Sin
rodzic
707200e26e
commit
6da6058d4a
@@ -34,9 +34,10 @@
|
||||
* - 1.6 - Query clear flags in SVM get_attr API
|
||||
* - 1.7 - Checkpoint Restore (CRIU) API
|
||||
* - 1.8 - CRIU - Support for SDMA transfers with GTT BOs
|
||||
* - 1.9 - Add available_memory ioctl
|
||||
*/
|
||||
#define KFD_IOCTL_MAJOR_VERSION 1
|
||||
#define KFD_IOCTL_MINOR_VERSION 8
|
||||
#define KFD_IOCTL_MINOR_VERSION 9
|
||||
|
||||
/*
|
||||
* Debug revision change log
|
||||
@@ -769,6 +770,16 @@ struct kfd_ioctl_free_memory_of_gpu_args {
|
||||
__u64 handle; /* to KFD */
|
||||
};
|
||||
|
||||
/* Inquire available memory with kfd_ioctl_get_available_memory
|
||||
*
|
||||
* @available: memory available for alloc
|
||||
*/
|
||||
struct kfd_ioctl_get_available_memory_args {
|
||||
__u64 available; /* from KFD */
|
||||
__u32 gpu_id; /* to KFD */
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
/* Map memory to one or more GPUs
|
||||
*
|
||||
* @handle: memory handle returned by alloc
|
||||
@@ -1327,8 +1338,11 @@ struct kfd_ioctl_set_xnack_mode_args {
|
||||
#define AMDKFD_IOC_CRIU_OP \
|
||||
AMDKFD_IOWR(0x22, struct kfd_ioctl_criu_args)
|
||||
|
||||
#define AMDKFD_IOC_AVAILABLE_MEMORY \
|
||||
AMDKFD_IOWR(0x23, struct kfd_ioctl_get_available_memory_args)
|
||||
|
||||
#define AMDKFD_COMMAND_START 0x01
|
||||
#define AMDKFD_COMMAND_END 0x23
|
||||
#define AMDKFD_COMMAND_END 0x24
|
||||
|
||||
/* non-upstream ioctls */
|
||||
#define AMDKFD_IOC_IPC_IMPORT_HANDLE \
|
||||
|
||||
Reference in New Issue
Block a user