Skip to content

Add JLArrays extension and tests#31

Merged
kshyatt merged 2 commits intomainfrom
ksh/jlarrays
Feb 27, 2026
Merged

Add JLArrays extension and tests#31
kshyatt merged 2 commits intomainfrom
ksh/jlarrays

Conversation

@kshyatt
Copy link
Member

@kshyatt kshyatt commented Feb 27, 2026

JLArrays.jl is a mocking package from GPUArrays.jl that allows us to test array semantics and behavior without requiring a GPU or working CUDA/ROCm install. I added an extension here so that packages which depend on StridedViews can use JLArrays to test GPU integration on machines which don't have GPUs.

@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

❌ Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
ext/StridedViewsJLArraysExt.jl 0.00% 8 Missing ⚠️
Files with missing lines Coverage Δ
ext/StridedViewsJLArraysExt.jl 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lkdvos
Copy link
Member

lkdvos commented Feb 27, 2026

Looks good, however one main question here just to check that I am following:

Is the goal to try and rewrite/add to the Strided kernels an implementation that does not rely on scalar indexing? While I agree that it would be nice to have such functionality for the GPUarrays, I would guess that it would look like custom kernels (in the same spirit of https://github.com/JuliaGPU/GPUArrays.jl/blob/88dcf9c24b4d68e5e467135e1c6420fea459d1ae/src/host/linalg.jl#L712-L756). Does that then work with JLArrays, or should we then manually overload that to allow the scalar indexing in the mapreduce_kernel!?

@kshyatt
Copy link
Member Author

kshyatt commented Feb 27, 2026

Yes, the idea would be we would eventually write some custom kernels with KernelAbstractions. These can be directly used with JLArrays in a "CPU only" way, so we would be able to test that everything at least ran and gave correct results.

@kshyatt
Copy link
Member Author

kshyatt commented Feb 27, 2026

This is exactly what JLArrays itself does to test the GPUArrays internal kernels, etc.

@kshyatt
Copy link
Member Author

kshyatt commented Feb 27, 2026

Added a small test just to make sure the adapt stuff works in some sense

@kshyatt kshyatt merged commit 93c06e6 into main Feb 27, 2026
11 of 15 checks passed
@kshyatt kshyatt deleted the ksh/jlarrays branch February 27, 2026 15:36
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.

2 participants