pytorch/docs/source
lezcano 0706607abc Add linalg.solve_triangular (#63568)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/63568

This PR adds the first solver with structure to `linalg`. This solver
has an API compatible with that of `linalg.solve` preparing these for a
possible future merge of the APIs. The new API:
- Just returns the solution, rather than the solution and a copy of `A`
- Removes the confusing `transpose` argument and replaces it by a
correct handling of conj and strides within the call
- Adds a `left=True` kwarg. This can be achieved via transposes of the
inputs and the result, but it's exposed for convenience.

This PR also implements a dataflow that minimises the number of copies
needed before calling LAPACK / MAGMA / cuBLAS and takes advantage of the
conjugate and neg bits.

This algorithm is implemented for `solve_triangular` (which, for this, is
the most complex of all the solvers due to the `upper` parameters).
Once more solvers are added, we will factor out this calling algorithm,
so that all of them can take advantage of it.

Given the complexity of this algorithm, we implement some thorough
testing. We also added tests for all the backends, which was not done
before.

We also add forward AD support for `linalg.solve_triangular` and improve the
docs of `linalg.solve_triangular`. We also fix a few issues with those of
`torch.triangular_solve`.

Resolves https://github.com/pytorch/pytorch/issues/54258
Resolves https://github.com/pytorch/pytorch/issues/56327
Resolves https://github.com/pytorch/pytorch/issues/45734

cc jianyuh nikitaved pearu mruberry walterddr IvanYashchuk xwang233 Lezcano

Test Plan: Imported from OSS

Reviewed By: zou3519, JacobSzwejbka

Differential Revision: D32283178

Pulled By: mruberry

fbshipit-source-id: deb672e6e52f58b76536ab4158073927a35e43a8
2021-11-18 09:45:51 -08:00
..
_static clarify the documentation of torch.meshgrid (#62977) 2021-08-18 04:01:22 -07:00
_templates Remove master documentation from being indexable by search engines (#58056) 2021-05-18 06:20:09 -07:00
community Update contribution_guide.rst (#64142) 2021-08-30 19:26:59 -07:00
elastic (torchelastic) make --max_restarts explicit in the quickstart and runner docs (#65838) 2021-09-29 19:29:01 -07:00
notes Add an option to disable reduced precision reductions for FP16 GEMM (#67946) 2021-11-09 17:27:20 -08:00
rpc Support Union in TorchScript (#64234) 2021-09-03 06:12:24 -07:00
scripts [docs] Add images to some activation functions (#65415) 2021-09-22 11:05:29 -07:00
__config__.rst
amp.rst rebase for autocast updates to include device_type and dtype flags (#61002) 2021-08-10 20:03:12 -07:00
autograd.rst Update extending doc to cover forward mode AD (#66962) 2021-10-27 14:18:38 -07:00
backends.rst Add an option to disable reduced precision reductions for FP16 GEMM (#67946) 2021-11-09 17:27:20 -08:00
benchmark_utils.rst
bottleneck.rst
checkpoint.rst
complex_numbers.rst Grammatical update of tech docs (#61547) 2021-07-14 14:01:59 -07:00
conf.py [Quant] Add dynamic QAT Linear module (#67325) 2021-11-08 10:24:25 -08:00
cpp_extension.rst
cpp_index.rst
cuda.rst [CUDA graphs] Beta, not prototype (#65247) 2021-09-20 13:32:36 -07:00
cudnn_persistent_rnn.rst Remove orphan from cuDNN persistent note (#65160) 2021-09-21 11:09:47 -07:00
cudnn_rnn_determinism.rst
data.rst Add a warning about DataLoader num_workers > 0 "memory leak" (#64337) 2021-09-01 21:49:41 -07:00
ddp_comm_hooks.rst [DDP Comm Hook] Add debugging communication hooks to ddp_comm_hooks.rst (#64352) 2021-09-01 17:37:19 -07:00
distributed.algorithms.join.rst Add tutorial link (#62785) 2021-08-05 17:28:02 -07:00
distributed.elastic.rst [1/n][torch/elastic] Move torchelastic docs *.rst (#148) 2021-05-04 00:57:56 -07:00
distributed.optim.rst [distributed][docs] Delete distributed optimimzer section from RPC and add reference to namespace docs page (#68068) 2021-11-09 15:01:54 -08:00
distributed.rst Update distributed.rst to show that CUDA send/recv on GPU is supported (#65601) 2021-09-24 12:30:10 -07:00
distributions.rst
dlpack.rst
docutils.conf
fft.rst C++ API and docs for hfftn (#66127) 2021-10-07 12:48:36 -07:00
futures.rst Update docs to mention CUDA support for Future (#50048) 2021-05-11 08:26:33 -07:00
fx.rst fx: Update fx.rst (#68043) 2021-11-09 14:00:45 -08:00
hub.rst
index.rst Make _Join, _Joinable, _JoinHook public (#62605) 2021-08-03 12:20:11 -07:00
jit_builtin_functions.rst
jit_language_reference_v2.rst Document torch.jit.is_tracing() (#67326) 2021-10-28 09:56:09 -07:00
jit_language_reference.rst docs: Added Union to supported types in documentation (#68435) 2021-11-17 10:26:31 -08:00
jit_python_reference.rst [JIT] improve documentation (#57991) 2021-05-19 11:47:32 -07:00
jit_unsupported.rst
jit.rst Back out "D30740897 Add fusion enabled apis" (#64500) 2021-09-04 20:55:58 -07:00
linalg.rst Add linalg.solve_triangular (#63568) 2021-11-18 09:45:51 -08:00
math-quantizer-equation.png
mobile_optimizer.rst
model_zoo.rst
multiprocessing.rst
name_inference.rst Abladawood patch 1 (#58496) 2021-05-20 10:32:18 -07:00
named_tensor.rst
nn.functional.rst Add mish activation function (#58648) 2021-05-25 10:36:21 -07:00
nn.init.rst
nn.rst Implements the orthogonal parametrization (#62089) 2021-08-30 13:12:07 -07:00
onnx.rst [Doc] [ONNX]Fix a broken url for ONNXRuntime custom op (#67944) 2021-11-08 15:51:02 -08:00
optim.rst To add SequentialLR to PyTorch Core Schedulers (#64037) 2021-09-09 09:36:32 -07:00
package.rst [package] add some docs describing how to debug dependencies (#65704) 2021-09-27 12:14:23 -07:00
pipeline.rst fixed comments referring fairscale master branch (#65531) 2021-09-23 14:37:58 -07:00
profiler.rst
quantization-support.rst [Quant] Add dynamic QAT Linear module (#67325) 2021-11-08 10:24:25 -08:00
quantization.rst pytorch quantization: document the custom module APIs (#67449) 2021-10-29 05:22:17 -07:00
random.rst
rpc.rst [distributed][docs] Delete distributed optimimzer section from RPC and add reference to namespace docs page (#68068) 2021-11-09 15:01:54 -08:00
sparse.rst Sparse CSR: add convert_indices_from_csr_to_coo (#66774) 2021-11-17 22:28:30 -08:00
special.rst [special] special alias for softmax (#62251) 2021-10-01 03:55:32 -07:00
storage.rst
tensor_attributes.rst
tensor_view.rst Add tensor.{adjoint(),H,mT,mH} methods and properties (#64179) 2021-10-13 07:44:43 -07:00
tensorboard.rst
tensors.rst [numpy] Alias arctan2 to atan2 (#67010) 2021-11-16 09:41:09 -08:00
testing.rst [Doc] make_tensor to torch.testing module (#63925) 2021-08-30 12:25:40 -07:00
torch.ao.ns._numeric_suite_fx.rst Quantization docs: add pages for Numeric Suite (Eager and FX) (#66380) 2021-10-11 18:47:58 -07:00
torch.ao.ns._numeric_suite.rst Quantization docs: add pages for Numeric Suite (Eager and FX) (#66380) 2021-10-11 18:47:58 -07:00
torch.overrides.rst
torch.rst Add histogramdd to torch.rst (#68273) 2021-11-16 11:55:40 -08:00
type_info.rst clarify that torch.finfo.tiny is the smallest normal number (#63241) 2021-08-18 13:44:52 -07:00