Skip to content

Conversation

@mtfishman
Copy link
Contributor

Fix tr in Julia 1.12, see #632.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 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 8f87186..5ffd032 100644
--- a/src/host/linalg.jl
+++ b/src/host/linalg.jl
@@ -62,7 +62,7 @@ end
 
 function LinearAlgebra.tr(A::AnyGPUMatrix)
     LinearAlgebra.checksquare(A)
-    sum(diag(A))
+    return sum(diag(A))
 end
 
 ## copy upper triangle to lower and vice versa

@maleadt maleadt merged commit a902e9b into JuliaGPU:master Oct 10, 2025
19 checks passed
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.

2 participants