v0.3.4
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
_LinAlgErrorcrash in doublet mode at K≈49 on the CPU eigh path (reported by @EduardGhemes-ICR, #20)._psd_batchpreviously calledtorch.linalg.eighraw on the CPU branch; a single non-finite or near-degenerate batch element would crash LAPACKsyevdwith "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-thresholdCLI flag andRCTDConfig.eigh_threshold(reported by @meisproject, #22). Manually override the K cutoff for staying on GPU eigh inside_psd_batch. The arch-based default (K≤16on sm_<9,K≤128on sm_≥9) was derived from L40S benchmarks at K=45 where CPU OpenBLAS won — but only withOMP_NUM_THREADScapped. 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 64without waiting on a per-arch benchmark / release. Setting--eigh-threshold 0forces CPU eigh on every arch (diagnostic counter-case). DefaultNonepreserves 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=1alone first (often the real fix is the BLAS thread cap, not the dispatch), then layer--eigh-threshold 64if Step 1 is still slow.