Repository navigation
Define the KernelAbstractions methods in oneAPI rather than an extension - #748
Merged
Merged
Conversation
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 Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
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.
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, KernelAbstractionsgives 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.