pytorch/docs/source
Pearu Peterson b3e4f5029b Add check-sparse-tensor-invariants flag to Context - 2nd try. (#92094)
This PR is a copy of https://github.com/pytorch/pytorch/pull/90849 that merge was reverted.

The PR adds "check sparse tensor invariants" flag to Context that when enabled will trigger sparse tensor data invariants checks in unsafe methods of constructing sparse COO/CSR/CSC/BSR/BSC tensors. The feature includes the following changes to UI:

`torch.sparse.check_sparse_tensor_invariants` class provides different ways to enable/disable the invariant checking.

`torch.sparse_coo/csr/csc/bsr/bsc/compressed_tensor` functions have a new optional argument `check_invariants` to enable/disable the invariant checks explicitly. When the `check_invariants` argument is specified, the global state of the feature is temporarily overridden.

The PR fixes https://github.com/pytorch/pytorch/issues/90833

Pull Request resolved: https://github.com/pytorch/pytorch/pull/92094
Approved by: https://github.com/cpuhrsch
2023-01-13 14:50:33 +00:00
..
_static Move Dynamo docs back to core (#89769) 2022-11-29 04:38:53 +00:00
_templates
community Update Persons of Interest (#90069) 2022-12-02 23:06:57 +00:00
dynamo Fix typo under docs directory (#91871) 2023-01-10 22:33:36 +00:00
elastic Add watchdog to TorchElastic agent and trainers (#84081) 2022-09-07 00:17:20 +00:00
notes Add device_idx to free_fn in CUDAPluggableAllocator (#91398) 2023-01-12 05:03:48 +00:00
rpc
scripts Doc for Canonical Aten and Prims IR (#90644) 2022-12-13 21:30:47 +00:00
_dynamo.rst Add torch._dynamo to docs (#89510) 2022-11-23 16:33:13 +00:00
amp.rst Remove deprecated torch.matrix_rank (#70981) 2022-09-22 17:40:46 +00:00
autograd.rst Change torch.autograd.graph.disable_saved_tensors_hooks to be public API (#85994) 2022-10-03 16:25:01 +00:00
backends.rst [cuBLAS] Add an option to disable reduced precision reductions for BF16 GEMM (#89172) 2022-12-21 18:58:28 +00:00
benchmark_utils.rst
bottleneck.rst add itt unit test and docstrings (#84848) 2022-09-28 01:39:58 +00:00
checkpoint.rst
complex_numbers.rst
conf.py [ONNX] Document ONNX diagnostics (#88371) 2022-11-16 19:21:46 +00:00
config_mod.rst
cpp_extension.rst
cpp_index.rst
cuda._sanitizer.rst Fix typos under docs directory (#88033) 2022-10-31 19:31:56 +00:00
cuda.rst Add Pluggable CUDA allocator backend (#86786) 2022-11-23 17:54:36 +00:00
cudnn_persistent_rnn.rst
cudnn_rnn_determinism.rst
data.rst [DataLoader] Removing DataLoader2 related code (#88848) 2022-11-11 22:27:01 +00:00
ddp_comm_hooks.rst Fix two small typos in ddp_comm_hooks.rst (#82047) 2022-07-23 19:10:57 +00:00
deploy.rst Delete torch::deploy from pytorch core (#85953) 2022-10-06 07:20:16 +00:00
distributed.algorithms.join.rst
distributed.checkpoint.rst [PT-D][Checkpointing] Move distributed checkpointing from torch.distributed._shard.checkpoint to torch.distributed.checkpoint (#88698) 2022-11-16 21:06:38 +00:00
distributed.elastic.rst
distributed.optim.rst
distributed.rst [Doc][Distributed] Add missing functions to distributed.rst (#89905) 2022-12-04 07:22:54 +00:00
distributed.tensor.parallel.rst Move tensor_parallel out to distributed.tensor folder (#89878) 2022-11-30 22:13:10 +00:00
distributions.rst
dlpack.rst
docutils.conf
fft.rst
fsdp.rst [FSDP()][3/N] Refactor public APIs (#87917) 2022-10-31 16:45:21 +00:00
func.api.rst [functorch] move batch_norm_replacement to torch.func (#91412) 2023-01-12 19:15:41 +00:00
func.batch_norm.rst [functorch] move batch_norm_replacement to torch.func (#91412) 2023-01-12 19:15:41 +00:00
func.rst [torch.func] Add docs (#91319) 2022-12-30 02:51:18 +00:00
func.ux_limitations.rst [torch.func] Add docs (#91319) 2022-12-30 02:51:18 +00:00
func.whirlwind_tour.rst [torch.func] Add docs (#91319) 2022-12-30 02:51:18 +00:00
futures.rst
fx.rst prepare removal of deprecated functionality in torch.testing (#87969) 2022-11-02 14:04:48 +00:00
hub.rst
index.rst [torch.func] Setup torch.func, populate it with all transforms (#91016) 2022-12-20 00:00:52 +00:00
ir.rst Doc for Canonical Aten and Prims IR (#90644) 2022-12-13 21:30:47 +00:00
jit_builtin_functions.rst
jit_language_reference_v2.rst Fix typos in docs (#80602) 2022-08-29 23:32:44 +00:00
jit_language_reference.rst (Re-open) Adds cudaMallocAsync as an alternative backend for the CUDA allocator (#82682) 2022-10-12 03:44:21 +00:00
jit_python_reference.rst
jit_unsupported.rst (Re-open) Adds cudaMallocAsync as an alternative backend for the CUDA allocator (#82682) 2022-10-12 03:44:21 +00:00
jit_utils.rst
jit.rst
library.rst
linalg.rst Add a note on the stability of linalg functions. (#88313) 2022-11-07 22:44:23 +00:00
masked.rst Update masked.rst (#89758) 2022-11-28 17:55:43 +00:00
math-quantizer-equation.png
mobile_optimizer.rst Fix typo under docs directory (#91871) 2023-01-10 22:33:36 +00:00
model_zoo.rst
monitor.rst
multiprocessing.rst
name_inference.rst Softmax added to tensor, torch and docs (#91292) 2022-12-28 15:06:24 +00:00
named_tensor.rst Add torch.unflatten and improve its docs (#81399) 2022-07-29 15:02:42 +00:00
nested.rst Add a NestedTensor Readme (#91472) 2023-01-06 14:44:55 +00:00
nn.functional.rst
nn.init.rst
nn.rst
onnx_diagnostics.rst [ONNX] Document ONNX diagnostics (#88371) 2022-11-16 19:21:46 +00:00
onnx_supported_aten_ops.rst [ONNX] Update ONNX documentation to include unsupported operators (#84496) 2022-09-16 23:48:37 +00:00
onnx.rst [ONNX] Documentation for torch.onnx.find_mismatch (#90728) 2023-01-11 23:58:57 +00:00
optim.rst Update optim.rst (#91195) 2022-12-20 23:22:25 +00:00
package.rst Fix typos in torch.package documentation (#82994) 2022-08-08 20:19:17 +00:00
pipeline.rst
profiler.rst Fix ITT unit-tests if PyTorch is compiled with USE_ITT=OFF (#86199) 2022-10-04 21:57:05 +00:00
quantization-accuracy-debugging.rst Fix typo under docs directory (#87583) 2022-10-24 23:52:44 +00:00
quantization-backend-configuration.rst update quantization doc: add x86 backend as default backend of server inference (#86794) 2022-12-02 02:10:25 +00:00
quantization-support.rst [Quant][docs] Move parts of BackendConfig tutorial (#91999) 2023-01-13 05:59:22 +00:00
quantization.rst update quantization doc: add x86 backend as default backend of server inference (#86794) 2022-12-02 02:10:25 +00:00
random.rst
rpc.rst Fix typo under docs directory and RELEASE.md (#85896) 2022-09-29 21:41:59 +00:00
signal.rst Nuttall window (#90103) 2022-12-16 09:05:53 +00:00
sparse.rst Add check-sparse-tensor-invariants flag to Context - 2nd try. (#92094) 2023-01-13 14:50:33 +00:00
special.rst [primTorch] special: j0, j1, spherical_j0 (#86049) 2022-10-04 18:21:46 +00:00
storage.rst Deprecate TypedStorage, its derived classes, and all of their public methods (#85303) 2022-11-08 18:11:01 +00:00
tensor_attributes.rst Reland "Add torch.utils.device_mode" (#91796) 2023-01-09 20:57:12 +00:00
tensor_view.rst
tensorboard.rst
tensors.rst Rename Tensor._storage to Tensor.untyped_storage and update docs (#91414) 2022-12-28 19:21:34 +00:00
testing.rst document torch.testing.assert_allclose (#89526) 2022-12-01 11:22:50 +00:00
torch.ao.ns._numeric_suite_fx.rst
torch.ao.ns._numeric_suite.rst
torch.overrides.rst
torch.rst Add check-sparse-tensor-invariants flag to Context - 2nd try. (#92094) 2023-01-13 14:50:33 +00:00
type_info.rst