pytc.solver.jax_xtc_ccsd._should_force_host_accumulators

pytc.solver.jax_xtc_ccsd._should_force_host_accumulators(eris, n_devices_local)[source]

Whether the OVVV/VOVV pipelines must use host-side accumulators.

GPU-resident accumulators are only viable when all three of the following hold:

  • exactly one local device (the round-robin pipeline accumulates per-tile outputs into a single buffer; multiple devices require a host-side buffer guarded by a lock);

  • eris.ovvv is an in-RAM np.ndarray (the HDF5-streamed path always accumulates on host inside consume_ovvv);

  • eris.vovv is an in-RAM np.ndarray (same reason for the VOVV pipeline below).

This helper is the single source of truth for that decision so the inline override in _update_amps() and the regression tests in pytc/solver/test/test_jax_xtc_ccsd.py stay in sync.