Skip to content

Fix GPU Higham2005 LinearSolve fallback#246

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:agent/fix-gpu-higham2005-linsolve
Jul 12, 2026
Merged

Fix GPU Higham2005 LinearSolve fallback#246
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:agent/fix-gpu-higham2005-linsolve

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

This PR should be ignored until reviewed by @ChrisRackauckas.

This is separate from PR #245.

Root cause

PR #244 moved the generated ExpMethodHigham2005 Padé denominator solve through a cached LinearSolve workspace. The code intended GPU arrays to keep the existing lu! fallback, but the GPU CI stack shows CuArray entering LinearSolve.DefaultLinearSolver and then QRFactorization, failing in cuSOLVER ldiv! with:

DimensionMismatch: array could not be broadcast to match destination

The failing stack is from test/gpu/gputests.jl:22 through src/exp_noalloc.jl:64 and LinearSolve factorization.jl.

Evidence

Change

Make _pade_linsolve return nothing for GPUArraysCore.AbstractGPUArray values even when the array also satisfies the strided BLAS matrix method, forcing the generated code back onto its intended GPU lu! fallback.

Validation

  • timeout 3600 /home/crackauc/.juliaup/bin/julia +1 --project=. -e 'using Pkg; Pkg.test()' passed: Core/basictests.jl, 673 pass, 1 broken.
  • timeout 3600 /home/crackauc/.juliaup/bin/julia +1 --project=/home/crackauc/sandbox/tmp_20260708_051717_3275/repos/ExponentialUtilities-master-clean/investigation-logs/runic-env -e 'using Pkg; Pkg.add(Pkg.PackageSpec(name="Runic", version="1")); using Runic; exit(Runic.main(["--check", "."]))' passed.

Local GPU verification was not possible because this machine has no /dev/nvidia* device; the pushed draft PR is intended to let the self-hosted GPU job verify the fix.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review July 12, 2026 04:45
@ChrisRackauckas
ChrisRackauckas merged commit 9d135ae into SciML:master Jul 12, 2026
35 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.

2 participants