Skip to content

Commit

Permalink
[UR][hip][opencl] Mark urKernelSuggestMaxCooperativeGroupCountExp as …
Browse files Browse the repository at this point in the history
…unsupported instead of returning misleading default value
  • Loading branch information
GeorgeWeb committed Sep 25, 2024
1 parent ab5eb82 commit 2ccf3a7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
10 changes: 5 additions & 5 deletions source/adapters/hip/kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
12 changes: 5 additions & 7 deletions source/adapters/opencl/kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 2ccf3a7

Please sign in to comment.