Skip to content

Commit

Permalink
Merge pull request #2038 from GeorgeWeb/georgi/unsupported-max-coop-w…
Browse files Browse the repository at this point in the history
…gsize

[UR][hip][opencl] Mark urKernelSuggestMaxCooperativeGroupCountExp as unsupported instead of returning misleading default value
  • Loading branch information
aarongreig authored Oct 7, 2024
2 parents 6759053 + 55bd563 commit df6da35
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 @@ -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(
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 @@ -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(
Expand Down

0 comments on commit df6da35

Please sign in to comment.