First, upper=False/True will decide whether PyTorch will look at the upper or lower “half” (including diagonal) of the matrix. You pass in a lower lower triangular matrix, you want upper=False because otherwise it’ll look like a diagonal matrix to PyTorch.
After this, PyTorch will consider transpose=False/True and transpose it. But if, as in the example you posted, PyTorch gets a diagonal matrix (because the upper half is only the entries in the diagonal), you’ll get the same result whether you transpose or not. If you pass in a matrix that is not diagonal, transpose will make a difference, just as you expect.
While I don’t think that the function arguments and their behaviors are intuitive or well-explained in the documentation, I now understand what is going on underneath the hood thanks to your explanation.
Yeah, I stared down the documentation, implementation, and tests for quite a while before I got it.
I even found a bug or two in the test coverage before noticing that it is the upper not matching the input.
If you have ideas how to improve the documentation, I think it might well be worth it.
It’s a bit tricky with all the options.