Skip to content

compat: restore CUDA v5 lower bound#450

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:restore-cuda5-support
May 9, 2026
Merged

compat: restore CUDA v5 lower bound#450
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:restore-cuda5-support

Conversation

@ChrisRackauckas-Claude
Copy link
Copy Markdown
Contributor

Note

Draft PR — please ignore until reviewed by @ChrisRackauckas.

Closes #449.

Why

PR #441 cleanup bumped CUDA = "5, 6""6" along with a batch of other major-version drops. The CUDA part was unnecessarily aggressive: CUDA 6 was released with no breaking changes from 5 (see v6.0.0 release notes), and the lift broke downstream consumers like NeuralLyapunov whose stack still requires CUDA 5 transitively (via AdvancedHMC, see SciML/NeuralLyapunov.jl#175).

What

CUDA = "6"CUDA = "5, 6" in:

  • Project.toml
  • test/Project.toml
  • docs/Project.toml

No code changes. The CUDAExt surface is tiny:

# ext/CUDAExt.jl
DiffEqGPU.maxthreads(::CUDABackend) = 256
DiffEqGPU.maybe_prefer_blocks(::CUDABackend) = CUDABackend(; prefer_blocks = true)
function DiffEqGPU.lufact!(::CUDABackend, W)
    CUDA.CUBLAS.getrf_strided_batched!(W, false)
    return nothing
end

CUDA.CUDABackend and CUDA.CUBLAS.getrf_strided_batched! are both stable across CUDA 5 and 6, so no shim is needed. Test code uses only CUDA.CUDABackend() (in test/utils.jl).

Verification

Local resolution checks (Julia 1.10, no GPU on the test machine — CI will exercise the actual GPU paths):

# CUDA = "5, 6" in package + test envs
julia --project=test -e 'using Pkg; Pkg.add(PackageSpec(name="CUDA", version="5"))'
# → resolves to CUDA v5.11.2; DiffEqGPU.CUDAExt + LinearSolveCUDAExt + DiffEqBaseCUDAExt all precompile

julia --project=test -e 'using Pkg; Pkg.add(PackageSpec(name="CUDA", version="6"))'
# → resolves to CUDA v6.1.0; same extensions all precompile

Both endpoints of the new range resolve cleanly with the rest of the test stack (OrdinaryDiffEq 7, ModelingToolkit 11, SciMLBase 3, etc.).

Drop the upper-only CUDA = "6" pin in favor of CUDA = "5, 6". CUDA 6
ships with no breaking changes from 5 (per the v6.0.0 release notes),
the CUDAExt path only touches CUDA.CUDABackend and
CUDA.CUBLAS.getrf_strided_batched! — both stable across both majors —
and the test utilities use only CUDA.CUDABackend(). Restoring the v5
lower bound unblocks consumers (e.g. NeuralLyapunov via AdvancedHMC)
that haven't yet upgraded their CUDA compat.

Resolves SciML#449.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas ChrisRackauckas marked this pull request as ready for review May 9, 2026 20:22
@ChrisRackauckas ChrisRackauckas merged commit 2f86515 into SciML:master May 9, 2026
22 of 25 checks passed
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.

Restore CUDA.jl v5 support

2 participants