diff --git a/source/adapters/cuda/device.cpp b/source/adapters/cuda/device.cpp index e6389c5ee2..e0cf106266 100644 --- a/source/adapters/cuda/device.cpp +++ b/source/adapters/cuda/device.cpp @@ -418,7 +418,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, return ReturnValue(static_cast(Min)); } case UR_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE: { - return ReturnValue(0lu); + return ReturnValue(size_t(0)); } case UR_DEVICE_INFO_MAX_SAMPLERS: { // This call is kind of meaningless for cuda, as samplers don't exist. @@ -429,7 +429,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, // https://docs.nvidia.com/cuda/cuda-c-programming-guide/#function-parameters // __global__ function parameters are passed to the device via constant // memory and are limited to 4 KB. - return ReturnValue(4000lu); + return ReturnValue(size_t(4000)); } case UR_DEVICE_INFO_MEM_BASE_ADDR_ALIGN: { int MemBaseAddrAlign = 0; @@ -542,7 +542,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, case UR_DEVICE_INFO_PROFILING_TIMER_RESOLUTION: { // Hard coded to value returned by clinfo for OpenCL 1.2 CUDA | GeForce GTX // 1060 3GB - return ReturnValue(1000lu); + return ReturnValue(size_t(1000)); } case UR_DEVICE_INFO_ENDIAN_LITTLE: { return ReturnValue(true); @@ -647,7 +647,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, } case UR_DEVICE_INFO_PRINTF_BUFFER_SIZE: { // The minimum value for the FULL profile is 1 MB. - return ReturnValue(1024lu); + return ReturnValue(size_t(1024)); } case UR_DEVICE_INFO_PREFERRED_INTEROP_USER_SYNC: { return ReturnValue(true); diff --git a/source/adapters/hip/device.cpp b/source/adapters/hip/device.cpp index dd20a4f50f..0d1c4385b3 100644 --- a/source/adapters/hip/device.cpp +++ b/source/adapters/hip/device.cpp @@ -321,7 +321,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, return ReturnValue(static_cast(Min)); } case UR_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE: { - return ReturnValue(0lu); + return ReturnValue(size_t(0)); } case UR_DEVICE_INFO_MAX_SAMPLERS: { // This call is kind of meaningless for HIP, as samplers don't exist. @@ -331,7 +331,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, case UR_DEVICE_INFO_MAX_PARAMETER_SIZE: { // __global__ function parameters are passed to the device via constant // memory and are limited to 4 KB. - return ReturnValue(4000lu); + return ReturnValue(size_t(4000)); } case UR_DEVICE_INFO_MEM_BASE_ADDR_ALIGN: { int MemBaseAddrAlign = 0; @@ -442,7 +442,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, case UR_DEVICE_INFO_PROFILING_TIMER_RESOLUTION: { // Hard coded to value returned by clinfo for OpenCL 1.2 HIP | GeForce GTX // 1060 3GB - return ReturnValue(1000lu); + return ReturnValue(size_t(1000)); } case UR_DEVICE_INFO_ENDIAN_LITTLE: { return ReturnValue(true); @@ -569,7 +569,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, } case UR_DEVICE_INFO_PRINTF_BUFFER_SIZE: { // The minimum value for the FULL profile is 1 MB. - return ReturnValue(1024lu); + return ReturnValue(size_t(1024)); } case UR_DEVICE_INFO_PREFERRED_INTEROP_USER_SYNC: { return ReturnValue(true);