Skip to content

Conversation

@kshyatt
Copy link
Member

@kshyatt kshyatt commented Oct 6, 2025

This one also dispatches to a forbidden scalar optional in LinearAlgebra

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 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 9fad7bb..4281ebf 100644
--- a/src/host/linalg.jl
+++ b/src/host/linalg.jl
@@ -258,12 +258,14 @@ function LinearAlgebra.mul!(C::Diagonal{<:Any, <:AbstractGPUArray},
     return C
 end
 
-function LinearAlgebra.mul!(C::Diagonal{<:Any, <:AbstractGPUArray},
-                            A::AbstractGPUArray,
-                            B::AbstractGPUArray)
+function LinearAlgebra.mul!(
+        C::Diagonal{<:Any, <:AbstractGPUArray},
+        A::AbstractGPUArray,
+        B::AbstractGPUArray
+    )
     dc = C.diag
-    d  = length(dc)
-    m, n   = size(A, 1), size(A, 2)
+    d = length(dc)
+    m, n = size(A, 1), size(A, 2)
     m′, n′ = size(B, 1), size(B, 2)
     m == d  || throw(DimensionMismatch("left hand side has $m rows but output is $d by $d"))
     n′ == d || throw(DimensionMismatch("right hand side has $n′ cols but output is $d by $d"))
diff --git a/test/testsuite/linalg.jl b/test/testsuite/linalg.jl
index bdcc6cd..de36aae 100644
--- a/test/testsuite/linalg.jl
+++ b/test/testsuite/linalg.jl
@@ -254,7 +254,7 @@
                 b = AT(diagm(rand(elty, n)))
                 C = Diagonal(d)
                 mul!(C, a, b)
-                @test collect(C) ≈ Diagonal(collect(a) * collect(b)) 
+                @test collect(C) ≈ Diagonal(collect(a) * collect(b))
             end
         end
 

@maleadt
Copy link
Member

maleadt commented Oct 7, 2025

CI failures related.

@kshyatt
Copy link
Member Author

kshyatt commented Oct 7, 2025

The risks of sleepy eepy coding...

@kshyatt kshyatt enabled auto-merge (squash) October 7, 2025 09:38
@kshyatt kshyatt merged commit 7f11083 into master Oct 7, 2025
19 checks passed
@kshyatt kshyatt deleted the ksh/diag_out branch October 7, 2025 10:00
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