Execute one plan with the same preflight and completion contract as a batch. Bindings use transport-group ranks. Buffers must be packed views on the owning process; their storage offsets are retained. Rejection on any participant precedes all target writes. Transport failures after payl
(plan: TransferPlan,
source_buffers: Mapping[int, torch.Tensor],
target_buffers: Mapping[int, torch.Tensor],
endpoints: TransferEndpoints,
dtype: torch.dtype,
budget: StagingBudget = StagingBudget(),
group: Optional[object] = None)
| 258 | |
| 259 | |
| 260 | def execute_transfer(plan: TransferPlan, |
| 261 | source_buffers: Mapping[int, torch.Tensor], |
| 262 | target_buffers: Mapping[int, torch.Tensor], |
| 263 | endpoints: TransferEndpoints, |
| 264 | dtype: torch.dtype, |
| 265 | budget: StagingBudget = StagingBudget(), |
| 266 | group: Optional[object] = None) -> TransferStats: |
| 267 | """Execute one plan with the same preflight and completion contract as a batch. |
| 268 | |
| 269 | Bindings use transport-group ranks. Buffers must be packed views on the owning process; |
| 270 | their storage offsets are retained. Rejection on any participant precedes all target writes. |
| 271 | Transport failures after payload begins may leave partially written targets. |
| 272 | """ |
| 273 | request = TransferRequest('parameter', plan, source_buffers, target_buffers) |
| 274 | return execute_transfers([request], endpoints, dtype, budget, group) |
| 275 | |
| 276 | |
| 277 | def _packed_rounds(indexed_operations: Sequence[Tuple[int, _Operation]], max_elements: int): |