@@ -47,7 +47,11 @@ function defaultalg(A, b)
47
47
# This catches the case where A is a CuMatrix
48
48
# Which does not have LU fully defined
49
49
elseif A isa GPUArraysCore. AbstractGPUArray || b isa GPUArraysCore. AbstractGPUArray
50
- alg = LUFactorization ()
50
+ if VERSION >= v " 1.8-"
51
+ alg = LUFactorization ()
52
+ else
53
+ alg = QRFactorization ()
54
+ end
51
55
52
56
# Not factorizable operator, default to only using A*x
53
57
else
@@ -118,9 +122,13 @@ function SciMLBase.solve(cache::LinearCache, alg::Nothing,
118
122
# This catches the case where A is a CuMatrix
119
123
# Which does not have LU fully defined
120
124
elseif A isa GPUArraysCore. AbstractGPUArray
121
- alg = LUFactorization ()
122
- SciMLBase. solve (cache, alg, args... ; kwargs... )
123
-
125
+ if VERSION >= v " 1.8-"
126
+ alg = LUFactorization ()
127
+ SciMLBase. solve (cache, alg, args... ; kwargs... )
128
+ else
129
+ alg = QRFactorization ()
130
+ SciMLBase. solve (cache, alg, args... ; kwargs... )
131
+ end
124
132
# Not factorizable operator, default to only using A*x
125
133
# IterativeSolvers is faster on CPU but not GPU-compatible
126
134
else
@@ -185,9 +193,13 @@ function init_cacheval(alg::Nothing, A, b, u, Pl, Pr, maxiters, abstol, reltol,
185
193
# This catches the case where A is a CuMatrix
186
194
# Which does not have LU fully defined
187
195
elseif A isa GPUArraysCore. AbstractGPUArray
188
- alg = LUFactorization ()
189
- init_cacheval (alg, A, b, u, Pl, Pr, maxiters, abstol, reltol, verbose)
190
-
196
+ if VERSION >= v " 1.8-"
197
+ alg = LUFactorization ()
198
+ init_cacheval (alg, A, b, u, Pl, Pr, maxiters, abstol, reltol, verbose)
199
+ else
200
+ alg = QRFactorization ()
201
+ init_cacheval (alg, A, b, u, Pl, Pr, maxiters, abstol, reltol, verbose)
202
+ end
191
203
# Not factorizable operator, default to only using A*x
192
204
# IterativeSolvers is faster on CPU but not GPU-compatible
193
205
else
0 commit comments