Skip to content

Commit 159345f

Browse files
kshyattmaleadt
andauthored
Split out BLAS Level 3 GEMM tests (#2610)
Co-authored-by: Tim Besard <[email protected]>
1 parent 4bec614 commit 159345f

File tree

6 files changed

+1080
-1023
lines changed

6 files changed

+1080
-1023
lines changed

lib/cublas/linalg.jl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -203,19 +203,19 @@ LinearAlgebra.generic_trimatdiv!(C::StridedCuVector{T}, uploc, isunitc, tfun::Fu
203203
trsv!(uploc, tfun === identity ? 'N' : tfun === transpose ? 'T' : 'C', isunitc, A, C === B ? C : copyto!(C, B))
204204

205205
# work around upstream breakage from JuliaLang/julia#55547
206-
@static if VERSION == v"1.11.2"
207-
const CuUpperOrUnitUpperTriangular = LinearAlgebra.UpperOrUnitUpperTriangular{
208-
<:Any,<:Union{<:CuArray, Adjoint{<:Any, <:CuArray}, Transpose{<:Any, <:CuArray}}}
209-
const CuLowerOrUnitLowerTriangular = LinearAlgebra.LowerOrUnitLowerTriangular{
210-
<:Any,<:Union{<:CuArray, Adjoint{<:Any, <:CuArray}, Transpose{<:Any, <:CuArray}}}
211-
212-
LinearAlgebra.istriu(::CuUpperOrUnitUpperTriangular) = true
213-
LinearAlgebra.istril(::CuUpperOrUnitUpperTriangular) = false
214-
LinearAlgebra.istriu(::CuLowerOrUnitLowerTriangular) = false
215-
LinearAlgebra.istril(::CuLowerOrUnitLowerTriangular) = true
206+
@static if VERSION >= v"1.11.2"
207+
const CuUpperOrUnitUpperTriangular = LinearAlgebra.UpperOrUnitUpperTriangular{
208+
<:Any,<:Union{<:CuArray, Adjoint{<:Any, <:CuArray}, Transpose{<:Any, <:CuArray}}}
209+
const CuLowerOrUnitLowerTriangular = LinearAlgebra.LowerOrUnitLowerTriangular{
210+
<:Any,<:Union{<:CuArray, Adjoint{<:Any, <:CuArray}, Transpose{<:Any, <:CuArray}}}
211+
LinearAlgebra.istriu(::CuUpperOrUnitUpperTriangular) = true
212+
LinearAlgebra.istril(::CuUpperOrUnitUpperTriangular) = false
213+
LinearAlgebra.istriu(::CuLowerOrUnitLowerTriangular) = false
214+
LinearAlgebra.istril(::CuLowerOrUnitLowerTriangular) = true
216215
end
217216

218217

218+
219219
#
220220
# BLAS 3
221221
#

lib/cusparse/linalg.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,18 @@ function LinearAlgebra.dot(y::CuVector{T}, A::CuSparseMatrixCSR{T}, x::CuVector{
238238
return sum(result)
239239
end
240240

241+
# work around upstream breakage from JuliaLang/julia#55547
242+
@static if VERSION >= v"1.11.2"
243+
const CuSparseUpperOrUnitUpperTriangular = LinearAlgebra.UpperOrUnitUpperTriangular{
244+
<:Any,<:Union{<:AbstractCuSparseMatrix, Adjoint{<:Any, <:AbstractCuSparseMatrix}, Transpose{<:Any, <:AbstractCuSparseMatrix}}}
245+
const CuSparseLowerOrUnitLowerTriangular = LinearAlgebra.LowerOrUnitLowerTriangular{
246+
<:Any,<:Union{<:AbstractCuSparseMatrix, Adjoint{<:Any, <:AbstractCuSparseMatrix}, Transpose{<:Any, <:AbstractCuSparseMatrix}}}
247+
LinearAlgebra.istriu(::CuSparseUpperOrUnitUpperTriangular) = true
248+
LinearAlgebra.istril(::CuSparseUpperOrUnitUpperTriangular) = false
249+
LinearAlgebra.istriu(::CuSparseLowerOrUnitLowerTriangular) = false
250+
LinearAlgebra.istril(::CuSparseLowerOrUnitLowerTriangular) = true
251+
end
252+
241253
for SparseMatrixType in [:CuSparseMatrixCSC, :CuSparseMatrixCSR]
242254
@eval begin
243255
LinearAlgebra.triu(A::$SparseMatrixType{T}, k::Integer) where {T} =

test/core/initialization.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,9 @@ end
185185

186186
## allocations
187187

188-
@test @allocated(current_context()) == 0
189-
@test @allocated(context()) == 0
190-
@test @allocated(stream()) == 0
191-
@test @allocated(device()) == 0
188+
let broken = VERSION == v"1.11.3" && Base.JLOptions().code_coverage != 0
189+
@test @allocated(current_context()) == 0 broken=broken
190+
@test @allocated(context()) == 0 broken=broken
191+
@test @allocated(stream()) == 0 broken=broken
192+
@test @allocated(device()) == 0 broken=broken
193+
end

0 commit comments

Comments
 (0)