pytc.solver.bug_rpa.streamed_orth_directions¶
- pytc.solver.bug_rpa.streamed_orth_directions(W_host, rel_tol=1e-10, *, block_rows, orth_tol=1e-08, max_passes=2, trace_sink=None)[source]¶
Rank-revealing orthonormal basis of a HOST-resident block.
Returns
(Q_host, kept, diagnostics)withQ_hosta NumPy array, so nothing of heightnovis left on the device.Three passes over the host data, none of which materialises a tall device array:
Rby sequential TSQR (streamed_tsqr_r()).Pivot the small
Rand drop the numerically dependent columns – the same rank decision the in-core path makes, on the same matrix.Emit
Q = W Tpanel by panel, then MEASURE||Q^T Q - I||; if it is not tight, orthogonalise the emittedQonce more (CholeskyQR2).
The gate in step 3 is not decoration. Recovering
Qfrom a triangular factor loses orthogonality whenWis ill-conditioned, and an unorthogonal basis corrupts the projected core silently – the energy stays plausible. Measuring and repeating is the standard remedy.- Parameters:
W_host (Any)
rel_tol (float)
block_rows (int)
orth_tol (float)
max_passes (int)
trace_sink (list | None)