Skip to content

Mark JLArray reverse tests broken with JLArrays 0.4.2 and GPUArrays 12.1.1 - #849

Merged
devmotion merged 1 commit into
mainfrom
dmw/fix-gpu-reverse
Oct 16, 2026
Merged

devmotion merged 1 commit into
mainfrom
dmw/fix-gpu-reverse

Conversation

@devmotion

@devmotion devmotion commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

With GPUArrays 12.1.1 and the latest registered JLArrays (0.4.2), reverse(::JLArray) throws This kernel is unavailable for backend CPU. This breaks the two @gpu reverse tests in test/rulesets/Base/array.jl on every CI job (seen in #848).

GPUArrays 12.1.1 (JuliaGPU/GPUArrays.jl#815) implements reverse of GPU vectors with AcceleratedKernels, whose kernels are not available on the JLArrays backend. The same upstream PR added JLArrays methods that avoid this path, but no JLArrays version with them has been released yet. The registered 0.4.2 lacks them. I reported this as JuliaGPU/GPUArrays.jl#817. With GPUArrays 12.1.0, or with JLArrays from GPUArrays' main, the calls work.

This PR checks whether reverse(::JLArray) actually works, instead of checking where the method is defined, and uses @gpu_broken when it doesn't. The check also covers JLArrays < 0.4, where reverse needs scalar indexing. Once a fixed JLArrays is released, the tests will run as @gpu again automatically.

Tested locally with Julia 1.10, GPUArrays 12.1.1 and JLArrays 0.4.2: Pkg.test(test_args=["rulesets/Base/array"]) passes (7286 passed, 18 broken).

🤖 Generated with Claude Code

… 12.1.1

GPUArrays 12.1.1 implements `reverse` of GPU vectors with
AcceleratedKernels, whose kernels are unavailable on the JLArrays
backend ("This kernel is unavailable for backend CPU"). The JLArrays
methods that avoid this path are not released yet: the registered
JLArrays 0.4.2 lacks them (JuliaGPU/GPUArrays.jl#817).

Check whether `reverse(::JLArray)` actually works instead of where the
method is defined, which also covers JLArrays < 0.4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@devmotion
devmotion force-pushed the dmw/fix-gpu-reverse branch from eb5511a to b5772ea Compare October 16, 2026 14:54
@devmotion devmotion changed the title Mark JLArray reverse tests broken with GPUArrays 12.1.1 Mark JLArray reverse tests broken with JLArrays 0.4.2 and GPUArrays 12.1.1 Oct 16, 2026
@devmotion
devmotion merged commit 5f30885 into main Oct 16, 2026
8 of 10 checks passed
@devmotion
devmotion deleted the dmw/fix-gpu-reverse branch October 16, 2026 21:30
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