The keyword argument transpose of the triangular_solve function is confusing me. In the document, it says:

transpose (bool, optional) – whether A should be transposed before being sent into the solver.

In the code below, x_1 makes sense to me, but transpose doesn’t seem to be doing anything in x_2.
import torch

u = torch.tensor([
    [2.0, 0.0],
    [4.0, 3.0],
])

x = torch.tensor([
    [2.0],
    [3.0],
])

b = u.T @ x

x_1 = torch.triangular_solve(b, u.T)
print(x_1.solution)

x_2 = torch.triangular_solve(b, u, transpose=True)
print(x_2.solution)

x_3 = torch.triangular_solve(b, u, transpose=False)
print(x_3.solution)

Output:
tensor([[2.],
        [3.]])
tensor([[8.],
        [3.]])
tensor([[8.],
        [3.]])

torch==1.10.0 and numpy==1.21.3