diff --git a/projects/clr/opencl/amdocl/cl_command.cpp b/projects/clr/opencl/amdocl/cl_command.cpp index cbbf770dd1..d016bcd672 100644 --- a/projects/clr/opencl/amdocl/cl_command.cpp +++ b/projects/clr/opencl/amdocl/cl_command.cpp @@ -137,7 +137,8 @@ RUNTIME_ENTRY_RET(cl_command_queue, clCreateCommandQueueWithProperties, } if ((queueRTCUs != amd::CommandQueue::RealTimeDisabled) && - ((queueRTCUs > amdDevice.info().numRTCUs_) || (queueRTCUs == 0))) { + ((queueRTCUs > amdDevice.info().numRTCUs_) || (queueRTCUs == 0) + || (queueRTCUs < amdDevice.info().granularityRTCUs_))) { *not_null(errcode_ret) = CL_INVALID_VALUE; return (cl_command_queue)0; }