pytorch/docs/source/linalg.rst
Ivan Yashchuk 8be205ae13 Added linalg.solve (#48456)
Summary:
This PR adds `torch.linalg.solve`.

`linalg_solve_out` uses in-place operations on the provided result tensor.

I modified `apply_solve` to accept tensor of Int instead of std::vector, that way we can write a function similar to `linalg_solve_out` but removing the error checks and device memory synchronization.

In comparison to `torch.solve` this routine accepts 1-dimensional tensors and batches of 1-dim tensors for the right-hand-side term. `torch.solve` requires it to be at least 2-dimensional.

Ref. https://github.com/pytorch/pytorch/issues/42666

Pull Request resolved: https://github.com/pytorch/pytorch/pull/48456

Reviewed By: izdeby

Differential Revision: D25562222

Pulled By: mruberry

fbshipit-source-id: a9355c029e2442c2e448b6309511919631f9e43b
2020-12-21 10:11:12 -08:00

25 lines
447 B
ReStructuredText

.. role:: hidden
:class: hidden-section
torch.linalg
============
Common linear algebra operations.
.. automodule:: torch.linalg
.. currentmodule:: torch.linalg
Functions
---------
.. autofunction:: cholesky
.. autofunction:: cond
.. autofunction:: det
.. autofunction:: eigh
.. autofunction:: eigvalsh
.. autofunction:: matrix_rank
.. autofunction:: norm
.. autofunction:: solve
.. autofunction:: tensorinv
.. autofunction:: tensorsolve