Skip to content

Commit b1ac878

Browse files
Merge pull request #478 from ChrisRackauckas-Claude/fix-deprecation-warnings
Remove stale version checks and fix soft scope warning
2 parents 4b9414a + 4938f58 commit b1ac878

File tree

4 files changed

+7
-28
lines changed

4 files changed

+7
-28
lines changed

ext/ArrayInterfaceCUDAExt.jl

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,9 @@ using CUDA.CUSOLVER
66
using LinearAlgebra
77

88
function ArrayInterface.lu_instance(A::CuMatrix{T}) where {T}
9-
if VERSION >= v"1.8-"
10-
ipiv = cu(Vector{Int32}(undef, 0))
11-
info = zero(Int)
12-
return LinearAlgebra.LU(similar(A, 0, 0), ipiv, info)
13-
else
14-
LinearAlgebra.lu(A; check = false)
15-
end
9+
ipiv = cu(Vector{Int32}(undef, 0))
10+
info = zero(Int)
11+
return LinearAlgebra.LU(similar(A, 0, 0), ipiv, info)
1612
end
1713

1814
ArrayInterface.device(::Type{<:CUDA.CuArray}) = ArrayInterface.GPU()

src/ArrayInterface.jl

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,7 @@ module ArrayInterface
22

33
using LinearAlgebra
44

5-
@static if isdefined(Base, Symbol("@assume_effects"))
6-
using Base: @assume_effects
7-
else
8-
macro assume_effects(args...)
9-
n = nfields(args)
10-
call = getfield(args, n)
11-
if n === 2 && getfield(args, 1) === QuoteNode(:total)
12-
return esc(:(Base.@pure $(call)))
13-
else
14-
return esc(call)
15-
end
16-
end
17-
end
5+
using Base: @assume_effects
186
@assume_effects :total __parameterless_type(T)=Base.typename(T).wrapper
197
parameterless_type(x) = parameterless_type(typeof(x))
208
parameterless_type(x::Type) = __parameterless_type(x)

test/bandedmatrices.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ rowind, colind = ArrayInterface.findstructralnz(B)
2424
@test ArrayInterface.fast_matrix_colors(typeof(B))
2525

2626
for op in (adjoint, transpose)
27+
local B
2728
B = BandedMatrix(Ones(5, 5), (-1, 2))
2829
B[band(1)] .= [1, 2, 3, 4]
2930
B[band(2)] .= [5, 6, 7]

test/core.jl

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,7 @@ end
110110

111111
@testset "fast_scalar_indexing" begin
112112
@test !fast_scalar_indexing(qr(rand(10, 10)).Q)
113-
if VERSION >= v"1.7"
114-
@test !fast_scalar_indexing(qr(rand(10, 10), ColumnNorm()).Q)
115-
else
116-
@test !fast_scalar_indexing(qr(rand(10, 10), Val(true)).Q)
117-
end
113+
@test !fast_scalar_indexing(qr(rand(10, 10), ColumnNorm()).Q)
118114
@test !fast_scalar_indexing(lq(rand(10, 10)).Q)
119115
@test fast_scalar_indexing(Nothing) # test default
120116
end
@@ -285,9 +281,7 @@ end
285281
for A in [sparse([1.0 2.0; 3.0 4.0])]
286282
@test ArrayInterface.lu_instance(A) isa typeof(lu(A))
287283
@test ArrayInterface.qr_instance(A) isa typeof(qr(A))
288-
if VERSION >= v"1.9-"
289-
@test ArrayInterface.cholesky_instance(A' * A) isa typeof(cholesky(A' * A))
290-
end
284+
@test ArrayInterface.cholesky_instance(A' * A) isa typeof(cholesky(A' * A))
291285
@test ArrayInterface.ldlt_instance(SymTridiagonal(A' * A)) isa typeof(ldlt(SymTridiagonal(A' * A)))
292286
end
293287
end

0 commit comments

Comments
 (0)