JLArrays: Disallow conversions to CPU pointers. - #549
Merged
Conversation
maleadt
marked this pull request as draft
July 5, 2024 11:32
Helps flush out uses of unsupported functionality, e.g. a call to `qr(::JLArray)` that would dispatch to `LAPACK.geqrt!` without erroring. `Base.pointer` remains available for callers that explicitly want a pointer; the guard lives on `Base.unsafe_convert`, which is what ccall routes through. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
maleadt
marked this pull request as ready for review
May 15, 2026 14:09
ChrisRackauckas
added a commit
to SciML/LinearSolve.jl
that referenced
this pull request
Aug 8, 2026
…requires (#1155) JLArrays 0.3.2 (JuliaGPU/GPUArrays.jl#549) makes unsafe_convert(Ptr, ::JLArray) throw, so the stdlib LAPACK lu that LUFactorization fell through to on JLArray now errors with 'Illegal conversion of a JLArray to a Ptr' instead of silently factorizing the CPU-backed buffer. JLArray ships no native lu (real GPU backends get theirs from CUSOLVER etc.), so an LU algorithm can never satisfy the GPU contract this file exists to prove. Solve the device problems with KrylovJL_GMRES at tight tolerances instead; the split-Dual machinery under test is algorithm-agnostic and still reproduces the CPU LU reference to 1e-12. Co-authored-by: Chris Rackauckas <accounts@chrisrackauckas.com>
8 tasks
christiangnrd
added a commit
that referenced
this pull request
Aug 24, 2026
christiangnrd
added a commit
that referenced
this pull request
Aug 25, 2026
This reverts commit 00f6243.
christiangnrd
added a commit
that referenced
this pull request
Aug 25, 2026
This reverts commit 00f6243.
christiangnrd
added a commit
that referenced
this pull request
Aug 25, 2026
maleadt
pushed a commit
that referenced
this pull request
Aug 26, 2026
christiangnrd
added a commit
that referenced
this pull request
Aug 26, 2026
christiangnrd
added a commit
that referenced
this pull request
Aug 26, 2026
christiangnrd
added a commit
that referenced
this pull request
Aug 27, 2026
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.
This helps flush out uses of unsupported functionality.
Noticed in #458, where a call to
qr(::JLArray)dispatched toLAPACK.geqrt!without erroring.