Skip to content

Commit

Permalink
Merge 39a43a1 into 2eb20ed
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed May 18, 2022
2 parents 2eb20ed + 39a43a1 commit 0486961
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
GROUP: ${{ matrix.group }}
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
Expand Down
2 changes: 1 addition & 1 deletion lib/LinearSolvePardiso/src/LinearSolvePardiso.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module LinearSolvePardiso

using Pardiso, LinearSolve, SciMLBase

Base.@kwdef struct PardisoJL <: SciMLBase.SciMLLinearSolveAlgorithm
Base.@kwdef struct PardisoJL <: LinearSolve.SciMLLinearSolveAlgorithm
nprocs::Union{Int,Nothing} = nothing
solver_type::Union{Int,Pardiso.Solver,Nothing} = nothing
matrix_type::Union{Int,Pardiso.MatrixType,Nothing} = nothing
Expand Down
8 changes: 4 additions & 4 deletions src/default.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function defaultalg(A,b)
# Special case on Arrays: avoid BLAS for RecursiveFactorization.jl when
# it makes sense according to the benchmarks, which is dependent on
# whether MKL or OpenBLAS is being used
if (A === nothing && b isa AbstractGPUArray) || A isa Matrix
if (A === nothing && b isa GPUArrays.AbstractGPUArray) || A isa Matrix
if (A === nothing || eltype(A) <: Union{Float32,Float64,ComplexF32,ComplexF64}) &&
ArrayInterface.can_setindex(b)
if length(b) <= 10
Expand Down Expand Up @@ -39,7 +39,7 @@ function defaultalg(A,b)

# This catches the case where A is a CuMatrix
# Which does not have LU fully defined
elseif A isa AbstractGPUArray || b isa AbstractGPUArray
elseif A isa GPUArrays.AbstractGPUArray || b isa GPUArrays.AbstractGPUArray
alg = QRFactorization(false)

# Not factorizable operator, default to only using A*x
Expand Down Expand Up @@ -100,7 +100,7 @@ function SciMLBase.solve(cache::LinearCache, alg::Nothing,

# This catches the case where A is a CuMatrix
# Which does not have LU fully defined
elseif A isa AbstractGPUArray
elseif A isa GPUArrays.AbstractGPUArray
alg = QRFactorization(false)
SciMLBase.solve(cache, alg, args...; kwargs...)

Expand Down Expand Up @@ -158,7 +158,7 @@ function init_cacheval(alg::Nothing, A, b, u, Pl, Pr, maxiters, abstol, reltol,

# This catches the case where A is a CuMatrix
# Which does not have LU fully defined
elseif A isa AbstractGPUArray
elseif A isa GPUArrays.AbstractGPUArray
alg = QRFactorization(false)
init_cacheval(alg, A, b, u, Pl, Pr, maxiters, abstol, reltol, verbose)

Expand Down

0 comments on commit 0486961

Please sign in to comment.