Skip to content

Conversation

@kshyatt
Copy link
Member

@kshyatt kshyatt commented Oct 5, 2025

Currently this will trigger a scalar indexing error because it eventually hits __muldiag in LinearAlgebra.jl.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2025

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 2282528..055a6ac 100644
--- a/src/host/linalg.jl
+++ b/src/host/linalg.jl
@@ -244,9 +244,11 @@ function Base.:\(D::Diagonal{<:Any, <:AbstractGPUArray}, B::AbstractGPUVecOrMat)
     end
 end
 
-function LinearAlgebra.mul!(C::Diagonal{<:Any, <:AbstractGPUArray},
-                            A::Diagonal{<:Any, <:AbstractGPUArray},
-                            B::Diagonal{<:Any, <:AbstractGPUArray})
+function LinearAlgebra.mul!(
+        C::Diagonal{<:Any, <:AbstractGPUArray},
+        A::Diagonal{<:Any, <:AbstractGPUArray},
+        B::Diagonal{<:Any, <:AbstractGPUArray}
+    )
     dc = C.diag
     da = A.diag
     db = B.diag
diff --git a/test/testsuite/linalg.jl b/test/testsuite/linalg.jl
index 5770c85..9bfca0b 100644
--- a/test/testsuite/linalg.jl
+++ b/test/testsuite/linalg.jl
@@ -249,7 +249,7 @@
                 B = Diagonal(b)
                 A = Diagonal(a)
                 mul!(C, A, B)
-                @test collect(C.diag) ≈ collect(A.diag) .* collect(B.diag) 
+                @test collect(C.diag) ≈ collect(A.diag) .* collect(B.diag)
             end
         end
 

@maleadt maleadt merged commit 87e91dd into master Oct 6, 2025
16 checks passed
@maleadt maleadt deleted the ksh/triple_diag branch October 6, 2025 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants