Skip to content

Support log for Hermitian CuMatrix#2993

Merged
kshyatt merged 3 commits into
masterfrom
ksh/log
Dec 10, 2025
Merged

Support log for Hermitian CuMatrix#2993
kshyatt merged 3 commits into
masterfrom
ksh/log

Conversation

@kshyatt

@kshyatt kshyatt commented Dec 10, 2025

Copy link
Copy Markdown
Member

Based off the latest LinearAlgebra.jl, which we can use for nightly, but not older versions of Julia

@kshyatt kshyatt added cuda array Stuff about CuArray. cuda libraries Stuff about CUDA library wrappers. labels Dec 10, 2025
@github-actions

github-actions Bot commented Dec 10, 2025

Copy link
Copy Markdown
Contributor

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/lib/cusolver/linalg.jl b/lib/cusolver/linalg.jl
index 074094dab..97ef0a25e 100644
--- a/lib/cusolver/linalg.jl
+++ b/lib/cusolver/linalg.jl
@@ -167,7 +167,7 @@ end
 
 for wrap_T in (:Hermitian, :Symmetric)
     @eval begin
-        function Base.log(A::$wrap_T{T, <:StridedCuMatrix}) where {T<:BlasReal}
+        function Base.log(A::$wrap_T{T, <:StridedCuMatrix}) where {T <: BlasReal}
             F = eigen(A)
             if all(λ -> λ ≥ 0, F.values)
                 retmat = (F.vectors * Diagonal(log.(F.values))) * F.vectors'
@@ -178,7 +178,7 @@ for wrap_T in (:Hermitian, :Symmetric)
         end
     end
 end
-function Base.log(A::Hermitian{T, <:StridedCuMatrix{T}}) where {T<:Complex}
+function Base.log(A::Hermitian{T, <:StridedCuMatrix{T}}) where {T <: Complex}
     F = eigen(A)
     if all(λ -> λ ≥ 0, F.values)
         retmat = (F.vectors * Diagonal(log.(F.values))) * F.vectors'

@kshyatt kshyatt enabled auto-merge (squash) December 10, 2025 14:01
@kshyatt kshyatt merged commit 58d68f7 into master Dec 10, 2025
3 checks passed
@kshyatt kshyatt deleted the ksh/log branch December 10, 2025 14:39
@codecov

codecov Bot commented Dec 10, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.21%. Comparing base (aa91919) to head (fabab5e).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
lib/cusolver/linalg.jl 83.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2993      +/-   ##
==========================================
- Coverage   89.23%   89.21%   -0.02%     
==========================================
  Files         148      148              
  Lines       12935    12947      +12     
==========================================
+ Hits        11542    11551       +9     
- Misses       1393     1396       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

AntonOresten pushed a commit to MurrellGroup/CUDA.jl that referenced this pull request Dec 13, 2025
* Support log for Hermitian CuMatrix

* Fix collection to host

* Fix ambiguities
michel2323 pushed a commit to michel2323/CUDA.jl that referenced this pull request Dec 23, 2025
* Support log for Hermitian CuMatrix

* Fix collection to host

* Fix ambiguities
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda array Stuff about CuArray. cuda libraries Stuff about CUDA library wrappers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant