Skip to content

add more AMD enums to the enum map #418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions intercept/src/cli_ext.h
Original file line number Diff line number Diff line change
Expand Up @@ -1090,6 +1090,19 @@ cl_int CL_API_CALL clGetImageRequirementsInfoEXT(

#define CL_DEVICE_CORE_TEMPERATURE_ALTERA 0x40F3

///////////////////////////////////////////////////////////////////////////////
// cl_amd_command_queue_info

#define CL_QUEUE_THREAD_HANDLE_AMD 0x403E
#define CL_KERNEL_EXEC_INFO_NEW_VCOP_AMD 0x4120
#define CL_KERNEL_EXEC_INFO_PFPA_VCOP_AMD 0x4121

///////////////////////////////////////////////////////////////////////////////
// cl_amd_copy_buffer_p2p

#define CL_DEVICE_NUM_P2P_DEVICES_AMD 0x4088
#define CL_DEVICE_P2P_DEVICES_AMD 0x4089

///////////////////////////////////////////////////////////////////////////////
// cl_amd_device_attribute_query

Expand All @@ -1101,6 +1114,7 @@ cl_int CL_API_CALL clGetImageRequirementsInfoEXT(
#define CL_DEVICE_TOPOLOGY_AMD 0x4037
#define CL_DEVICE_BOARD_NAME_AMD 0x4038
#define CL_DEVICE_GLOBAL_FREE_MEMORY_AMD 0x4039
#define CL_DEVICE_MAX_REAL_TIME_COMPUTE_UNITS_GRANULARITY_AMD 0x403A
#define CL_DEVICE_SIMD_PER_COMPUTE_UNIT_AMD 0x4040
#define CL_DEVICE_SIMD_WIDTH_AMD 0x4041
#define CL_DEVICE_SIMD_INSTRUCTION_WIDTH_AMD 0x4042
Expand All @@ -1114,6 +1128,22 @@ cl_int CL_API_CALL clGetImageRequirementsInfoEXT(
#define CL_DEVICE_GFXIP_MAJOR_AMD 0x404A
#define CL_DEVICE_GFXIP_MINOR_AMD 0x404B
#define CL_DEVICE_AVAILABLE_ASYNC_QUEUES_AMD 0x404C
#define CL_DEVICE_MAX_REAL_TIME_COMPUTE_QUEUES_AMD 0x404D
#define CL_DEVICE_MAX_REAL_TIME_COMPUTE_UNITS_AMD 0x404E

///////////////////////////////////////////////////////////////////////////////
// cl_amd_device_memory_flags

// note: enum conflict!
#define CL_MEM_USE_PERSISTENT_MEM_AMD (1 << 6)

///////////////////////////////////////////////////////////////////////////////
// cl_amd_object_metadata

// note: enum conflict!
#define CL_INVALID_OBJECT_AMD 0x403A
#define CL_INVALID_KEY_AMD 0x403B
#define CL_PLATFORM_MAX_KEYS_AMD 0x403C

///////////////////////////////////////////////////////////////////////////////
// cl_amd_offline_devices
Expand Down
20 changes: 20 additions & 0 deletions intercept/src/enummap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -931,6 +931,15 @@ CEnumNameMap::CEnumNameMap()
// cl_altera_device_temperature
ADD_ENUM_NAME( m_cl_int, CL_DEVICE_CORE_TEMPERATURE_ALTERA );

// cl_amd_command_queue_info
ADD_ENUM_NAME( m_cl_int, CL_QUEUE_THREAD_HANDLE_AMD );
ADD_ENUM_NAME( m_cl_int, CL_KERNEL_EXEC_INFO_NEW_VCOP_AMD );
ADD_ENUM_NAME( m_cl_int, CL_KERNEL_EXEC_INFO_PFPA_VCOP_AMD );

// cl_amd_copy_buffer_p2p
ADD_ENUM_NAME( m_cl_int, CL_DEVICE_NUM_P2P_DEVICES_AMD );
ADD_ENUM_NAME( m_cl_int, CL_DEVICE_P2P_DEVICES_AMD );

// cl_amd_device_attribute_query
ADD_ENUM_NAME( m_cl_int, CL_DEVICE_PREFERRED_WORK_GROUP_SIZE_AMD );
ADD_ENUM_NAME( m_cl_int, CL_DEVICE_MAX_WORK_GROUP_SIZE_AMD );
Expand All @@ -940,6 +949,7 @@ CEnumNameMap::CEnumNameMap()
ADD_ENUM_NAME( m_cl_int, CL_DEVICE_TOPOLOGY_AMD );
ADD_ENUM_NAME( m_cl_int, CL_DEVICE_BOARD_NAME_AMD );
ADD_ENUM_NAME( m_cl_int, CL_DEVICE_GLOBAL_FREE_MEMORY_AMD );
ADD_ENUM_NAME( m_cl_int, CL_DEVICE_MAX_REAL_TIME_COMPUTE_UNITS_GRANULARITY_AMD );
ADD_ENUM_NAME( m_cl_int, CL_DEVICE_SIMD_PER_COMPUTE_UNIT_AMD );
ADD_ENUM_NAME( m_cl_int, CL_DEVICE_SIMD_WIDTH_AMD );
ADD_ENUM_NAME( m_cl_int, CL_DEVICE_SIMD_INSTRUCTION_WIDTH_AMD );
Expand All @@ -953,6 +963,16 @@ CEnumNameMap::CEnumNameMap()
ADD_ENUM_NAME( m_cl_int, CL_DEVICE_GFXIP_MAJOR_AMD );
ADD_ENUM_NAME( m_cl_int, CL_DEVICE_GFXIP_MINOR_AMD );
ADD_ENUM_NAME( m_cl_int, CL_DEVICE_AVAILABLE_ASYNC_QUEUES_AMD );
ADD_ENUM_NAME( m_cl_int, CL_DEVICE_MAX_REAL_TIME_COMPUTE_QUEUES_AMD );
ADD_ENUM_NAME( m_cl_int, CL_DEVICE_MAX_REAL_TIME_COMPUTE_UNITS_AMD );

// cl_amd_device_memory_flags
// enum conflict for CL_MEM_USE_PERSISTENT_MEM_AMD!

// cl_amd_object_metadata
// enum conflict for CL_INVALID_OBJECT_AMD!
ADD_ENUM_NAME( m_cl_int, CL_INVALID_KEY_AMD );
ADD_ENUM_NAME( m_cl_int, CL_PLATFORM_MAX_KEYS_AMD );

// cl_amd_offline_devices
ADD_ENUM_NAME( m_cl_int, CL_CONTEXT_OFFLINE_DEVICES_AMD );
Expand Down