diff --git a/doc/make_constants.py b/doc/make_constants.py index 3e92d05ef48c029a2b04a739166e9dd74d15102e..d50da9a39264d24a9008f7a26edde80d78244870 100644 --- a/doc/make_constants.py +++ b/doc/make_constants.py @@ -57,6 +57,11 @@ const_ext_lookup = { ("cl_nv_device_attribute_query", "0.92"), getattr(devi, "INTEGRATED_MEMORY_NV", None): ("cl_nv_device_attribute_query", "0.92"), + + getattr(devi, "DOUBLE_FP_CONFIG", None): + ("cl_khr_fp64", "2011.1"), + getattr(devi, "HALF_FP_CONFIG", None): + ("cl_khr_fp16", "2011.1"), }, ctxp: { diff --git a/src/wrapper/wrap_cl.hpp b/src/wrapper/wrap_cl.hpp index a0c840be8ca78fce8411bb86f2f43622421969d0..1b1580a870df5b867eb550965bf98df75cc3ad10 100644 --- a/src/wrapper/wrap_cl.hpp +++ b/src/wrapper/wrap_cl.hpp @@ -500,6 +500,12 @@ namespace pyopencl case CL_DEVICE_MEM_BASE_ADDR_ALIGN: DEV_GET_INT_INF(cl_uint); case CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE: DEV_GET_INT_INF(cl_uint); case CL_DEVICE_SINGLE_FP_CONFIG: DEV_GET_INT_INF(cl_device_fp_config); +#ifdef CL_DEVICE_DOUBLE_FP_CONFIG + case CL_DEVICE_DOUBLE_FP_CONFIG: DEV_GET_INT_INF(cl_device_fp_config); +#endif +#ifdef CL_DEVICE_HALF_FP_CONFIG + case CL_DEVICE_HALF_FP_CONFIG: DEV_GET_INT_INF(cl_device_fp_config); +#endif case CL_DEVICE_GLOBAL_MEM_CACHE_TYPE: DEV_GET_INT_INF(cl_device_mem_cache_type); case CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE: DEV_GET_INT_INF(cl_uint); diff --git a/src/wrapper/wrap_constants.cpp b/src/wrapper/wrap_constants.cpp index ab2468f7eb7e38c3150c236ca89c01582c95b403..39cdec3894e95fea26c62dfe7c3b37b841857ace 100644 --- a/src/wrapper/wrap_constants.cpp +++ b/src/wrapper/wrap_constants.cpp @@ -150,6 +150,12 @@ void pyopencl_expose_constants() ADD_ATTR(DEVICE_, MEM_BASE_ADDR_ALIGN); ADD_ATTR(DEVICE_, MIN_DATA_TYPE_ALIGN_SIZE); ADD_ATTR(DEVICE_, SINGLE_FP_CONFIG); +#ifdef CL_DEVICE_DOUBLE_FP_CONFIG + ADD_ATTR(DEVICE_, DOUBLE_FP_CONFIG); +#endif +#ifdef CL_DEVICE_HALF_FP_CONFIG + ADD_ATTR(DEVICE_, HALF_FP_CONFIG); +#endif ADD_ATTR(DEVICE_, GLOBAL_MEM_CACHE_TYPE); ADD_ATTR(DEVICE_, GLOBAL_MEM_CACHELINE_SIZE); ADD_ATTR(DEVICE_, GLOBAL_MEM_CACHE_SIZE);