Skip to content

Commit

Permalink
NFC: Refactor HIP guess local worksize funcs
Browse files Browse the repository at this point in the history
  • Loading branch information
hdelan committed Feb 12, 2024
1 parent 2cffb8c commit ec0ca91
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions source/adapters/hip/enqueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,9 @@ ur_result_t enqueueEventsWait(ur_queue_handle_t, hipStream_t Stream,

void simpleGuessLocalWorkSize(size_t *ThreadsPerBlock,
const size_t *GlobalWorkSize,
const size_t MaxThreadsPerBlock[3],
ur_kernel_handle_t Kernel) {
const size_t MaxThreadsPerBlock[3]) {
assert(ThreadsPerBlock != nullptr);
assert(GlobalWorkSize != nullptr);
assert(Kernel != nullptr);

std::ignore = Kernel;

ThreadsPerBlock[0] = std::min(MaxThreadsPerBlock[0], GlobalWorkSize[0]);

Expand Down Expand Up @@ -345,7 +341,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urEnqueueKernelLaunch(
}
} else {
simpleGuessLocalWorkSize(ThreadsPerBlock, pGlobalWorkSize,
MaxThreadsPerBlock, hKernel);
MaxThreadsPerBlock);
}
}

Expand Down

0 comments on commit ec0ca91

Please sign in to comment.