Conversation
…ar that Rsvd is the common truncated randomized SVD
…e between Svd and Gesvd
0ec4111 to
a8ee89c
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #744 +/- ##
==========================================
+ Coverage 35.44% 37.07% +1.62%
==========================================
Files 215 214 -1
Lines 33071 33573 +502
Branches 13170 13531 +361
==========================================
+ Hits 11723 12446 +723
+ Misses 19424 19115 -309
- Partials 1924 2012 +88 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 519cbf74b1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
To use Codex here, create a Codex account and connect to github. |
Code Review: PR #744 "Rsvd for Symmetric Tensors"Critical Issues1. GPU shape mismatch in cuQuantum path ( 2. Block/BlockFermionic paths are dead code ( 3. Missing semicolon after cytnx_error_msg(true, "[ERROR][_gesvd_truncate_BlockFermionic_UT] not implemented...", "\n")
cytnx_uint64 keep_dim = keepdim; // ← missing ; above — syntax hazardDepending on macro expansion, this either causes a compile error or silently absorbs the next statement. 4. Helper functions not in unnamed namespaces Important Issues5. No upper-bound check on 6. 7. Definition order issue with overloaded helpers Minor Issues8. Docstring typo ( 9. Dead commented-out duplicate calls in 10. GPU Bug Fix (Confirmed Correct)The reported uninitialized Summary
The two most urgent blockers before merging: GPU shape mismatch in the cuQuantum path (issue #1) and the missing semicolon (issue #3) which may prevent compilation of the BlockFermionic stub.
|
|
pcchen
left a comment
There was a problem hiding this comment.
Critical Issues Status — Follow-up Review
Posted by Claude Code on behalf of @pcchen
Critical Issue #1: GPU shape mismatch in cuQuantum path
NOT RESOLVED
src/linalg/Rsvd.cpp:78–81 — when projection is applied (samplenum < n_singlu), in is correctly projected to [samplenum × original_cols], but U/S/vT are still allocated using n_singlu = min(original_rows, original_cols) rather than the projected dimensions:
n_singlu = max(1, min(Tin.shape()[0], Tin.shape()[1])) // based on ORIGINAL dims
// ... in = Matmul(Q†, in) → in is now [samplenum × original_cols]
S.Init({n_singlu}, ...) // should be {samplenum}
U.Init({in.shape()[0], n_singlu}, ...) // should be {samplenum, samplenum}
vT.Init({n_singlu, in.shape()[1]}, ...) // should be {samplenum, original_cols}Critical Issue #2: Block/BlockFermionic paths dead code
RESOLVED — Rsvd_Block_UT_internal is fully implemented for both Block and BlockFermionic types.
Critical Issue #3: Missing semicolon after cytnx_error_msg
RESOLVED — The cytnx_error_msg(true, ...) stub in Gesvd_truncate.cpp is gone.
Critical Issue #4: Helper functions not in unnamed namespaces
RESOLVED — All files (Gesvd.cpp, Gesvd_truncate.cpp, Svd.cpp, Svd_truncate.cpp, Rsvd.cpp) use namespace { // actual implementations: } for internal helpers.
Bottom line: Issues #2–4 are all resolved. The cuQuantum fix (issue #1) still needs to be re-applied before merging.
…ensor dimensions in the most efficient way; unit tests added
Implementing Rsvd for symmetric tensors
Cleaning up Svd, Gesvd, Rsvd and unifying the implementations