pytorch/torch
Bin Bao 3058700f7f [aotinductor] Add AOTIModelRunner as a utility class (#110891)
Summary: Introduce a utility class AOTIModelRunner to take care of running an AOTInductor compiled model. It does things like dlopen a model, initialize the model container, setup inputs and outputs, and destroy the model container.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/110891
Approved by: https://github.com/chenyang78
ghstack dependencies: #110652
2023-10-11 15:58:28 +00:00
..
_awaits
_C Revert "Reland "[C10] PG observability hooks. (#108815)" (#110907)" 2023-10-11 00:23:42 +00:00
_C_flatbuffer
_custom_op [custom op] Use canonical API to constrain unbacked values (#108372) 2023-10-10 05:14:28 +00:00
_decomp Revert "[core ATen IR] Add decompositions for max, min, var_mean (#110906)" 2023-10-11 11:41:21 +00:00
_dispatch
_dynamo [cond] Add more tests for valid inputs of cond (#110727) 2023-10-11 15:56:13 +00:00
_export Revert "[export] Get export APIs ready for PTC (#110410)" 2023-10-11 07:31:51 +00:00
_functorch AOTDispatch subclass (#104483) 2023-10-10 16:13:16 +00:00
_higher_order_ops Add a side table for triton kernels to avoid using itertools.partial (#110633) 2023-10-08 02:01:59 +00:00
_inductor [inductor] Implement Fx graph caching to improve warm compilation time. (#103453) 2023-10-11 14:39:14 +00:00
_lazy
_library [custom op] Use canonical API to constrain unbacked values (#108372) 2023-10-10 05:14:28 +00:00
_logging [BE]: Replace undocumented constant in logging (#109434) 2023-09-16 20:17:32 +00:00
_numpy Fix typo under torch/_numpy directory (#110782) 2023-10-07 17:42:35 +00:00
_prims [HigherOrderOp] fallthrough some keys by default. (#110478) 2023-10-05 16:25:42 +00:00
_prims_common Fix error in div lowering with integers (#102809) 2023-10-06 23:21:40 +00:00
_refs Revert "[core ATen IR] Add decompositions for max, min, var_mean (#110906)" 2023-10-11 11:41:21 +00:00
_subclasses Make NestedTensor compilable with eager backend (#109171) 2023-10-11 04:47:10 +00:00
amp Unblock float16 dtype for xla autocasting (#109554) 2023-09-21 03:19:44 +00:00
ao [quant][pt2] Preserve source_fn_stack after QAT fusion (#110899) 2023-10-11 02:55:52 +00:00
autograd Support inference_mode decorator (#109274) 2023-09-27 22:21:42 +00:00
backends typo: add space after cudnn error messages (#110806) 2023-10-08 20:58:40 +00:00
compiler
contrib
cpu Add current_device() to torch.cpu (#110987) 2023-10-11 05:13:10 +00:00
csrc [aotinductor] Add AOTIModelRunner as a utility class (#110891) 2023-10-11 15:58:28 +00:00
cuda Improve torch.cuda.amp type hints (#108630) 2023-09-08 06:06:25 +00:00
distributed [Distributed] Small nits to apply_optimizer_in_backward (#110903) 2023-10-11 07:45:45 +00:00
distributions Spelling fix (#108490) 2023-09-04 16:59:35 +00:00
export Move export.constrain_as_* to torch._constrain_as_* (#110757) 2023-10-11 02:37:55 +00:00
fft
func
futures
fx [inductor] Implement Fx graph caching to improve warm compilation time. (#103453) 2023-10-11 14:39:14 +00:00
jit Nvfuser cpp api deprecation attempt 2 (#110881) 2023-10-10 08:07:03 +00:00
legacy
lib Revert "Move at::{Refcounted,}MapAllocator to c10 (#109881)" 2023-10-10 20:39:12 +00:00
linalg fix matrix_power documentation bug (#108585) 2023-09-05 22:08:46 +00:00
masked Make is_sparse a property of MaskedTensor (#110725) 2023-10-09 22:35:38 +00:00
monitor
mps
multiprocessing Multiprocessing support for NT (#110292) 2023-10-10 21:58:19 +00:00
nested Make NestedTensor compilable with eager backend (#109171) 2023-10-11 04:47:10 +00:00
nn Support Numpy ints in the torch.nn.functional.interpolate dtype check (#110778) 2023-10-10 01:46:33 +00:00
onnx Fix typo under torch/onnx directory (#110697) 2023-10-06 18:21:00 +00:00
optim perf(optim/dynamo): shortcut is_sparse iteration in SGD multi_tensor (#110648) 2023-10-06 08:56:18 +00:00
package Fix typo under torch directory (#110824) 2023-10-09 19:16:43 +00:00
profiler Rever [Profiler] Improve the docstring for export_memory_timeline (#110978) 2023-10-10 19:57:25 +00:00
quantization
signal
sparse [sparse] Fix semi-structured sparse shape mismatch bug (#110420) 2023-10-10 03:07:31 +00:00
special
testing [generate_opcheck_tests] Add some reasonable defaults (#110977) 2023-10-11 14:28:05 +00:00
utils Add set_checkpoint_debug_enabled that overrides local setting (#110728) 2023-10-11 02:12:31 +00:00
__config__.py
__future__.py
__init__.py Move export.constrain_as_* to torch._constrain_as_* (#110757) 2023-10-11 02:37:55 +00:00
_appdirs.py
_classes.py
_compile.py
_custom_ops.py [test][docs] Fix doctest warnings for syntax errors (#110517) 2023-10-05 00:00:06 +00:00
_deploy.py
_guards.py [dynamo] Remove SuperSource (#110475) 2023-10-08 04:45:06 +00:00
_jit_internal.py Fix typo under torch directory (#110824) 2023-10-09 19:16:43 +00:00
_linalg_utils.py
_lobpcg.py
_lowrank.py
_meta_registrations.py Fix the meta func for mem_eff_backward (#110893) 2023-10-11 02:58:54 +00:00
_namedtensor_internals.py
_ops.py Fix typo under torch directory (#110824) 2023-10-09 19:16:43 +00:00
_python_dispatcher.py
_sources.py
_storage_docs.py
_tensor_docs.py Rename torch._C._TensorBase to TensorBase (#109940) 2023-09-25 19:10:22 +00:00
_tensor_str.py
_tensor.py Pickle support for NT (#110219) 2023-09-29 15:30:06 +00:00
_torch_docs.py Fix a typo in cholesky_inverse documentation (#110364) 2023-10-04 12:30:11 +00:00
_utils_internal.py [TORCH_LIBRARY] Add impl_abstract_pystub (#109529) 2023-09-22 04:55:36 +00:00
_utils.py Fix typo under torch directory (#110824) 2023-10-09 19:16:43 +00:00
_VF.py
_vmap_internals.py
_weights_only_unpickler.py
abi-check.cpp
CMakeLists.txt Clean up CMake target linking (#109959) 2023-09-25 01:37:14 +00:00
custom_class_detail.h
custom_class.h [RELAND] Remove some unnecessary <iostream> includes from headers (#108150) 2023-09-20 21:55:15 +00:00
extension.h
functional.py Feature/stft no window warn (#110695) 2023-10-07 20:24:36 +00:00
hub.py
library.h [Reland2] Remove calls of c10::either (#110487) 2023-10-06 00:25:15 +00:00
library.py [test][docs] Fix doctest warnings for syntax errors (#110517) 2023-10-05 00:00:06 +00:00
overrides.py Move export.constrain_as_* to torch._constrain_as_* (#110757) 2023-10-11 02:37:55 +00:00
py.typed
quasirandom.py
random.py use torch.xpu.manual_seed_all in torch.seed (#110376) 2023-10-03 13:41:55 +00:00
README.txt
return_types.py
script.h
serialization.py fix get device index if has _utils._get_device_index in privateuse1 (#108123) 2023-10-07 06:18:59 +00:00
storage.py Fix type promotion of float8_e5m2 and float8_e4m3fn (#110279) 2023-10-05 01:28:48 +00:00
torch_version.py
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.