Skip to content

Commit 18d5617

Browse files
committed
Update on "[FSDP][optim_state_dict][1/N] Restructure _optim_state_dict to prepare the support of use_orig_param"
**Motivation:** Restructure some APIs in _optim_state_dict.py to allow better future extension, mostly for supporting use_orig_params. NO logic change in this PR. [ghstack-poisoned]
2 parents c2da3de + 927a344 commit 18d5617

File tree

320 files changed

+6993
-3963
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

320 files changed

+6993
-3963
lines changed

.circleci/scripts/binary_ios_upload.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ echo "${IOS_NIGHTLY_BUILD_VERSION}" > version.txt
4747
zip -r ${ZIPFILE} install src version.txt LICENSE
4848
# upload to aws
4949
# Install conda then 'conda install' awscli
50-
curl --retry 3 --retry-all-errors -o ~/conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
50+
curl --retry 3 -o ~/conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
5151
chmod +x ~/conda.sh
5252
/bin/bash ~/conda.sh -b -p ~/anaconda
5353
export PATH="~/anaconda/bin:${PATH}"

.circleci/scripts/binary_linux_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ if [[ "$PACKAGE_TYPE" == conda ]]; then
9898
conda install \${EXTRA_CONDA_FLAGS} -y "\$pkg" --offline
9999
)
100100
elif [[ "$PACKAGE_TYPE" != libtorch ]]; then
101-
pip install "\$pkg"
101+
pip install "\$pkg" --extra-index-url "https://download.pytorch.org/whl/nightly/${DESIRED_CUDA}"
102102
retry pip install -q future numpy protobuf typing-extensions six
103103
fi
104104
if [[ "$PACKAGE_TYPE" == libtorch ]]; then

.github/ci_commit_pins/vision.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
72686211e2a8b78e5a5dc8c28be34eb9cfcdad4c
1+
01c11a0564b8417561ae4c414fe659fc97476987

.github/labeler.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@
4747
"NNC":
4848
- torch/csrc/jit/tensorexpr/**
4949

50-
"oncall: quantization":
50+
"release notes: quantization":
5151
- torch/ao/quantization/**
5252
- torch/quantization/**
5353
- aten/src/ATen/quantized/**
5454
- aten/src/ATen/native/quantized/cpu/**
55+
- test/quantization/**

.github/scripts/gql_mocks.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/periodic.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
workflow_dispatch:
1111

1212
concurrency:
13-
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ github.ref_type == 'branch' && github.sha }}-${{ github.event_name == 'workflow_dispatch' }}-${{ github.event_name == 'schedule' }}
13+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ github.ref_type == 'branch' && github.sha }}-${{ github.event_name == 'workflow_dispatch' }}-${{ github.event_name == 'schedule' }}-${{ github.event.schedule }}
1414
cancel-in-progress: true
1515

1616
jobs:

.jenkins/pytorch/test.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ BUILD_RENAMED_DIR="build_renamed"
1616
BUILD_BIN_DIR="$BUILD_DIR"/bin
1717

1818
export VALGRIND=ON
19+
export TORCH_INDUCTOR_INSTALL_GXX=ON
1920
if [[ "$BUILD_ENVIRONMENT" == *clang9* ]]; then
2021
# clang9 appears to miscompile code involving c10::optional<c10::SymInt>,
2122
# such that valgrind complains along these lines:
@@ -215,6 +216,7 @@ test_dynamo_shard() {
215216
echo "NUM_TEST_SHARDS must be defined to run a Python test shard"
216217
exit 1
217218
fi
219+
python tools/dynamo/verify_dynamo.py
218220
# Temporarily disable test_fx for dynamo pending the investigation on TTS
219221
# regression in https://github.com/pytorch/torchdynamo/issues/784
220222
time python test/run_test.py \
@@ -249,6 +251,7 @@ test_inductor_distributed() {
249251
}
250252

251253
test_inductor() {
254+
python tools/dynamo/verify_dynamo.py
252255
python test/run_test.py --include test_modules test_ops --verbose
253256
PYTORCH_TEST_WITH_INDUCTOR=0 python test/run_test.py --include inductor/test_torchinductor --include inductor/test_torchinductor_opinfo --verbose
254257
# TODO: investigate "RuntimeError: CUDA driver API confirmed a leak"

.lintrunner.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,16 @@ exclude_patterns = [
101101
'torch/csrc/**',
102102
'torch/_dynamo/**/*.py',
103103
'torch/_inductor/**/*.py',
104+
'torch/_functorch/aot_autograd.py',
105+
'torch/_functorch/benchmark_utils.py',
106+
'torch/_functorch/compile_utils.py',
107+
'torch/_functorch/compilers.py',
108+
'torch/_functorch/eager_transforms.py',
109+
'torch/_functorch/fx_minifier.py',
110+
'torch/_functorch/partitioners.py',
111+
'torch/_functorch/make_functional.py',
112+
'torch/_functorch/top_operators_github_usage.py',
113+
'torch/_functorch/vmap.py',
104114
'torch/distributed/elastic/agent/server/api.py',
105115
'torch/testing/_internal/**',
106116
'torch/distributed/fsdp/fully_sharded_data_parallel.py',
@@ -148,6 +158,7 @@ include_patterns = [
148158
'torch/_dynamo/convert_frame.py',
149159
'torch/_dynamo/types.py',
150160
'torch/_dynamo/output_graph.py',
161+
'torch/_dynamo/guards.py',
151162
'torch/_dynamo/optimizations/__init__.py',
152163
'torch/_dynamo/optimizations/backends.py',
153164
'torch/_dynamo/optimizations/training.py',
@@ -779,6 +790,7 @@ include_patterns = [
779790
'torchgen/**/*.py',
780791
'functorch/functorch/_src/aot_autograd.py',
781792
'functorch/functorch/_src/compilers.py',
793+
'torch/testing/*.py',
782794
]
783795
command = [
784796
'python3',

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
/torch/autograd/ @albanD @soulitzer
1616
/tools/autograd/ @albanD @soulitzer
1717
/torch/nn/ @albanD @jbschlosser
18-
/torch/optim/ @albanD
18+
/torch/optim/ @albanD @janeyx99
1919
/test/test_public_bindings.py @albanD
2020
/test/allowlist_for_publicAPI.json @albanD @anjali411
2121
/docs/source/conf.py @albanD

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
include MANIFEST.in
22
include CMakeLists.txt
3-
include CITATION
3+
include CITATION.cff
44
include LICENSE
55
include NOTICE
66
include .gitmodules

0 commit comments

Comments
 (0)