pytc.solver.xtc_ccsd._run_tiled_block_pipeline¶
- pytc.solver.xtc_ccsd._run_tiled_block_pipeline(blocks, nvir, panel_blk, nocc, xtc_obj, jastrow_params, devices, writer=None)[source]¶
Run a single multi-GPU tiled pipeline over one or more ERI blocks.
All
blocksare interleaved in one_round_robin_pipelinecall so GPUs stay continuously occupied across block boundaries.- Parameters:
blocks (list[_TiledBlockSpec]) – Blocks to compute, in the order their tiles should be scheduled.
nvir (int) – Virtual dimension size, tile size, and occupied dimension size.
panel_blk (int) – Virtual dimension size, tile size, and occupied dimension size.
nocc (int) – Virtual dimension size, tile size, and occupied dimension size.
xtc_obj (XTC object and parameters) – Passed through to
compute_2b_tile.jastrow_params (XTC object and parameters) – Passed through to
compute_2b_tile.devices (sequence) – Local devices for round-robin dispatch.
writer (_AsyncHDF5Writer, optional) –
When provided, tile writes are submitted to this background writer instead of running on the pipeline consumer thread under a local lock. This is the desired mode for HDF5-backed
write_fn(e.g. ovvv/vovv in_compute_large_blocks) because:a single writer thread inherently serialises HDF5 access (the library is not thread-safe), replacing the previous
acc_lockwithout adding contention;the consume thread returns to the
host_sempool in microseconds, so the dispatch thread never stalls on slot availability, keeping all GPUs continuously fed even when the backing store is slow.
When
writerisNone(the default — used by the in-memory medium-blocks path) writes run inline under a per-pipeline lock; for NumPy target arrays this is fast and avoids spawning an unnecessary background thread.