Skip to content

v0.3.4

Choose a tag to compare

@github-actions github-actions released this 02 Jun 11:14

Bundles two _psd_batch improvements. v0.3.3 was prepared and merged to main (CPU eigh crash fix for #20) but never tagged to PyPI; both changes ship together here.

Fixed

  • _LinAlgError crash in doublet mode at K≈49 on the CPU eigh path (reported by @EduardGhemes-ICR, #20). _psd_batch previously called torch.linalg.eigh raw on the CPU branch; a single non-finite or near-degenerate batch element would crash LAPACK syevd with "error code: 99" and kill multi-hour Xenium runs. The CPU branch now mirrors the GPU branch's NaN guard (extended to ±Inf) and adds a small-diagonal-jitter retry ladder (1e-6 → 1e-4 → ε·I last resort). Happy-path output is bit-identical to v0.3.2 — only previously-crashing inputs are affected. Triggered most often on older arches (Volta / Turing / Ampere / Ada / L40S) where K > 16 falls through to CPU eigh, but the guard is unconditional and applies to CPU-only deployments as well.

Added

  • --eigh-threshold CLI flag and RCTDConfig.eigh_threshold (reported by @meisproject, #22). Manually override the K cutoff for staying on GPU eigh inside _psd_batch. The arch-based default (K≤16 on sm_<9, K≤128 on sm_≥9) was derived from L40S benchmarks at K=45 where CPU OpenBLAS won — but only with OMP_NUM_THREADS capped. Users on Volta (V100, sm_70), Turing, Ampere, or Ada (L20/L40S, sm_89) who hit Step 1 perf cliffs at K∈[17, 64] (e.g. K=38 reported at 3086 s for 6113 pixels) can now force GPU eigh via --eigh-threshold 64 without waiting on a per-arch benchmark / release. Setting --eigh-threshold 0 forces CPU eigh on every arch (diagnostic counter-case). Default None preserves v0.3.2 arch-gated behavior bit-for-bit.

    Caveat: this ships the override mechanism, not a confirmed perf win on V100/L20. The maintainer has no V100 or L20 hardware to bench against; whether GPU eigh actually beats CPU offload at K=38 on those arches is unverified. Recommended diagnostic sequence: try OMP_NUM_THREADS=1 MKL_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1 alone first (often the real fix is the BLAS thread cap, not the dispatch), then layer --eigh-threshold 64 if Step 1 is still slow.