From 55bd5636b03725b46f474577d6332a578ea52ada Mon Sep 17 00:00:00 2001 From: Georgi Mirazchiyski Date: Fri, 30 Aug 2024 12:55:35 +0100 Subject: [PATCH] [UR][hip][opencl] Mark urKernelSuggestMaxCooperativeGroupCountExp as unsupported instead of returning misleading default value --- source/adapters/hip/kernel.cpp | 10 +++++----- source/adapters/opencl/kernel.cpp | 12 +++++------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/source/adapters/hip/kernel.cpp b/source/adapters/hip/kernel.cpp index 8b0f49d780..60931cd014 100644 --- a/source/adapters/hip/kernel.cpp +++ b/source/adapters/hip/kernel.cpp @@ -171,11 +171,11 @@ urKernelGetNativeHandle(ur_kernel_handle_t, ur_native_handle_t *) { UR_APIEXPORT ur_result_t UR_APICALL urKernelSuggestMaxCooperativeGroupCountExp( ur_kernel_handle_t hKernel, size_t localWorkSize, size_t dynamicSharedMemorySize, uint32_t *pGroupCountRet) { - (void)hKernel; - (void)localWorkSize; - (void)dynamicSharedMemorySize; - *pGroupCountRet = 1; - return UR_RESULT_SUCCESS; + std::ignore = hKernel; + std::ignore = localWorkSize; + std::ignore = dynamicSharedMemorySize; + std::ignore = pGroupCountRet; + return UR_RESULT_ERROR_UNSUPPORTED_FEATURE; } UR_APIEXPORT ur_result_t UR_APICALL urKernelSetArgValue( diff --git a/source/adapters/opencl/kernel.cpp b/source/adapters/opencl/kernel.cpp index f6fbdf9e3b..a93d09329e 100644 --- a/source/adapters/opencl/kernel.cpp +++ b/source/adapters/opencl/kernel.cpp @@ -360,13 +360,11 @@ UR_APIEXPORT ur_result_t UR_APICALL urKernelGetNativeHandle( } UR_APIEXPORT ur_result_t UR_APICALL urKernelSuggestMaxCooperativeGroupCountExp( - ur_kernel_handle_t hKernel, size_t localWorkSize, - size_t dynamicSharedMemorySize, uint32_t *pGroupCountRet) { - (void)hKernel; - (void)localWorkSize; - (void)dynamicSharedMemorySize; - *pGroupCountRet = 1; - return UR_RESULT_SUCCESS; + [[maybe_unused]] ur_kernel_handle_t hKernel, + [[maybe_unused]] size_t localWorkSize, + [[maybe_unused]] size_t dynamicSharedMemorySize, + [[maybe_unused]] uint32_t *pGroupCountRet) { + return UR_RESULT_ERROR_UNSUPPORTED_FEATURE; } UR_APIEXPORT ur_result_t UR_APICALL urKernelCreateWithNativeHandle(