pytorch/torch
Edward Z. Yang 7b9d250f06 Change _dynamo.export to be export(f)(*args, **kwargs) (#106109)
Signed-off-by: Edward Z. Yang <ezyang@meta.com>

Pull Request resolved: https://github.com/pytorch/pytorch/pull/106109
Approved by: https://github.com/voznesenskym
2023-07-27 21:41:13 +00:00
..
_awaits
_C Add torch.utils to the docs page, remove dead code and fix docstrings (#105142) 2023-07-26 14:24:58 +00:00
_C_flatbuffer
_custom_op [BE] Enable ruff's UP rules and autoformat nn/ mps/ and torch/ (#105436) 2023-07-21 07:38:46 +00:00
_decomp Update matmul decomp to match eager (#105850) 2023-07-26 09:24:51 +00:00
_dispatch
_dynamo Change _dynamo.export to be export(f)(*args, **kwargs) (#106109) 2023-07-27 21:41:13 +00:00
_export Change _dynamo.export to be export(f)(*args, **kwargs) (#106109) 2023-07-27 21:41:13 +00:00
_functorch inductor: fix CSE issue when have symbolic shape input at the freezing path (#105651) 2023-07-26 08:07:31 +00:00
_higher_order_ops
_inductor [Inductor] Fuse non-foreach ops with foreach ops without iterating over all subnodes (#106008) 2023-07-27 21:40:24 +00:00
_lazy
_logging [BE] Enable ruff's UP rules and autoformat nn/ mps/ and torch/ (#105436) 2023-07-21 07:38:46 +00:00
_prims [BE] f-stringify torch/ and scripts (#105538) 2023-07-21 19:35:24 +00:00
_prims_common [BE] f-stringify torch/ and scripts (#105538) 2023-07-21 19:35:24 +00:00
_refs Fix aten.logspace decomposition (#105201) 2023-07-22 04:10:20 +00:00
_subclasses Unconditionally record when FakeTensorMode is allocated and report it on inconsistency (#105927) 2023-07-26 03:38:42 +00:00
amp Documentation for torch.autocast (#95760) 2023-07-22 03:56:34 +00:00
ao Change _dynamo.export to be export(f)(*args, **kwargs) (#106109) 2023-07-27 21:41:13 +00:00
autograd Fix typo ; Update grad_mode.py (#106045) 2023-07-27 00:24:50 +00:00
backends [BE] f-stringify torch/ and scripts (#105538) 2023-07-21 19:35:24 +00:00
compiler
contrib [BE] Enable ruff's UP rules and autoformat nn/ mps/ and torch/ (#105436) 2023-07-21 07:38:46 +00:00
cpu
csrc Make sure that little endian is default case when __BYTE_ORDER__ is not defined (#104249) 2023-07-27 13:33:35 +00:00
cuda [BE] f-stringify torch/ and scripts (#105538) 2023-07-21 19:35:24 +00:00
distributed Clean up unsed MHA code to avoid confusion (#105956) 2023-07-27 17:10:17 +00:00
distributions [BE]: Update Ruff to 0.0.280 (#105724) 2023-07-22 23:03:34 +00:00
fft
func
futures
fx If we can't statically prove 32-bit indexing OK, only add guard if hint exists (#106004) 2023-07-26 16:36:29 +00:00
jit [jit] move get_annotations out of infer_concrete_type_builder (#105197) 2023-07-26 13:39:39 +00:00
legacy
lib
linalg [DocString] Fix incorrect api Examples (#105911) 2023-07-25 13:03:06 +00:00
masked [BE]: Update Ruff to 0.0.280 (#105724) 2023-07-22 23:03:34 +00:00
monitor
mps [BE] Enable ruff's UP rules and autoformat nn/ mps/ and torch/ (#105436) 2023-07-21 07:38:46 +00:00
multiprocessing [BE] f-stringify torch/ and scripts (#105538) 2023-07-21 19:35:24 +00:00
nested
nn [easy] improve hint on error message in nn.Module.load_state_dict (#106042) 2023-07-27 19:56:02 +00:00
onnx Change _dynamo.export to be export(f)(*args, **kwargs) (#106109) 2023-07-27 21:41:13 +00:00
optim remove duplicated code in optimizer (#106022) 2023-07-26 17:01:28 +00:00
package [BE]: Update Ruff to 0.0.280 (#105724) 2023-07-22 23:03:34 +00:00
profiler [BE] f-stringify torch/ and scripts (#105538) 2023-07-21 19:35:24 +00:00
quantization
signal
sparse
special
testing [pt2] add meta for argsort.stable, use sort samples in OpInfo (#106025) 2023-07-27 03:49:17 +00:00
utils Add torch.utils to the docs page, remove dead code and fix docstrings (#105142) 2023-07-26 14:24:58 +00:00
__config__.py
__future__.py
__init__.py Tweak dynamic=False behavior (#105715) 2023-07-24 16:56:41 +00:00
_appdirs.py [BE] f-stringify torch/ and scripts (#105538) 2023-07-21 19:35:24 +00:00
_classes.py
_compile.py
_deploy.py
_guards.py Unconditionally record when FakeTensorMode is allocated and report it on inconsistency (#105927) 2023-07-26 03:38:42 +00:00
_jit_internal.py
_linalg_utils.py [BE] Enable ruff's UP rules and autoformat nn/ mps/ and torch/ (#105436) 2023-07-21 07:38:46 +00:00
_lobpcg.py [BE] f-stringify torch/ and scripts (#105538) 2023-07-21 19:35:24 +00:00
_lowrank.py [BE] f-stringify torch/ and scripts (#105538) 2023-07-21 19:35:24 +00:00
_meta_registrations.py [pt2] add meta for argsort.stable, use sort samples in OpInfo (#106025) 2023-07-27 03:49:17 +00:00
_namedtensor_internals.py [BE] f-stringify torch/ and scripts (#105538) 2023-07-21 19:35:24 +00:00
_ops.py [BE] f-stringify torch/ and scripts (#105538) 2023-07-21 19:35:24 +00:00
_python_dispatcher.py [BE] Enable ruff's UP rules and autoformat nn/ mps/ and torch/ (#105436) 2023-07-21 07:38:46 +00:00
_sources.py
_storage_docs.py
_tensor.py [BE] f-stringify torch/ and scripts (#105538) 2023-07-21 19:35:24 +00:00
_tensor_docs.py [Doc] Add Tensor.Shape (#104750) 2023-07-26 16:30:15 +00:00
_tensor_str.py [BE] f-stringify torch/ and scripts (#105538) 2023-07-21 19:35:24 +00:00
_torch_docs.py doc: fix fake quantize per channel doc (#105955) 2023-07-26 19:17:41 +00:00
_utils.py [BE] f-stringify torch/ and scripts (#105538) 2023-07-21 19:35:24 +00:00
_utils_internal.py
_VF.py
_vmap_internals.py
_weights_only_unpickler.py
abi-check.cpp
CMakeLists.txt
custom_class.h
custom_class_detail.h
extension.h
functional.py [BE] f-stringify torch/ and scripts (#105538) 2023-07-21 19:35:24 +00:00
hub.py [BE] f-stringify torch/ and scripts (#105538) 2023-07-21 19:35:24 +00:00
library.h
library.py [BE] Enable ruff's UP rules and autoformat nn/ mps/ and torch/ (#105436) 2023-07-21 07:38:46 +00:00
overrides.py [BE] Enable ruff's UP rules and autoformat nn/ mps/ and torch/ (#105436) 2023-07-21 07:38:46 +00:00
py.typed
quasirandom.py
random.py
README.txt
return_types.py
script.h
serialization.py [easy] Minor torch.load docs fix (#105876) 2023-07-25 03:58:30 +00:00
storage.py [BE] Enable ruff's UP rules and autoformat nn/ mps/ and torch/ (#105436) 2023-07-21 07:38:46 +00:00
torch_version.py [BE] Enable ruff's UP rules and autoformat nn/ mps/ and torch/ (#105436) 2023-07-21 07:38:46 +00:00
types.py
version.py.tpl

Note [TH abstraction violation]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

TH/THC provide some hpp headers, which are proper C++ headers rather than
C headers.  These headers serve double duty as *internal implementation
detail* headers, whose contents should largely not be used by external
clients.

Ideally, we would not install these headers at all; instead, you should
use public functions (in headers like `THTensor.h`, NOT `THTensor.hpp`)
to manipulate these structs.  However, there are a few places
in torch/csrc where we violate this abstraction.  They are marked with
a pointer to this note.  Each of those sites will have to be refactored
when we refactor the guts of THTensor and related structures.