core.resharding.nvshmem_copy_service.memory.double_buffer_manager#

Double buffer management for NVSHMEM symmetric memory.

Manages send and receive buffers with double-buffering for pipelined communication.

Module Contents#

Classes#

DoubleBufferManager

Manages double-buffered NVSHMEM symmetric buffers for send/receive operations.

API#

class core.resharding.nvshmem_copy_service.memory.double_buffer_manager.DoubleBufferManager(slot_size: int = MAX_SEGMENT_SIZE)#

Manages double-buffered NVSHMEM symmetric buffers for send/receive operations.

Initialization

Initialize buffer manager.

Parameters:

slot_size – Size of each buffer slot in bytes (default: 256MB)

allocate() None#

Allocate NVSHMEM symmetric buffers for double-buffering.

get_send_slot(iteration: int)#

Get send buffer for given iteration.

Parameters:

iteration – Iteration number

Returns:

NVSHMEM tensor for sending

get_recv_slot(iteration: int)#

Get receive buffer for given iteration.

Parameters:

iteration – Iteration number

Returns:

NVSHMEM tensor for receiving

free() None#

Free NVSHMEM symmetric buffers.