Skip to content

Commit e64a3df

Browse files
authored
fix dispatch to herk (#1247)
1 parent bfdb742 commit e64a3df

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/matmul.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ end
692692
# the aggressive constprop pushes tA and tB into gemm_wrapper!, which is needed for wrap calls within it
693693
# to be concretely inferred
694694
Base.@constprop :aggressive function syrk_wrapper!(C::StridedMatrix{T}, tA::AbstractChar, A::StridedVecOrMat{T},
695-
alpha::Number, beta::Number) where {T<:BlasFloat}
695+
α::Number, β::Number) where {T<:BlasFloat}
696696
nC = checksquare(C)
697697
tA_uc = uppercase(tA) # potentially convert a WrapperChar to a Char
698698
if tA_uc == 'T'
@@ -708,16 +708,16 @@ Base.@constprop :aggressive function syrk_wrapper!(C::StridedMatrix{T}, tA::Abst
708708

709709
# BLAS.syrk! only updates symmetric C
710710
# alternatively, make non-zero β a show-stopper for BLAS.syrk!
711-
if iszero(beta) || issymmetric(C)
712-
α, β = promote(alpha, beta, zero(T))
711+
if iszero(β) || issymmetric(C)
712+
alpha, beta = promote(α, β, zero(T))
713713
if (alpha isa Union{Bool,T} &&
714714
beta isa Union{Bool,T} &&
715715
stride(A, 1) == stride(C, 1) == 1 &&
716716
_fullstride2(A) && _fullstride2(C))
717717
return copytri!(BLAS.syrk!('U', tA, alpha, A, beta, C), 'U')
718718
end
719719
end
720-
return gemm_wrapper!(C, tA, tAt, A, A, alpha, beta)
720+
return gemm_wrapper!(C, tA, tAt, A, A, α, β)
721721
end
722722
# legacy method
723723
syrk_wrapper!(C::StridedMatrix{T}, tA::AbstractChar, A::StridedVecOrMat{T}, _add::MulAddMul = MulAddMul()) where {T<:BlasFloat} =
@@ -743,7 +743,7 @@ Base.@constprop :aggressive function herk_wrapper!(C::Union{StridedMatrix{T}, St
743743
# Result array does not need to be initialized as long as beta==0
744744
# C = Matrix{T}(undef, mA, mA)
745745

746-
if iszero(β) || issymmetric(C)
746+
if iszero(β) || ishermitian(C)
747747
alpha, beta = promote(α, β, zero(T))
748748
if (alpha isa Union{Bool,T} &&
749749
beta isa Union{Bool,T} &&

0 commit comments

Comments
 (0)