pytorch/docs/source
Vasiliy Kuznetsov eee7dad376 Add torch.do_assert, which is symbolically traceable (#45188)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/45188

This is a symbolically traceable alternative to Python's `assert`.
It should be useful to allow people who want to use FX to also
be able to assert things.

A bunch of TODO(before) land are inline - would love thoughts
on where is the best place for this code to live, and what this
function should be called (since `assert` is reserved).

Test Plan:
```
python test/test_fx.py TestFX.test_symbolic_trace_assert
```

Imported from OSS

Reviewed By: jamesr66a

Differential Revision: D23861567

fbshipit-source-id: d9d6b9556140faccc0290eba1fabea401d7850de
2020-09-25 13:46:28 -07:00
..
_static Add a CONTRIBUTING.md for the distributed package. (#44224) 2020-09-10 14:58:00 -07:00
_templates Revert "Revert D21337640: [pytorch][PR] Split up documentation into subpages and clean up some warnings" (#37778) 2020-05-04 14:32:35 -07:00
_templates-stable Add layout.html to template for stable docs (#33770) 2020-03-04 03:14:52 -08:00
community Update persons_of_interest.rst (#44031) 2020-09-02 10:56:27 -07:00
notes Reference amp tutorial (recipe) from core amp docs (#44725) 2020-09-16 11:37:58 -07:00
rpc Revert "Revert D21337640: [pytorch][PR] Split up documentation into subpages and clean up some warnings" (#37778) 2020-05-04 14:32:35 -07:00
scripts Optimize SiLU (Swish) op in PyTorch (#42976) 2020-08-16 13:21:57 -07:00
__config__.rst Allow a non-OpenMP based build (#19749) 2019-05-06 19:34:48 -07:00
amp.rst Reference amp tutorial (recipe) from core amp docs (#44725) 2020-09-16 11:37:58 -07:00
autograd.rst Update docs feature classifications (#39966) 2020-06-24 15:35:59 -07:00
backends.rst Mention TF32 on related docs (#44690) 2020-09-16 19:18:30 -07:00
bottleneck.rst
checkpoint.rst
complex_numbers.rst Doc note for complex (#41252) 2020-07-16 08:53:27 -07:00
conf.py Fix doc builds for bool kwargs (#44686) 2020-09-15 10:34:58 -07:00
cpp_extension.rst correct some cpp extension code usages and documents (#39766) 2020-06-10 08:31:22 -07:00
cpp_index.rst Add C++ Landing Page (#38450) 2020-05-14 16:02:01 -07:00
cuda.rst Fix most documentation warnings (#27782) 2019-10-13 10:34:01 -07:00
cudnn_persistent_rnn.rst Revert "Revert D21337640: [pytorch][PR] Split up documentation into subpages and clean up some warnings" (#37778) 2020-05-04 14:32:35 -07:00
cudnn_rnn_determinism.rst [doc] Add LSTM non-deterministic workaround (#40893) 2020-07-21 16:20:02 -07:00
data.rst Reset DataLoader workers instead of creating new ones (#35795) 2020-09-01 11:48:00 -07:00
distributed.rst broadcast_object API for c10d (#43887) 2020-09-01 18:54:17 -07:00
distributions.rst Revert "Revert D21337640: [pytorch][PR] Split up documentation into subpages and clean up some warnings" (#37778) 2020-05-04 14:32:35 -07:00
dlpack.rst
docutils.conf Revert "Revert D21337640: [pytorch][PR] Split up documentation into subpages and clean up some warnings" (#37778) 2020-05-04 14:32:35 -07:00
fft.rst Deprecate old fft functions (#44876) 2020-09-24 02:39:44 -07:00
futures.rst [JIT x RPC] Consolidate Future type class and Future impl class (#40406) 2020-06-24 01:44:49 -07:00
hub.rst Add a torch.hub.load_local() function that can load models from any local directory with a hubconf.py (#44204) 2020-09-21 14:17:21 -07:00
index.rst Mention TF32 on related docs (#44690) 2020-09-16 19:18:30 -07:00
jit_builtin_functions.rst Fix builtin function reference (#24056) 2019-08-09 15:58:15 -07:00
jit_language_reference.rst Error printing extension support for multiline errors (#43807) 2020-09-01 10:02:43 -07:00
jit_python_reference.rst [JIT] Add support for with statements (#34705) 2020-06-18 16:57:18 -07:00
jit_unsupported.rst [JIT] Make torch.unique_consecutive compatible (#39339) 2020-06-02 14:54:29 -07:00
jit.rst Grammatical corrections (#43473) 2020-08-25 12:09:14 -07:00
linalg.rst Add torch.linalg.norm (#42749) 2020-08-28 18:28:33 -07:00
math-quantizer-equation.png adding quantization.rst file for quantization feature (#27559) 2019-10-09 16:45:09 -07:00
mobile_optimizer.rst optimize_for_mobile: bring packed params to root module (#42740) 2020-08-08 15:53:20 -07:00
model_zoo.rst add/move a few apis in torch.hub (#18758) 2019-04-10 23:10:39 -07:00
multiprocessing.rst Update docs for master to remove Python 2 references (#36336) 2020-04-16 10:15:48 -07:00
name_inference.rst torch.sgn for complex tensors (#39955) 2020-09-22 08:24:53 -07:00
named_tensor.rst Easier english updated tech docs (#42016) 2020-07-24 14:36:17 -07:00
nn.functional.rst [pytorch] Add triplet margin loss with custom distance (#43680) 2020-09-22 11:35:52 -07:00
nn.init.rst Bag of documentation fixes; fix more sphinx warnings (#27850) 2019-10-15 07:31:14 -07:00
nn.rst [pytorch] Add triplet margin loss with custom distance (#43680) 2020-09-22 11:35:52 -07:00
onnx.rst [ONNX] Update ONNX docs for release (#45086) 2020-09-23 23:28:36 -07:00
optim.rst DOC: fail to build if there are warnings (#41335) 2020-07-28 22:33:44 -07:00
quantization-support.rst DOC: split quantization.rst into smaller pieces (#41321) 2020-07-25 23:59:40 -07:00
quantization.rst DOC: split quantization.rst into smaller pieces (#41321) 2020-07-25 23:59:40 -07:00
random.rst Remove duplicated entries in random.rst (#39725) 2020-06-10 16:51:15 -07:00
rpc.rst Add link to profiling recipe from rpc main docs (#45235) 2020-09-23 22:02:38 -07:00
sparse.rst Update docs feature classifications (#39966) 2020-06-24 15:35:59 -07:00
storage.rst
tensor_attributes.rst Update docs feature classifications (#39966) 2020-06-24 15:35:59 -07:00
tensor_view.rst Adds movedim method, fixes movedim docs, fixes view doc links (#43122) 2020-08-17 14:24:52 -07:00
tensorboard.rst Add method add_hparams to API doc (#27344) 2019-10-03 17:07:45 -07:00
tensors.rst Grammatically updated the tech docs (#45192) 2020-09-24 14:48:30 -07:00
torch.nn.intrinsic.qat.rst DOC: split quantization.rst into smaller pieces (#41321) 2020-07-25 23:59:40 -07:00
torch.nn.intrinsic.quantized.rst DOC: split quantization.rst into smaller pieces (#41321) 2020-07-25 23:59:40 -07:00
torch.nn.intrinsic.rst DOC: split quantization.rst into smaller pieces (#41321) 2020-07-25 23:59:40 -07:00
torch.nn.qat.rst DOC: split quantization.rst into smaller pieces (#41321) 2020-07-25 23:59:40 -07:00
torch.nn.quantized.dynamic.rst DOC: split quantization.rst into smaller pieces (#41321) 2020-07-25 23:59:40 -07:00
torch.nn.quantized.rst DOC: split quantization.rst into smaller pieces (#41321) 2020-07-25 23:59:40 -07:00
torch.quantization.rst DOC: split quantization.rst into smaller pieces (#41321) 2020-07-25 23:59:40 -07:00
torch.rst Add torch.do_assert, which is symbolically traceable (#45188) 2020-09-25 13:46:28 -07:00
type_info.rst DOC: split quantization.rst into smaller pieces (#41321) 2020-07-25 23:59:40 -07:00