From 8f2b881c3bbf60e3ffb3379778474fd8ab5227e5 Mon Sep 17 00:00:00 2001 From: Todd tiantuo Li Date: Tue, 13 Dec 2022 04:59:33 -0800 Subject: [PATCH] SWDEV-354868 - return CL_INVALID_VALUE if number of RT CUs is less than its granularity when creating command queue Change-Id: I31004e82589c3378dba5541095a1eff763d4579d [ROCm/clr commit: 6d4e0673021beefecd18569d891a525a9f96b25a] --- projects/clr/opencl/amdocl/cl_command.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; }