Skip to content

Define the KernelAbstractions methods in oneAPI rather than an extension - #748

Merged
maleadt merged 1 commit into
mainfrom
tb/ka-invalidations
Oct 27, 2026
Merged

maleadt merged 1 commit into
mainfrom
tb/ka-invalidations

Conversation

@maleadt

@maleadt maleadt commented Oct 27, 2026

Copy link
Copy Markdown
Member

GPUArrays depends on KernelAbstractions, so it is always loaded anyway. This PR makes it a dependency of oneAPI.jl and moves the methods of KernelAbstractionsExt into oneAPIKernels.jl.

In oneAPI.jl the extension didn't invalidate anything, and oneAPI.jl doesn't precompile KernelAbstractions launches, so this doesn't change load time or invalidations (@snoop_invalidations using oneAPI, KernelAbstractions gives the same count before and after). It does in the other back-ends: there, adding the extension's methods at load invalidated precompiled launches (JuliaGPU/AMDGPU.jl#1202, JuliaGPU/CUDA.jl#3493, JuliaGPU/Metal.jl#1118). This keeps the back-ends uniform, so that none of them define their KernelAbstractions methods in an extension.

KernelAbstractions is always loaded anyway, since GPUArrays depends on it, so
make it a dependency and move the extension's methods into oneAPIKernels.

Here the extension did not invalidate anything, and oneAPI does not precompile
KernelAbstractions launches, but the other back-ends need this change to keep
their precompiled launches valid. Doing the same keeps them uniform, and makes
sure the KernelAbstractions methods exist whenever oneAPI's precompiled code is
compiled.
@codecov

codecov Bot commented Oct 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 86.63%. Comparing base (9417a8c) to head (f3b6ca5).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/oneAPIKernels.jl 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #748      +/-   ##
==========================================
+ Coverage   85.96%   86.63%   +0.67%     
==========================================
  Files          55       55              
  Lines        5044     4999      -45     
==========================================
- Hits         4336     4331       -5     
+ Misses        708      668      -40     

☔ 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 2ec42dc into main Oct 27, 2026
5 checks passed
@maleadt
maleadt deleted the tb/ka-invalidations branch October 27, 2026 19:35
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