File tree Expand file tree Collapse file tree 5 files changed +77
-0
lines changed Expand file tree Collapse file tree 5 files changed +77
-0
lines changed Original file line number Diff line number Diff line change @@ -980,6 +980,21 @@ cl_int CL_API_CALL clGetKernelSuggestedLocalWorkSizeKHR(
980
980
981
981
#define CL_DEVICE_MAX_ATOMIC_COUNTERS_EXT 0x4032
982
982
983
+ // /////////////////////////////////////////////////////////////////////////////
984
+ // cl_ext_buffer_device_address
985
+
986
+ typedef cl_ulong cl_mem_device_address_ext;
987
+
988
+ extern CL_API_ENTRY
989
+ cl_int CL_API_CALL clSetKernelArgDevicePointerEXT (
990
+ cl_kernel kernel,
991
+ cl_uint arg_index,
992
+ cl_mem_device_address_ext arg_value);
993
+
994
+ #define CL_MEM_DEVICE_PRIVATE_ADDRESS_EXT 0x5000
995
+ #define CL_MEM_DEVICE_ADDRESS_EXT 0x5001
996
+ #define CL_KERNEL_EXEC_INFO_DEVICE_PTRS_EXT 0x5002
997
+
983
998
// /////////////////////////////////////////////////////////////////////////////
984
999
// cl_ext_cxx_for_opencl
985
1000
Original file line number Diff line number Diff line change @@ -8915,6 +8915,46 @@ CL_API_ENTRY cl_int CL_API_CALL clGetKernelSuggestedLocalWorkSizeKHR(
8915
8915
NULL_FUNCTION_POINTER_RETURN_ERROR (CL_INVALID_COMMAND_QUEUE);
8916
8916
}
8917
8917
8918
+ // /////////////////////////////////////////////////////////////////////////////
8919
+ //
8920
+ // cl_ext_buffer_device_address
8921
+ CL_API_ENTRY cl_int CL_API_CALL clSetKernelArgDevicePointerEXT (
8922
+ cl_kernel kernel,
8923
+ cl_uint arg_index,
8924
+ cl_mem_device_address_ext arg_value)
8925
+ {
8926
+ CLIntercept* pIntercept = GetIntercept ();
8927
+
8928
+ if ( pIntercept )
8929
+ {
8930
+ const auto & dispatchX = pIntercept->dispatchX (kernel);
8931
+ if ( dispatchX.clSetKernelArgDevicePointerEXT )
8932
+ {
8933
+ GET_ENQUEUE_COUNTER ();
8934
+ CALL_LOGGING_ENTER_KERNEL (
8935
+ kernel,
8936
+ " kernel = %p, index = %u, value = %" PRIx64,
8937
+ kernel,
8938
+ arg_index,
8939
+ arg_value );
8940
+ HOST_PERFORMANCE_TIMING_START ();
8941
+
8942
+ cl_int retVal = dispatchX.clSetKernelArgDevicePointerEXT (
8943
+ kernel,
8944
+ arg_index,
8945
+ arg_value );
8946
+
8947
+ HOST_PERFORMANCE_TIMING_END ();
8948
+ CHECK_ERROR ( retVal );
8949
+ CALL_LOGGING_EXIT ( retVal );
8950
+
8951
+ return retVal;
8952
+ }
8953
+ }
8954
+
8955
+ NULL_FUNCTION_POINTER_RETURN_ERROR (CL_INVALID_KERNEL);
8956
+ }
8957
+
8918
8958
// /////////////////////////////////////////////////////////////////////////////
8919
8959
//
8920
8960
// cl_ext_image_requirements_info
Original file line number Diff line number Diff line change @@ -487,6 +487,12 @@ struct CLdispatchX
487
487
const size_t * global_work_size ,
488
488
size_t * suggested_local_work_size );
489
489
490
+ // cl_ext_buffer_device_address
491
+ cl_int (CL_API_CALL * clSetKernelArgDevicePointerEXT ) (
492
+ cl_kernel kernel ,
493
+ cl_uint arg_index ,
494
+ cl_mem_device_address_ext arg_value );
495
+
490
496
// cl_ext_image_requirements_info
491
497
cl_int (CL_API_CALL * clGetImageRequirementsInfoEXT ) (
492
498
cl_context context ,
Original file line number Diff line number Diff line change @@ -882,6 +882,11 @@ CEnumNameMap::CEnumNameMap()
882
882
// cl_ext_atomic_counters
883
883
ADD_ENUM_NAME ( m_cl_int, CL_DEVICE_MAX_ATOMIC_COUNTERS_EXT );
884
884
885
+ // cl_ext_buffer_device_address
886
+ ADD_ENUM_NAME ( m_cl_int, CL_MEM_DEVICE_PRIVATE_ADDRESS_EXT );
887
+ ADD_ENUM_NAME ( m_cl_int, CL_MEM_DEVICE_ADDRESS_EXT );
888
+ ADD_ENUM_NAME ( m_cl_int, CL_KERNEL_EXEC_INFO_DEVICE_PTRS_EXT );
889
+
885
890
// cl_ext_cxx_for_opencl
886
891
ADD_ENUM_NAME ( m_cl_int, CL_DEVICE_CXX_FOR_OPENCL_NUMERIC_VERSION_EXT );
887
892
Original file line number Diff line number Diff line change @@ -2446,6 +2446,14 @@ void CLIntercept::getMemPropertiesString(
2446
2446
properties += 2 ;
2447
2447
}
2448
2448
break ;
2449
+ case CL_MEM_DEVICE_PRIVATE_ADDRESS_EXT:
2450
+ {
2451
+ auto pb = (const cl_bool*)( properties + 1 );
2452
+ cl_bool value = pb[0 ];
2453
+ str += enumName ().name_bool ( value );
2454
+ properties += 2 ;
2455
+ }
2456
+ break ;
2449
2457
default :
2450
2458
{
2451
2459
CLI_SPRINTF ( s, 256 , " <Unknown %08X!>" , (cl_uint)property );
@@ -13410,6 +13418,9 @@ void* CLIntercept::getExtensionFunctionAddress(
13410
13418
// cl_khr_suggested_local_work_size
13411
13419
CHECK_RETURN_EXTENSION_FUNCTION ( clGetKernelSuggestedLocalWorkSizeKHR );
13412
13420
13421
+ // cl_ext_buffer_device_address
13422
+ CHECK_RETURN_EXTENSION_FUNCTION ( clSetKernelArgDevicePointerEXT );
13423
+
13413
13424
// cl_ext_image_requirements_info
13414
13425
CHECK_RETURN_EXTENSION_FUNCTION ( clGetImageRequirementsInfoEXT );
13415
13426
You can’t perform that action at this time.
0 commit comments