Repository navigation
Conversation
Contributor
Benchmark resultsCompared with c42b1f458, the merge base.
No unusual changes. All benchmarks
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #939 +/- ##
==========================================
- Coverage 84.80% 84.11% -0.70%
==========================================
Files 31 31
Lines 2593 2562 -31
==========================================
- Hits 2199 2155 -44
- Misses 394 407 +13 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
A launch with a partial work-group runs the bounds-checked kernel, whose work-item loop vectorizes poorly. Shrink each dimension of the tuned size to the largest divisor of the ndrange that keeps at least half of it. On an M1, a 126³ stencil takes 257 µs instead of 588.
Such launches run the bounds-checked kernel anyway, and run it faster in smaller work-groups: axpy over 1000003 elements on 4 threads takes 31 µs instead of 71 on a Ryzen 9 9950X, and 128 instead of 146 on an EPYC 7502.
maleadt
force-pushed
the
tb/pocl-fit-workgroups
branch
from
November 4, 2026 09:12
415cc6b to
9093deb
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Split out of #906.
A launch with a partial work-group runs the bounds-checked kernel for all work-groups, and its work-item loop vectorizes poorly (AArch64 has no masked loads and stores; on an EPYC 7502 (Zen 2), they make a work-group 12× slower). Tuned work-groups now shrink, per dimension, to the largest divisor of the ndrange that keeps at least half the size, so that more launches run unchecked. If no divisor fits, they shrink to a quarter: the launch stays checked, but runs faster in smaller work-groups (axpy over 1000003 elements on 4 threads: 71 µs with divisors only, 31 µs with the quarter). Work-groups only shrink, so the padding stays within what
KA.select_launchassumes; explicit sizes are kept.Per-launch time in µs, including synchronization, on PoCL's queue; Ryzen 9 9950X (Zen 5, 16 cores), median of 3 runs of 31 × 20 ms samples; main is
c10ff8cf.4 threads:
16 threads:
Store 4356 at 16 threads is noisy (10th percentiles: 4.59 → 4.18 µs). Stencil 127³ regresses by 1–2%: no divisor fits, so
(127, 32, 1)becomes(127, 8, 1)and the launch stays checked. Stencil 126³ gets(126, 21, 1)and runs unchecked.Earlier main (pre-#931, same queue path), 4 threads, one run per configuration; times in µs:
The stencil is a 7-point Laplacian with an interior
if; axpy isy[i] = muladd(a, x[i], y[i]).