pytc.test.test_kernel_process_ovvv_block¶
Numerical regression test for kernel_process_ovvv_block.
The production kernel has been rewritten three times in response to
XLA failures on pCV5Z-class (≈30 GB f64 ovvv_blk) inputs:
v1 (textbook) — paired
'kdac'/'kcad'einsums. XLA fused the axis-1↔3 transpose into downstream HLOs and the autotuner aborted withNOT_FOUND: No valid config found!onf64[1179, 3070116].v2 (commit
eeb39b2) — precomputeovvv_swapandovvv_t1sym = 2*ovvv_blk - ovvv_swapinside@jax.jit. XLA re-fused the transpose into a different downstream GEMM (tmp_a/tmp_bagainsttau) and blew the BFC allocator on a 27 GB scratch tensor (f64[21, 146196, 1179]).v3 (current) — barrier-wrap
ovvv_swapto prevent re-fusion, drop theovvv_t1symintermediate (save 30 GB), and pre-transposetau_swapso thetmp_a/tmp_bcontractions don’t require a reshape-after-transpose ofovvv_blk.
This test pins numerical equivalence against the textbook form so every future rewrite (including further XLA-workaround tweaks) cannot silently drift from the CCSD amplitude update’s defined output.
Classes
Functions
Textbook implementation with paired 'kdac'/'kcad' einsums. |