torch.foreach.addcdiv_#
- torch.foreach.addcdiv_(inputs: TensorList, tensor1: TensorList, tensor2: TensorList, /, *, value: ScalarList) tuple[Tensor, ...] | list[Tensor][source]#
- torch.foreach.addcdiv_(inputs: TensorList, tensor1: TensorList, tensor2: TensorList, /, *, value: Tensor) tuple[Tensor, ...] | list[Tensor]
- torch.foreach.addcdiv_(inputs: TensorList, tensor1: TensorList, tensor2: TensorList, /, *, value: Scalar = 1) tuple[Tensor, ...] | list[Tensor]
Applies
torch.addcdiv()to corresponding tensors from the three input lists.This is semantically equivalent to applying
torch.addcdiv()independently at every list position. Mutates every tensor ininputsand returns the exact input container object.Tensor-list arguments must be non-empty. Corresponding tensor or scalar lists must have the same length. An accelerated multi-tensor implementation is used only when supported by the inputs; otherwise the operation falls back to per-tensor execution.
valuemay be one shared scalar, a scalar list or tuple, or a packed 1-D CPU tensor containing one scalar per list position.