Skip to content

Conversation

@kshyatt
Copy link
Member

@kshyatt kshyatt commented Jan 8, 2026

Love when LinearAlgebra yet again breaks everything

@kshyatt kshyatt requested a review from maleadt January 8, 2026 10:57
@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

Your PR requires formatting changes to meet the project's style guidelines.
Please consider running Runic (git runic master) to apply these changes.

Click here to view the suggested changes.
diff --git a/src/host/linalg.jl b/src/host/linalg.jl
index 3f19aa4..e2a3261 100644
--- a/src/host/linalg.jl
+++ b/src/host/linalg.jl
@@ -497,10 +497,10 @@ end
     #function LinearAlgebra.generic_matmatmul_wrapper!(C::AbstractGPUMatrix{Complex{T}}, tA::AbstractChar, tB::AbstractChar, A::AbstractGPUVecOrMat{Complex{T}}, B::AbstractGPUVecOrMat{T}, alpha::Number, beta::Number, val::V) where {T<:BlasReal, V<:LinearAlgebra.BlasFlag.SyrkHerkGemm}
     #    LinearAlgebra.generic_matmatmul!(C, tA, tB, A, B, alpha, beta)
     #end
-    function LinearAlgebra.generic_matmatmul_wrapper!(C::AbstractGPUMatrix{Complex{T}}, tA::AbstractChar, tB::AbstractChar, A::AbstractGPUVecOrMat{Complex{T}}, B::AbstractGPUVecOrMat{T}, alpha::Number, beta::Number, val::Val{LinearAlgebra.BlasFlag.GEMM}) where T<:Union{Float32, Float64}
+    function LinearAlgebra.generic_matmatmul_wrapper!(C::AbstractGPUMatrix{Complex{T}}, tA::AbstractChar, tB::AbstractChar, A::AbstractGPUVecOrMat{Complex{T}}, B::AbstractGPUVecOrMat{T}, alpha::Number, beta::Number, val::Val{LinearAlgebra.BlasFlag.GEMM}) where {T <: Union{Float32, Float64}}
         LinearAlgebra.generic_matmatmul!(C, tA, tB, A, B, alpha, beta)
     end
-    function LinearAlgebra.generic_matmatmul_wrapper!(C::AbstractGPUMatrix{Complex{T}}, tA::AbstractChar, tB::AbstractChar, A::AbstractGPUVecOrMat{T}, B::AbstractGPUVecOrMat{Complex{T}}, alpha::Number, beta::Number, val::Val{LinearAlgebra.BlasFlag.GEMM}) where T<:Union{Float32, Float64}
+    function LinearAlgebra.generic_matmatmul_wrapper!(C::AbstractGPUMatrix{Complex{T}}, tA::AbstractChar, tB::AbstractChar, A::AbstractGPUVecOrMat{T}, B::AbstractGPUVecOrMat{Complex{T}}, alpha::Number, beta::Number, val::Val{LinearAlgebra.BlasFlag.GEMM}) where {T <: Union{Float32, Float64}}
         LinearAlgebra.generic_matmatmul!(C, tA, tB, A, B, alpha, beta)
     end
     # Julia 1.12 introduced generic_mul! for scalar * array operations
diff --git a/test/testsuite/linalg.jl b/test/testsuite/linalg.jl
index a941214..f9d4e57 100644
--- a/test/testsuite/linalg.jl
+++ b/test/testsuite/linalg.jl
@@ -484,7 +484,7 @@ end
         @test compare(mul!, AT, C, f(A), g(B), Ref(T(4)), Ref(T(5)))
         @test typeof(AT(rand(T, 3, 3)) * AT(rand(T, 3, 3))) <: AbstractMatrix
     end
-    @testset "$(complex(T)), $(complex(T)), $T gemm C := A * B * a + C * b" for T in filter(T-><:(T, Real) && <:(T, AbstractFloat), eltypes)
+    @testset "$(complex(T)), $(complex(T)), $T gemm C := A * B * a + C * b" for T in filter(T -> <:(T, Real) && <:(T, AbstractFloat), eltypes)
         Tc = complex(T)
         A, B, C = rand(Tc, 4, 4), rand(T, 4, 4), rand(Tc, 4, 4)
 

@kshyatt
Copy link
Member Author

kshyatt commented Jan 8, 2026

Specifically the GEMM is necessary. We should refactor all this soon as it is very spaghettified.

Copy link
Member

@maleadt maleadt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hate it. But LGTM, I guess.

@kshyatt
Copy link
Member Author

kshyatt commented Jan 8, 2026

It sucks!!! We should refactor all this once things get unbroken

@kshyatt kshyatt merged commit f516fc2 into master Jan 9, 2026
18 of 19 checks passed
@kshyatt kshyatt deleted the ksh/fix12 branch January 9, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants