-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Closed
Labels
actionablemodule: docsRelated to our documentation, both in docs/ and docblocksRelated to our documentation, both in docs/ and docblockstriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
📚 The doc issue
The doc of torch.lu() shows its description as below:
Line 2127 in d994027
| pivot (bool, optional): controls whether pivoting is done. Default: ``True`` |
Think that it should be the same as:
pytorch/torch/linalg/__init__.py
Lines 2460 to 2461 in 83e2ea8
| pivot (bool, optional): Whether to compute the LU decomposition with partial pivoting, or the regular LU | |
| decomposition. :attr:`pivot`\ `= False` not supported on CPU. Default: `True`. |
I accept that it should raise error, but need to note on doc.
Both have the same action on repro, especially on CPU aspect:
Repro
import torch
import numpy as np
data = np.random.rand(10, 10)
input_data = torch.from_numpy(data).float()
torch.lu(input_data, pivot=False) # RuntimeError: linalg.lu_factor: LU without pivoting is not implemented on the CPU
torch.linalg.lu_factor(input_data, pivot=False) # RuntimeError: linalg.lu_factor: LU without pivoting is not implemented on the CPUThanks for noting!
Suggest a potential alternative/fix
- Fix the doc of
torch.lu()to meet the usage limitaion.
Metadata
Metadata
Assignees
Labels
actionablemodule: docsRelated to our documentation, both in docs/ and docblocksRelated to our documentation, both in docs/ and docblockstriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module