From 2ccf3a770ae798f9a29e86801f425c4cfa2a58d9 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 aa46843963..ba6486255c 100644 --- a/source/adapters/hip/kernel.cpp +++ b/source/adapters/hip/kernel.cpp @@ -167,11 +167,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 9735abefbf..294bbcebb0 100644 --- a/source/adapters/opencl/kernel.cpp +++ b/source/adapters/opencl/kernel.cpp @@ -356,13 +356,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(