Skip to content

Commit df6da35

Browse files
authored
Merge pull request #2038 from GeorgeWeb/georgi/unsupported-max-coop-wgsize
[UR][hip][opencl] Mark urKernelSuggestMaxCooperativeGroupCountExp as unsupported instead of returning misleading default value
2 parents 6759053 + 55bd563 commit df6da35

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

source/adapters/hip/kernel.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,11 @@ urKernelGetNativeHandle(ur_kernel_handle_t, ur_native_handle_t *) {
171171
UR_APIEXPORT ur_result_t UR_APICALL urKernelSuggestMaxCooperativeGroupCountExp(
172172
ur_kernel_handle_t hKernel, size_t localWorkSize,
173173
size_t dynamicSharedMemorySize, uint32_t *pGroupCountRet) {
174-
(void)hKernel;
175-
(void)localWorkSize;
176-
(void)dynamicSharedMemorySize;
177-
*pGroupCountRet = 1;
178-
return UR_RESULT_SUCCESS;
174+
std::ignore = hKernel;
175+
std::ignore = localWorkSize;
176+
std::ignore = dynamicSharedMemorySize;
177+
std::ignore = pGroupCountRet;
178+
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
179179
}
180180

181181
UR_APIEXPORT ur_result_t UR_APICALL urKernelSetArgValue(

source/adapters/opencl/kernel.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -360,13 +360,11 @@ UR_APIEXPORT ur_result_t UR_APICALL urKernelGetNativeHandle(
360360
}
361361

362362
UR_APIEXPORT ur_result_t UR_APICALL urKernelSuggestMaxCooperativeGroupCountExp(
363-
ur_kernel_handle_t hKernel, size_t localWorkSize,
364-
size_t dynamicSharedMemorySize, uint32_t *pGroupCountRet) {
365-
(void)hKernel;
366-
(void)localWorkSize;
367-
(void)dynamicSharedMemorySize;
368-
*pGroupCountRet = 1;
369-
return UR_RESULT_SUCCESS;
363+
[[maybe_unused]] ur_kernel_handle_t hKernel,
364+
[[maybe_unused]] size_t localWorkSize,
365+
[[maybe_unused]] size_t dynamicSharedMemorySize,
366+
[[maybe_unused]] uint32_t *pGroupCountRet) {
367+
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
370368
}
371369

372370
UR_APIEXPORT ur_result_t UR_APICALL urKernelCreateWithNativeHandle(

0 commit comments

Comments
 (0)