unilab.ipc.replay_pipelines.cpu_pinned_double_buffer.CPUPinnedDoubleBufferReplayPipeline¶
- class unilab.ipc.replay_pipelines.cpu_pinned_double_buffer.CPUPinnedDoubleBufferReplayPipeline[source]¶
Bases:
objectDouble-buffered packed replay batch pipeline.
CUDA keeps the pinned-host → GPU fast path. MPS/CPU keep the same collector-thread pack and hot/cold batch contract with a portable torch copy into the learner device slot.
- Parameters:
Methods
__init__(replay_buffer, *, device, sample_count)batch_ready(tick_id, sample_count)close()sample_large_batch(tick_id, sample_count)start_prepare(tick_id, sample_count[, ...])Start CPU pack + device transfer for the current cold slot.
wait_until_ready(tick_id, sample_count)Attributes
- __init__(replay_buffer, *, device, sample_count, base_seed=0, trace_recorder=None, trace_cuda_events=True, verbose=False, verbose_output_dir=None, collector_pack_request_queue=None, collector_pack_ready_queue=None, collector_pack_shared_slots=None)[source]¶
- start_prepare(tick_id, sample_count, min_snapshot_ptr=None)[source]¶
Start CPU pack + device transfer for the current cold slot.
Returns True when this call launches new work. If the same tick is already pending or prepared, returns False.