torch.foreach.mm#
- torch.foreach.mm(inputs: TensorList, mat2: TensorList, /) tuple[Tensor, ...][source]#
Multiplies corresponding matrices from
inputsandmat2usingtorch.mm(). This is semantically equivalent to applyingtorch.mm()independently at every list position. It does not mutate its arguments and returns a tuple of result tensors.On supported CUDA inputs, an accelerated grouped matrix multiplication implementation may be used. Other inputs fall back to per-position execution.
Both tensor-list arguments must be non-empty and have the same length. There is no in-place
torch.foreach.mm_operation.