Skip to content

Commit ca55cef

Browse files
author
Georgi Mirazchiyski
committed
[UR][hip][opencl] Mark urKernelSuggestMaxCooperativeGroupCountExp as unsupported instead of returning misleading default value
1 parent 10fd78c commit ca55cef

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

source/adapters/hip/kernel.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,11 @@ urKernelGetNativeHandle(ur_kernel_handle_t, ur_native_handle_t *) {
167167
UR_APIEXPORT ur_result_t UR_APICALL urKernelSuggestMaxCooperativeGroupCountExp(
168168
ur_kernel_handle_t hKernel, size_t localWorkSize,
169169
size_t dynamicSharedMemorySize, uint32_t *pGroupCountRet) {
170-
(void)hKernel;
171-
(void)localWorkSize;
172-
(void)dynamicSharedMemorySize;
173-
*pGroupCountRet = 1;
174-
return UR_RESULT_SUCCESS;
170+
std::ignore = hKernel;
171+
std::ignore = localWorkSize;
172+
std::ignore = dynamicSharedMemorySize;
173+
std::ignore = pGroupCountRet;
174+
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
175175
}
176176

177177
UR_APIEXPORT ur_result_t UR_APICALL urKernelSetArgValue(

source/adapters/opencl/kernel.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -358,11 +358,11 @@ UR_APIEXPORT ur_result_t UR_APICALL urKernelGetNativeHandle(
358358
UR_APIEXPORT ur_result_t UR_APICALL urKernelSuggestMaxCooperativeGroupCountExp(
359359
ur_kernel_handle_t hKernel, size_t localWorkSize,
360360
size_t dynamicSharedMemorySize, uint32_t *pGroupCountRet) {
361-
(void)hKernel;
362-
(void)localWorkSize;
363-
(void)dynamicSharedMemorySize;
364-
*pGroupCountRet = 1;
365-
return UR_RESULT_SUCCESS;
361+
std::ignore = hKernel;
362+
std::ignore = localWorkSize;
363+
std::ignore = dynamicSharedMemorySize;
364+
std::ignore = pGroupCountRet;
365+
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
366366
}
367367

368368
UR_APIEXPORT ur_result_t UR_APICALL urKernelCreateWithNativeHandle(

0 commit comments

Comments
 (0)