Closed
Description
📚 Documentation
The documentation for torch.lu
says:
If
pivot
is False, then the returnedpivots
is a tensor filled with zeros of the appropriate size.
However, this is not true on master:
In [1]: import torch
In [2]: A = torch.randn(2, 3, 3, device='cuda')
In [3]: torch.lu(A, pivot=False)
Out[3]:
(tensor([[[ 0.9318, -0.0476, -0.1439],
[ 1.2574, -1.2355, 0.7600],
[-0.4736, 0.8851, -0.1897]],
[[-1.3215, 0.7562, -0.1317],
[ 0.3256, 1.2982, -0.2063],
[ 0.9390, 0.3026, 1.0317]]], device='cuda:0'),
tensor([[1, 2, 3],
[1, 2, 3]], device='cuda:0', dtype=torch.int32))
The returned pivots
tensor is filled with arange(1, min(m, n)+1)
.
cc @brianjo @mruberry @jianyuh @nikitaved @pearu @heitorschueroff @walterddr @IvanYashchuk @xwang233