Skip to main content

sync_inputs_if_required

Function sync_inputs_if_required 

Source
pub fn sync_inputs_if_required(
    model: &mut TypedModel,
    node: &TypedNode,
    mapping: &HashMap<OutletId, OutletId>,
    sync_kind: DeviceSyncKind,
) -> TractResult<TVec<OutletId>>
Expand description

Map node inputs through the translation mapping, inserting DeviceSync nodes where needed to move tensors to/from the device.