pytorch/torch
Chien-Chin Huang d50643adcd [FSDP] Implement local_state_dict and load_local_state_dict (#72469)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/72469

1. Implement the framework to allow user to choose among `state_dict`, `local_state_dict`, and `sharded_state_dict`.
2. Implement ShardedTensor compatible local_state_dict() and load_local_state_dict().
ghstack-source-id: 149559985

Test Plan: CI

Reviewed By: rohan-varma

Differential Revision: D33919683

fbshipit-source-id: c9f1b43ce04da7db65c4aebf6ac2c7a0ac5e9de8
(cherry picked from commit 55fd6230c9)
2022-02-19 20:29:27 +00:00
..
_C Integrate full ONNX check into ONNX export API (#71125) 2022-02-18 18:40:09 +00:00
_masked Generate static docstrings for torch._masked functions. (#72865) 2022-02-17 02:44:16 +00:00
ao Revert D34313425: [quant] Add ConvTranspose reference module 2022-02-18 17:31:20 +00:00
autograd Add autograd tests for addmm, addmv, mm, mv and CSR matrix input (#71949) 2022-02-11 23:14:02 +00:00
backends Fix type annotation for torch.backends.cudnn.allow_tf32 (#72757) 2022-02-14 17:26:37 +00:00
contrib
cpu
csrc add assert to make sure expected number of LTC roots matches what TS … (#73112) 2022-02-19 06:33:08 +00:00
cuda Rename Typed/UntypedStorage to _Typed/_UntypedStorage (#72540) 2022-02-15 23:53:01 +00:00
distributed [FSDP] Implement local_state_dict and load_local_state_dict (#72469) 2022-02-19 20:29:27 +00:00
distributions Adding details to kl.py (#72845) 2022-02-19 06:33:08 +00:00
fft
for_onnx
futures #71946 Remove Python 3.6 references (#72211) 2022-02-08 03:46:20 +00:00
fx [graph_manipulation] Unpack list of outputs (#72940) 2022-02-17 06:38:52 +00:00
jit Make fusion strategy api public (#72639) 2022-02-16 03:45:15 +00:00
legacy
lib
linalg Implement forward AD for linalg.svd and improve svd_backward (#70253) 2022-01-27 18:38:30 +00:00
monitor torch/monitor: TensorboardEventHandler (#71658) 2022-01-27 08:33:55 +00:00
multiprocessing Rename Typed/UntypedStorage to _Typed/_UntypedStorage (#72540) 2022-02-15 23:53:01 +00:00
nn Revert D34313425: [quant] Add ConvTranspose reference module 2022-02-18 17:31:20 +00:00
onnx [ONNX] Add pixel_unshuffle support in opset 9 2022-02-19 00:15:16 +00:00
optim Add missing import (#72840) 2022-02-15 19:43:54 +00:00
package Rename Typed/UntypedStorage to _Typed/_UntypedStorage (#72540) 2022-02-15 23:53:01 +00:00
profiler
quantization [quant][fx][graphmode][be] Change the type for output of convert to be torch.nn.Module (#69959) 2021-12-29 20:33:32 -08:00
sparse Add missing entry for sampled_addmm in sparse.rst (#72312) 2022-02-08 00:07:20 +00:00
special
testing only compare attributes for meta tensors (#72508) 2022-02-17 02:33:08 +00:00
utils Documenting cuda 11.5 windows issue (#73013) 2022-02-19 02:34:59 +00:00
__config__.py
__future__.py
__init__.py Rename Typed/UntypedStorage to _Typed/_UntypedStorage (#72540) 2022-02-15 23:53:01 +00:00
_appdirs.py
_classes.py
_deploy.py Rename Typed/UntypedStorage to _Typed/_UntypedStorage (#72540) 2022-02-15 23:53:01 +00:00
_jit_internal.py (2/2) Make TorchScript Preserve Fully Qualified Class Name for Python Exceptions: frontend change (#72899) 2022-02-16 03:45:15 +00:00
_linalg_utils.py
_lobpcg.py Fix trivial typo at the doc of torch.lobpcg (#71464) 2022-01-20 00:07:39 +00:00
_lowrank.py
_namedtensor_internals.py
_ops.py Add torch.ops per overload API (#72206) 2022-02-11 17:19:06 +00:00
_python_dispatcher.py Revert D34034848: free up dispatch key space (in C++) 2022-02-14 23:29:00 +00:00
_six.py Update min python version to 3.7 in setup.py and mypy configs (#71494) 2022-01-20 00:03:57 +00:00
_sources.py
_storage_docs.py
_tensor_docs.py Revert D33800694: [pytorch][PR] scatter_reduce documentation 2022-02-15 20:10:26 +00:00
_tensor_str.py fixed compilations on xla tensor print (#71147) 2022-01-27 02:28:19 +00:00
_tensor.py Rename Typed/UntypedStorage to _Typed/_UntypedStorage (#72540) 2022-02-15 23:53:01 +00:00
_torch_docs.py Revert D33800694: [pytorch][PR] scatter_reduce documentation 2022-02-15 20:10:26 +00:00
_utils_internal.py
_utils.py Rename Typed/UntypedStorage to _Typed/_UntypedStorage (#72540) 2022-02-15 23:53:01 +00:00
_VF.py
_vmap_internals.py
abi-check.cpp
autocast_mode.py
CMakeLists.txt Allow caffe2-specific graph transformations for OperatorExportTypes.ONNX_ATEN_FALLBACK when BUILD_CAFFE2 is ON (#67460) (#68490) 2022-02-10 03:26:48 +00:00
custom_class_detail.h
custom_class.h [jit] Decouple ivalue.h from jit_type.h (#70119) 2022-01-07 18:34:17 -08:00
deploy.h
extension.h
functional.py Add linalg.lu_factor (#66933) 2022-01-05 20:32:12 -08:00
hub.py
library.h Codegen: python_torch_functions only include relevant operators (#68693) 2022-01-21 15:37:06 +00:00
overrides.py Move native MHA code out of PyTorch core (#72944) 2022-02-18 21:34:06 +00:00
py.typed
quasirandom.py
random.py
README.txt
return_types.py
script.h
serialization.py Rename Typed/UntypedStorage to _Typed/_UntypedStorage (#72540) 2022-02-15 23:53:01 +00:00
storage.py Rename Typed/UntypedStorage to _Typed/_UntypedStorage (#72540) 2022-02-15 23:53:01 +00:00
torch_version.py Lazy import packaging in torch_version (#71345) 2022-01-18 22:12:41 +00:00
types.py

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.