Date of (re)verification: 2026-11-02
Library under test: cuDSS 1.0.0 GA (released 2026-10-21), pip wheel nvidia-cudss-cu13 1.0.0.35, DLL cudss64_1.dll (still the latest available wheel as of 2026-11-02)
First discovered: 2026-10-31 / 2026-11-01 (same library version)
Hardware/OS: Windows 11 x64, NVIDIA GeForce RTX 5070 Laptop 8GB (Blackwell); CUDA 13 runtime components from pip wheels
Calling path: Python ctypes → C API (no nvmath-python, which targets the 0.x API and does not match 1.0.0)
Executive summary
Two bugs and one diagnostic gap were found while exercising cuDSS 1.0.0 with multi-RHS sparse solves and dense Schur-complement assembly. Both bugs are silent: cudssExecute returns CUDSS_STATUS_SUCCESS while the solution is wrong. None of them appears in the release notes of any version from 0.1.0 through 1.0.0. All reproducers below use only matrices that can be rebuilt from a few lines of code (recipes given); no proprietary data is involved.
| # | Issue | Affected path | Severity |
|---|---|---|---|
| 1 | Multi-column dense solve writes wrong column stride (non-zero rows = n/nrhs) | cudssMatrixCreateDn with nrhs > 1 |
High — any multi-RHS solve |
| 2 | RHS pointer at the start of a large buffer → wrong solution | solve phase, RHS pointer handling | High |
| 3 | Exact zero diagonal + SPD type declaration → silent NaN garbage, status SUCCESS | SPD path input diagnostics | Medium — silent wrong answer on invalid input |
A fourth issue (SPD-type solves on 7-point Poisson matrices) was investigated and withdrawn: it was caused by our own input error (a symmetric-format MatrixMarket file was passed as a full matrix). See the withdrawn-finding note at the end.
Environment and calling conventions
- Python 3.12,
ctypesbindings with fullargtypes(64-bit ints for dimensions/ld,ctypes.c_void_pfor device pointers). - CUDA 13 wheel bundle:
cudss64_1.dll+x86_64/cublas64_13.dll,cudart64_12.dll,nvrtc64_130_0.dll(load dirs added viaos.add_dll_directory). - CSR input: 3-array form —
cudssMatrixCreateCsr(m, nrows, ncols, nnz, rowStart, NULL, colIndices, values, CUDA_R_32I, CUDA_R_32I, CUDA_R_64F, <mtype>, CUDSS_MVIEW_FULL, CUDSS_INDEX_BASE_ZERO);rowStartis a full nrows+1 offset array,colIndices0-based. - Dense x/b:
cudssMatrixCreateDn(m, nrows, ncols, ld, values, /*memType*/ 1, /*layout*/ CUDSS_LAYOUT_COL_MAJOR),ld = nrows(column-major, no padding). This matches the documented convention; single-RHS solves with these exact conventions are correct to machine precision. - Phase order:
cudssExecute(h, 1 /*reordering*/, ...)→cudssExecute(h, 2 /*symbolic*/, ...)→cudssExecute(h, 4 /*factorization*/, ..., NULL, NULL)→cudssExecute(h, 1008 /*solve*/, ..., x, b). (solve semantics: 5th argument = solution output, 6th = RHS input.) - Config: defaults (matching = AUTO, reordering = NESTED_DISSECTION), except where noted. All solves synchronized with
cuda.synchronize().
Reference solutions are computed with NumPy linalg.solve on the dense reassembly of the same CSR input.
Bug 1 — Multi-column dense solve: wrong column stride
Signature symptom. For an n×m solve with m > 1, exactly n/m rows of the solution matrix are non-zero, and the values are wrong (relative error 1.6). Status: SUCCESS.
Reproducer.
Matrix recipe (rebuildable, ~15 lines of NumPy): standard 7-point 3-D Laplacian (diagonal 6, off-diagonal −1 on the 6 grid neighbors) on a 17×17×17 grid, then remove one corner node (Dirichlet elimination). Result: n = 4912 unknowns, 32650 nnz, SPD, stored in general (full) MatrixMarket format.
RHS: m = 8, the first 8 columns of the identity. One cudssMatrixCreateDn pair with ncols = 8, ld = n = 4912, column-major. Factor once, solve once.
Result (2026-11-02, cuDSS 1.0.0.35):
solve rc = SUCCESS
||Y - K^{-1}B|| / ||K^{-1}B|| = 1.613e+00
nonzero rows = 614 / 4912 (= n / m = 4912 / 8)
The same solve with m = 1 is correct to 5.9e-15. The n/m non-zero-row pattern is the signature of the library interpreting the row stride of the dense matrices as ncols (or writing with the wrong leading dimension) so that successive columns overwrite/stride through the buffer incorrectly.
Impact. Any multi-RHS solve (ncols > 1 on cudssMatrixCreateDn) returns silently wrong results. This is the building block for Schur-complement assembly, batched inverse applications, and adjoint sensitivity solves. The release notes do not mention any fix for dense multi-RHS layouts in any version 0.1.0–1.0.0; the 0.8.0 announcement only advertises a performance improvement for “multiple right-hand sides”.
Bug 2 — RHS pointer at the start of a large buffer → wrong solution
Signature symptom. When the RHS device pointer points to the beginning of a large contiguous buffer, the solve returns SUCCESS but a wrong solution (relative error 5.6). The identical solve with the RHS in its own small allocation is correct to machine precision.
Reproducer. Same matrix and factor as Bug 1. Upload the full 8-column RHS as one 1-D device array of n·m doubles (~300 KB — the bug triggers well below megabyte scale); create a single-column RHS view (nrows = n, ncols = 1, ld = n) whose pointer is the start of that buffer; create a normal single-column solution array. Solve.
Result (2026-11-02):
solve rc = SUCCESS
||x - K^{-1}b|| / ||K^{-1}b|| = 5.612e+00
|x| = 5.710e+00 (reference |K^{-1}e_0| = 9.408e-01)
The bug depends only on the RHS pointer provenance, not on the solution buffer. This suggests the solve path performs a size/stride assumption on the RHS allocation (or an internal 2-D-aware copy) that breaks for large base buffers. For a caller that pre-uploads many columns and then issues per-column solves with column pointers (a natural CUDA-side streaming pattern), this silently corrupts results.
Additional observation — exact zero diagonal + SPD type declaration → silent NaN, status SUCCESS
Signature symptom. Declaring an SPD matrix type for a matrix with an exactly-zero diagonal entry produces NaN/Inf in the solution while cudssExecute returns SUCCESS for factorization and solve. No warning, no error code. (The input is admittedly invalid for SPD — the point is the absence of any diagnostic: a good solver should reject the input, not return SUCCESS with garbage. Declaring the same matrix as SYMMETRIC — a matching declaration — solves it correctly to 4.9e-14.)
Reproducer. n = 100 tridiagonal matrix A[i,i] = 2, A[i,i±1] = −1, with A[50,50] set to exactly 0.0. One random RHS. Declare CUDSS_MTYPE_SPD. Defaults (matching = AUTO).
Result (2026-11-02):
mtype=SPD: rc=SUCCESS residual = nan |x|max = inf
mtype=SYM: rc=SUCCESS residual = 4.9e-14
Related public evidence: on the NVIDIA developer forum (July 2026 thread CUDSS reordering discrepancy), an NVIDIA engineer confirmed that zero diagonal entries combined with symmetric reordering “perturb pivots” and “degrade the accuracy quite badly so that iterative refinement cannot recover it,” and noted that matching would be enabled by default in a future release. v1.0.0 did make matching = AUTO the default, which fixes near-zero diagonal cases, but the exact-zero case above still silently returns garbage. Also relevant: v0.3.0 removed CUDSS_STATUS_ZERO_PIVOT from the public status enum, so no dedicated error channel exists.
Impact. Silent NaN/Inf with a success status means downstream users cannot distinguish garbage from a converged solution without an external residual check. A status code or warning for a failed factorization would convert this from a silent corruption into a recoverable error.
Withdrawn finding — SPD-type solves on 7-point Poisson matrices
During early testing we observed SPD-type solves on 27,000-unknown 7-point Poisson matrices returning residual ~7e-1 while GENERAL returned 2e-16, and suspected a bug in the SPD path. On re-examination for this report we found the cause in our own input pipeline: the test matrices were stored in MatrixMarket symmetric format (lower triangle only), but the reader did not mirror the upper triangle and the matrix was handed to cuDSS as CUDSS_MVIEW_FULL. The SPD path trusts the FULL declaration and reads the missing upper triangle (garbage); the GENERAL path happened to be unaffected. With the symmetry properly expanded (full storage), the SPD solve is correct to 3.7e-16. We withdraw this item and note it here only so that other ctypes users of symmetric-format MatrixMarket files do not repeat our mistake.
Why this report matters
- cuDSS 1.0.0 is the first GA release (2026-10-21) and is being integrated into major simulation stacks (COMSOL 6.4 uses cuDSS as its GPU direct solver; Cadence/Siemens/Synopsys integrations are publicly announced). Silent wrong-answer modes in such a library propagate into engineering decisions.
- We are happy to provide the full reproducer script (single-file Python, ~250 lines,
ctypesonly, no external deps beyond NumPy + numba-cuda) and the recipe-generated test matrices under any license NVIDIA finds convenient.
Suggested fixes / diagnostics to consider
- Bug 1: audit dense solve column stride handling for
ncols > 1withlayout = COL_MAJOR,ld = nrows; add a CI case n×8 with identity RHS asserting machine-precision error. - Bug 2: audit RHS-buffer size/stride assumptions in the solve path; reproduce with a pre-uploaded n·m buffer and a per-column view.
- Observation 3: return an explicit error (e.g., restore a zero-pivot status, or NOT_SUPPORTED) when the factorization fails on symmetric-type paths, instead of returning SUCCESS with NaN/Inf.