diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 6cb967994e..3e33aaa320 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -27,8 +27,12 @@ steps: - "1.8" - "1.9" - "1.10" + - "1.11" - "nightly" adjustments: + - with: + julia: "1.11" + soft_fail: true - with: julia: "nightly" soft_fail: true diff --git a/lib/cusolver/linalg.jl b/lib/cusolver/linalg.jl index df42f5f9db..f1089af857 100644 --- a/lib/cusolver/linalg.jl +++ b/lib/cusolver/linalg.jl @@ -34,7 +34,7 @@ function Base.:\(_A::CuMatOrAdj, _B::CuOrAdj) if n < m # LQ decomposition At = CuMatrix(A') - F, tau = CUSOLVER.geqrf!(At) # A = RᴴQᴴ + F, tau = geqrf!(At) # A = RᴴQᴴ if B isa CuVector{T} CUBLAS.trsv!('U', 'C', 'N', view(F,1:n,1:n), B) X = CUDA.zeros(T, m) @@ -45,15 +45,15 @@ function Base.:\(_A::CuMatOrAdj, _B::CuOrAdj) X = CUDA.zeros(T, m, p) view(X, 1:n, :) .= B end - CUSOLVER.ormqr!('L', 'N', F, tau, X) + ormqr!('L', 'N', F, tau, X) elseif n == m # LU decomposition with partial pivoting - F, p, info = CUSOLVER.getrf!(A) # PA = LU - X = CUSOLVER.getrs!('N', F, p, B) + F, p, info = getrf!(A) # PA = LU + X = getrs!('N', F, p, B) else # QR decomposition - F, tau = CUSOLVER.geqrf!(A) # A = QR - CUSOLVER.ormqr!('L', 'C', F, tau, B) + F, tau = geqrf!(A) # A = QR + ormqr!('L', 'C', F, tau, B) if B isa CuVector{T} X = B[1:m] CUBLAS.trsv!('U', 'N', 'N', view(F,1:m,1:m), X) @@ -307,9 +307,22 @@ end ## LU -function LinearAlgebra.lu!(A::StridedCuMatrix{T}, ::RowMaximum; check::Bool = true) where {T} +function _check_lu_success(info, allowsingular) + if VERSION >= v"1.11.0-DEV.1535" + if info < 0 # zero pivot error from unpivoted LU + LinearAlgebra.checknozeropivot(-info) + else + allowsingular || LinearAlgebra.checknonsingular(info) + end + else + LinearAlgebra.checknonsingular(info) + end +end + +function LinearAlgebra.lu!(A::StridedCuMatrix{T}, ::RowMaximum; + check::Bool=true, allowsingular::Bool=false) where {T} lpt = getrf!(A) - check && LinearAlgebra.checknonsingular(lpt[3]) + check && _check_lu_success(lpt[3], allowsingular) return LU(lpt[1], lpt[2], Int(lpt[3])) end diff --git a/test/base/sorting.jl b/test/base/sorting.jl index 7c42b942f4..e286da893c 100644 --- a/test/base/sorting.jl +++ b/test/base/sorting.jl @@ -1,10 +1,8 @@ using Random using DataStructures -@testset "quicksort" begin - -import CUDA.QuickSortImpl: flex_lt, find_partition, quicksort!, - partition_batches_kernel, consolidate_batch_partition, bubble_sort +import CUDA.QuickSortImpl: flex_lt, find_partition, quicksort!, partition_batches_kernel, + consolidate_batch_partition, bubble_sort @testset "integer functions" begin @test flex_lt(1, 2, false, isless, identity) == true @@ -279,9 +277,6 @@ end end end -# XXX: some tests here make compute-sanitizer hang, but only on CI. -# maybe related to the container set-up? try again once we use Sandbox.jl. - @testset "interface" begin @testset "quicksort" begin # pre-sorted @@ -389,7 +384,7 @@ end @test check_sortperm(Float64, 1000000; rev=true) @test check_sortperm(Float64, 1000000; by=x->abs(x-0.5)) @test check_sortperm(Float64, 1000000; rev=true, by=x->abs(x-0.5)) - + if VERSION >= v"1.9" # Base.jl didn't implement sortperm(;dims) until 1.9 @test check_sortperm(Float32, (100_000, 16); dims=1) @@ -406,5 +401,3 @@ end # mismatched types (JuliaGPU/CUDA.jl#2046) @test check_sortperm!(collect(UInt64(1):UInt64(1000000)), Int64, 1000000) end - -end diff --git a/test/libraries/cusolver/dense_generic.jl b/test/libraries/cusolver/dense_generic.jl index 4af66b997f..829cdee979 100644 --- a/test/libraries/cusolver/dense_generic.jl +++ b/test/libraries/cusolver/dense_generic.jl @@ -128,20 +128,20 @@ p = 5 A = rand(elty,m,n) d_A = CuMatrix(A) U, Σ, V, err_sigma = CUSOLVER.Xgesvdp!('V', 0, d_A) - @test A ≈ collect(U[:,1:n] * Diagonal(Σ) * V') + @test A ≈ collect(U[:,1:n]) * Diagonal(collect(Σ)) * collect(V)' d_A = CuMatrix(A) U, Σ, V, err_sigma = CUSOLVER.Xgesvdp!('V', 1, d_A) - @test A ≈ collect(U * Diagonal(Σ) * V') + @test A ≈ collect(U) * Diagonal(collect(Σ)) * collect(V)' A = rand(elty,n,m) d_A = CuMatrix(A) U, Σ, V, err_sigma = CUSOLVER.Xgesvdp!('V', 0, d_A) - @test A ≈ collect(U * Diagonal(Σ) * V[:,1:n]') + @test A ≈ collect(U) * Diagonal(collect(Σ)) * collect(V[:,1:n])' d_A = CuMatrix(A) U, Σ, V, err_sigma = CUSOLVER.Xgesvdp!('V', 1, d_A) - @test A ≈ collect(U * Diagonal(Σ) * V') + @test A ≈ collect(U) * Diagonal(collect(Σ)) * collect(V)' end # @testset "gesvdr!" begin diff --git a/test/setup.jl b/test/setup.jl index c3eac1611c..492bd1cba0 100644 --- a/test/setup.jl +++ b/test/setup.jl @@ -93,8 +93,15 @@ function runtests(f, name, time_source=:cuda) else missing end - passes,fails,error,broken,c_passes,c_fails,c_errors,c_broken = - Test.get_test_counts(data[1]) + if VERSION >= v"1.11.0-DEV.1529" + tc = Test.get_test_counts(data[1]) + passes,fails,error,broken,c_passes,c_fails,c_errors,c_broken = + tc.passes, tc.fails, tc.errors, tc.broken, tc.cumulative_passes, + tc.cumulative_fails, tc.cumulative_errors, tc.cumulative_broken + else + passes,fails,errors,broken,c_passes,c_fails,c_errors,c_broken = + Test.get_test_counts(data[1]) + end if data[1].anynonpass == false data = ((passes+c_passes,broken+c_broken), data[2],