

Check names: None


Propagate names: result names are "(tensor.names[-2],
  other.names[-1])".





x = torch.randn(3, 3, names=('N', 'D'))
y = torch.randn(3, 3, names=('in', 'out'))
x.mm(y).names
   ('N', 'out')



Inherently, a matrix multiplication performs a dot product over two
dimensions, collapsing them. When two tensors are matrix-multiplied,
the contracted dimensions disappear and do not show up in the output
tensor.
"torch.mv()", "torch.dot()" work in a similar way: name inference does
not check input names and removes the dimensions that are involved in
the dot product:



x = torch.randn(3, 3, names=('N', 'D'))
y = torch.randn(3, names=('something',))
x.mv(y).names
   ('N',)



Now, let's take a look at "torch.matmul(tensor, other)". Assume that
"tensor.dim() >= 2" and "other.dim() >= 2".

Check names: Check that the batch dimensions of the inputs are
  aligned and broadcastable. See Unifies names from inputs for what it
  means for the inputs to be aligned.
