You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It could help to determine whether a symmetric or Hermitian sparse matrix wrapped in Symmetric or Hermitian contains both triangles or not ('F' = full).
With sparse matrices on GPUs, both triangles are always needed for the routines provided by NVIDIA / AMD / Intel, and this check could be useful.
The text was updated successfully, but these errors were encountered:
amontoison
changed the title
Allow uplo=:F for Symmetric and Hermitian wrappers?
Allow uplo='F' for Symmetric and Hermitian wrappers?
Aug 13, 2024
I imagine one challenge with this implementation is that a lot of code has been written assuming that there are only two possibilities, and these would need to be updated to account for a third. Otherwise, I do see the merit in this.
I worry about keeping the object valid under the :F mode. Sure, we could check it when it is wrapped, but if the parent is mutated asymmetrically then the object becomes invalid.
julia> x = [12; 23]
2×2 Matrix{Int64}:
1 2
2 3
julia> y =Hermitian(x, :U) # suppose we used :F here instead
2×2 Hermitian{Int64, Matrix{Int64}}:
1 2
2 3
julia> x[2] =3; parent(y) # y would be silently invalidated if mode :F
2×2 Matrix{Int64}:
1 2
3 3
I think you'd get the same benefit from passing the matrix (with or without a wrapper) with a checkherm=false keyword to skip a ishermitian validation within the target function. That shifts responsibility for the validity of the object from the wrapper (who cannot hope to ensure its integrity short of the performance nonstarter of checking itself at every use) to the caller.
It could help to determine whether a symmetric or Hermitian sparse matrix wrapped in
Symmetric
orHermitian
contains both triangles or not ('F' = full).With sparse matrices on GPUs, both triangles are always needed for the routines provided by NVIDIA / AMD / Intel, and this check could be useful.
The text was updated successfully, but these errors were encountered: