diff --git a/sycl/include/CL/sycl/detail/pi.h b/sycl/include/CL/sycl/detail/pi.h index e2974430d7a7e..80e93bc53b479 100644 --- a/sycl/include/CL/sycl/detail/pi.h +++ b/sycl/include/CL/sycl/detail/pi.h @@ -85,14 +85,14 @@ typedef enum : pi_uint64 { // TODO: populate and sync with cl::sycl::info::device typedef enum { - PI_DEVICE_INFO_TYPE = CL_DEVICE_TYPE, - PI_DEVICE_INFO_PARENT = CL_DEVICE_PARENT_DEVICE, - PI_DEVICE_INFO_PLATFORM = CL_DEVICE_PLATFORM, - PI_DEVICE_INFO_PARTITION_TYPE = CL_DEVICE_PARTITION_TYPE, - PI_DEVICE_INFO_NAME = CL_DEVICE_NAME, - PI_DEVICE_VERSION = CL_DEVICE_VERSION, - PI_DEVICE_MAX_WORK_GROUP_SIZE = CL_DEVICE_MAX_WORK_GROUP_SIZE, - PI_DEVICE_INFO_EXTENSIONS = CL_DEVICE_EXTENSIONS + PI_DEVICE_INFO_TYPE = CL_DEVICE_TYPE, + PI_DEVICE_INFO_PARENT = CL_DEVICE_PARENT_DEVICE, + PI_DEVICE_INFO_PLATFORM = CL_DEVICE_PLATFORM, + PI_DEVICE_INFO_PARTITION_TYPE = CL_DEVICE_PARTITION_TYPE, + PI_DEVICE_INFO_NAME = CL_DEVICE_NAME, + PI_DEVICE_INFO_VERSION = CL_DEVICE_VERSION, + PI_DEVICE_INFO_MAX_WORK_GROUP_SIZE = CL_DEVICE_MAX_WORK_GROUP_SIZE, + PI_DEVICE_INFO_EXTENSIONS = CL_DEVICE_EXTENSIONS } _pi_device_info; // TODO: populate diff --git a/sycl/source/detail/error_handling/enqueue_kernel.cpp b/sycl/source/detail/error_handling/enqueue_kernel.cpp index 4c4e8c4b8217c..1ab7a11578f16 100644 --- a/sycl/source/detail/error_handling/enqueue_kernel.cpp +++ b/sycl/source/detail/error_handling/enqueue_kernel.cpp @@ -25,12 +25,13 @@ bool handleInvalidWorkGroupSize(pi_device Device, pi_kernel Kernel, const bool HasLocalSize = (NDRDesc.LocalSize[0] != 0); size_t VerSize = 0; - PI_CALL(piDeviceGetInfo)(Device, PI_DEVICE_VERSION, 0, nullptr, &VerSize); + PI_CALL(piDeviceGetInfo)(Device, PI_DEVICE_INFO_VERSION, 0, nullptr, + &VerSize); assert(VerSize >= 10 && "Unexpected device version string"); // strlen("OpenCL X.Y") string_class VerStr(VerSize, '\0'); - PI_CALL(piDeviceGetInfo)(Device, PI_DEVICE_VERSION, VerSize, &VerStr.front(), - nullptr); + PI_CALL(piDeviceGetInfo)(Device, PI_DEVICE_INFO_VERSION, VerSize, + &VerStr.front(), nullptr); const char *Ver = &VerStr[7]; // strlen("OpenCL ") size_t CompileWGSize[3] = {0}; @@ -69,7 +70,7 @@ bool handleInvalidWorkGroupSize(pi_device Device, pi_kernel Kernel, // than the value specified by CL_DEVICE_MAX_WORK_GROUP_SIZE in // table 4.3 size_t MaxWGSize = 0; - PI_CALL(piDeviceGetInfo)(Device, PI_DEVICE_MAX_WORK_GROUP_SIZE, + PI_CALL(piDeviceGetInfo)(Device, PI_DEVICE_INFO_MAX_WORK_GROUP_SIZE, sizeof(size_t), &MaxWGSize, nullptr); const size_t TotalNumberOfWIs = NDRDesc.LocalSize[0] * NDRDesc.LocalSize[1] * NDRDesc.LocalSize[2];