Skip to content

Commit ad0e923

Browse files
authored
Fixes for Julia 1.12 (#619)
1 parent c2e3cf8 commit ad0e923

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/host/linalg.jl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ end
107107
## copy a triangular part of a matrix to another matrix
108108

109109
if isdefined(LinearAlgebra, :copytrito!)
110-
function LinearAlgebra.copytrito!(B::AbstractGPUMatrix, A::AbstractGPUMatrix, uplo::AbstractChar)
110+
function LinearAlgebra.copytrito!(B::AbstractGPUMatrix{T}, A::AbstractGPUMatrix{T}, uplo::AbstractChar) where {T}
111111
LinearAlgebra.BLAS.chkuplo(uplo)
112112
m,n = size(A)
113113
m1,n1 = size(B)
@@ -376,6 +376,13 @@ function LinearAlgebra.generic_matmatmul!(C::AbstractGPUVecOrMat, tA, tB, A::Abs
376376
LinearAlgebra.@stable_muladdmul generic_matmatmul!(C, wrap(A, tA), wrap(B, tB), MulAddMul(a, b))
377377
end
378378
end
379+
@static if VERSION v"1.12.0-rc"
380+
# we need to use the generic wrapper to avoid dispatch to the 2x2or3x3 method
381+
using LinearAlgebra: generic_matmatmul_wrapper!, BlasFlag
382+
function LinearAlgebra.generic_matmatmul_wrapper!(C::AbstractGPUMatrix{T}, tA::AbstractChar, tB::AbstractChar, A::AbstractGPUVecOrMat{T}, B::AbstractGPUVecOrMat{T}, alpha::Number, beta::Number, val::LinearAlgebra.BlasFlag.SyrkHerkGemm) where {T}
383+
LinearAlgebra.generic_matmatmul!(C, tA, tB, A, B, alpha, beta)
384+
end
385+
end
379386

380387
function generic_trimatmul!(C::AbstractGPUVecOrMat{R}, uploc, isunitc, tfun::Function, A::AbstractGPUMatrix{T}, B::AbstractGPUVecOrMat{S}) where {T,S,R}
381388
if size(A,2) != size(B,1)

0 commit comments

Comments
 (0)