Skip to content

[SYCL][CUDA] Improve function to guess local work size more efficiently. #9787

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Jun 13, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add missing parantheses
  • Loading branch information
mmoadeli committed Jun 8, 2023
commit e3f83960beec5c57f41d1c19d97f78f17754e99f
4 changes: 2 additions & 2 deletions sycl/plugins/cuda/pi_cuda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,8 @@ void guessLocalWorkSize(_pi_device *device, size_t *threadsPerBlock,
// work group size to produce uniform work groups.
// Additionally, for best compute utilisation, the local size has
// to be a power of two.
while (0u != (x_global_work_size % threadsPerBlock[0]) ||
!isPowerOf2(threadsPerBlock[0]) {
while (0u != (x_global_work_size % threadsPerBlock[0]) ||
!isPowerOf2(threadsPerBlock[0])) {
--threadsPerBlock[0];
}
}
Expand Down