Deprecate GPU as an alias of Backend instead of removing it - #828
Merged
Merged
Conversation
`KernelAbstractions.GPU` was removed in #800, which breaks packages that still dispatch on `::GPU` or subtype it. A local test of the registered dependents against KA 0.10 found AbstractNeuralNetworks, ArraysOfArrays, BatchSolve, BeamTracking and Aether failing to precompile on it. Keep the name as a deprecated, exported binding for `Backend`, so that code written against 0.9 keeps working with a deprecation warning. Since `CPU` was a subtype of `GPU` already, `::GPU` matching every backend is the same behavior as before. Assisted-by: Claude Code (Opus 5.5)
vchuravy
commented
Oct 3, 2026
vchuravy
commented
Oct 3, 2026
Contributor
Benchmark ResultsShow table
Benchmark PlotsA plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR. |
Co-authored-by: Valentin Churavy <v.churavy@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #828 +/- ##
==========================================
- Coverage 78.82% 76.30% -2.53%
==========================================
Files 24 24
Lines 2021 2114 +93
==========================================
+ Hits 1593 1613 +20
- Misses 428 501 +73 ☔ 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.
#800 removed
KernelAbstractions.GPU. That breaks registered packages that still dispatch on::GPUor definestruct MyBackend <: GPU. I tested the registered dependents locally against KAmain, and several fail to precompile withUndefVarError: `GPU` not defined:That run is only partway through, so more are likely.
This PR keeps
GPUas a deprecated, exported alias:Base.@deprecate_binding GPU Backend. Code written for 0.9 keeps working and prints a deprecation warning when--depwarn=yes.Behavior:
::GPUnow matches every backend. That is unchanged in practice, because theCPUbackend was already a subtype ofGPU.The 0.10 notes in
docs/src/index.mdnow describeGPUas deprecated instead of removed.Tested locally on Julia 1.12:
struct MyBackend <: KernelAbstractions.GPUand an unqualifiedf(::GPU), loads and dispatches correctly.🤖 Generated with Claude Code