unilab.ipc.replay_pipelines¶
Replay pipeline abstraction.
- class unilab.ipc.replay_pipelines.ReplayPipeline[source]¶
Bases:
Protocol- __init__(*args, **kwargs)¶
- class unilab.ipc.replay_pipelines.ReplayTickMetadata[source]¶
Bases:
objectReplayTickMetadata(tick_id: ‘int’, snapshot_ptr: ‘int’, snapshot_size: ‘int’, sample_seed: ‘int’, sample_count: ‘int’, batch_host_slot: ‘int | None’ = None, batch_gpu_slot: ‘int | None’ = None)
- Parameters:
- class unilab.ipc.replay_pipelines.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:
- __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.
Modules
Base types for replay pipeline abstraction. |
|
Double-buffer replay pipeline for packed CPU replay samples. |
|
Optional native H2D submit helper with graceful fallback. |
|
Device transfer backends for replay pipelines. |