Skip to content

Compile launch argument handling once for all argument counts - #745

Merged
maleadt merged 1 commit into
mainfrom
tb/vector-call-generator
Oct 27, 2026
Merged

maleadt merged 1 commit into
mainfrom
tb/vector-call-generator

Conversation

@maleadt

@maleadt maleadt commented Oct 27, 2026

Copy link
Copy Markdown
Member

The call generator used tuples to build arguments for onecall, triggering compilation for each new argument count. Move this work to call_arguments, a vector-based helper with @nospecialize arguments that compiles once. The generated code is unchanged.

First launch of a new kernel on an Arc A770, Julia 1.12.7, KernelAbstractions 0.10.3. Median of 3 fresh processes, each measuring the median over 6 kernels:

main PR
@oneapi, new argument count 164 ms 135 ms
@oneapi, argument count seen before 105 ms 104 ms
KernelAbstractions, new argument count 218 ms 189 ms
KernelAbstractions, argument count seen before 169 ms 168 ms

Uses the approach from JuliaGPU/KernelAbstractions.jl#931 for PoCL's generator.

The full test suite passes on an Arc A770 (Julia 1.12.7).

The `call` generator used tuples to build its argument list, triggering
compilation for each new argument count. Move this work to a vector-based
helper that compiles once. This cuts ~30 ms from the first launch with a
new argument count on an Arc A770.
@codecov

codecov Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.64%. Comparing base (446f8ac) to head (f543c01).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/compiler/execution.jl 80.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #745      +/-   ##
==========================================
- Coverage   86.89%   86.64%   -0.25%     
==========================================
  Files          55       55              
  Lines        5090     4996      -94     
==========================================
- Hits         4423     4329      -94     
  Misses        667      667              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@maleadt
maleadt merged commit 9417a8c into main Oct 27, 2026
5 checks passed
@maleadt
maleadt deleted the tb/vector-call-generator branch October 27, 2026 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant