Skip to content

Commit

Permalink
Removing invalid git option when updating submodules (pytorch#91132)
Browse files Browse the repository at this point in the history
Same as this: pytorch/builder#1246
Related to following git commit: git/git@51243f9
Which makes jobs = 0 invalid.

Nightlies for MacOS are failing because of this issue: https://github.com/pytorch/pytorch/actions/runs/3729522653/jobs/6325523414

Pull Request resolved: pytorch#91132
Approved by: https://github.com/kit1980, https://github.com/huydhn, https://github.com/malfet, https://github.com/seemethere
  • Loading branch information
atalman authored and pytorchmergebot committed Dec 20, 2022
1 parent 0148809 commit 3bd37ff
Show file tree
Hide file tree
Showing 14 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .circleci/scripts/binary_checkout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ else
echo "Can't tell what to checkout"
exit 1
fi
retry git submodule update --init --recursive --jobs 0
retry git submodule update --init --recursive
echo "Using Pytorch from "
git --no-pager log --max-count 1
popd
Expand Down
2 changes: 1 addition & 1 deletion .circleci/scripts/binary_ios_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}
# sync submodules
cd ${PROJ_ROOT}
git submodule sync
git submodule update --init --recursive --jobs 0
git submodule update --init --recursive

# run build script
chmod a+x ${PROJ_ROOT}/scripts/build_ios.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/build-android/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ runs:
-w /var/lib/jenkins/workspace \
"${DOCKER_IMAGE}"
)
git submodule sync && git submodule update -q --init --recursive --depth 1 --jobs 0
git submodule sync && git submodule update -q --init --recursive --depth 1
docker cp "${GITHUB_WORKSPACE}/." "${container_name}:/var/lib/jenkins/workspace"
(echo "sudo chown -R jenkins . && .jenkins/pytorch/build.sh && find ${BUILD_ROOT} -type f -name "*.a" -or -name "*.o" -delete" | docker exec -u jenkins -i "${container_name}" bash) 2>&1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_android-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
BUILD_LITE_INTERPRETER="0"
fi
git submodule sync && git submodule update -q --init --recursive --depth 1 --jobs 0
git submodule sync && git submodule update -q --init --recursive --depth 1
export id
id=$(docker run -e BUILD_ENVIRONMENT \
-e MAX_JOBS="$(nproc --ignore=2)" \
Expand Down
2 changes: 1 addition & 1 deletion .jenkins/pytorch/win-test-helpers/test_custom_backend.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
call %SCRIPT_HELPERS_DIR%\setup_pytorch_env.bat

git submodule update --init --recursive --jobs 0 third_party/pybind11
git submodule update --init --recursive third_party/pybind11
cd test\custom_backend

:: Build the custom backend library.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
call %SCRIPT_HELPERS_DIR%\setup_pytorch_env.bat

git submodule update --init --recursive --jobs 0 third_party/pybind11
git submodule update --init --recursive third_party/pybind11
cd test\custom_operator

:: Build the custom operator library.
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ If you already have PyTorch from source, update it:
```bash
git pull --rebase
git submodule sync --recursive
git submodule update --init --recursive --jobs 0
git submodule update --init --recursive
```

If you want to have no-op incremental rebuilds (which are fast), see [Make no-op build fast](#make-no-op-build-fast) below.
Expand Down Expand Up @@ -158,15 +158,15 @@ that, you can install in `develop` mode again.
git submodule deinit -f .
git clean -xdf
python setup.py clean
git submodule update --init --recursive --jobs 0 # very important to sync the submodules
python setup.py develop # then try running the command again
git submodule update --init --recursive # very important to sync the submodules
python setup.py develop # then try running the command again
```
4. The main step within `python setup.py develop` is running `make` from the `build` directory. If you want to
experiment with some environment variables, you can pass them into the command:
```bash
ENV_KEY1=ENV_VAL1[, ENV_KEY2=ENV_VAL2]* python setup.py develop
```
* If you run into issue running `git submodule update --init --recursive --jobs 0`. Please try the following:
* If you run into issue running `git submodule update --init --recursive`. Please try the following:
- If you encounter an error such as
```
error: Submodule 'third_party/pybind11' could not be updated
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ RUN chmod +x ~/miniconda.sh && \
FROM dev-base as submodule-update
WORKDIR /opt/pytorch
COPY . .
RUN git submodule update --init --recursive --jobs 0
RUN git submodule update --init --recursive

FROM conda as build
WORKDIR /opt/pytorch
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ git clone --recursive https://github.com/pytorch/pytorch
cd pytorch
# if you are updating an existing checkout
git submodule sync
git submodule update --init --recursive --jobs 0
git submodule update --init --recursive
```

#### Install PyTorch
Expand Down
2 changes: 1 addition & 1 deletion android/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ For this you can use `./scripts/build_pytorch_android.sh` script.
```
git clone https://github.com/pytorch/pytorch.git
cd pytorch
git submodule update --init --recursive --jobs 0
git submodule update --init --recursive
sh ./scripts/build_pytorch_android.sh
```

Expand Down
8 changes: 4 additions & 4 deletions aten/src/ATen/native/quantized/cpu/qnnpack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ git clone --recursive https://github.com/pytorch/pytorch.git
cd pytorch

# Optional: update QNNPACK submodule to latest revision
git submodule update --remote --jobs 0 third_party/QNNPACK
git submodule update --remote third_party/QNNPACK

# Build Caffe2 (including binaries) for the host system
# Use only 1 thread for build to avoid out-of-memory failures
Expand All @@ -97,7 +97,7 @@ git clone --recursive https://github.com/pytorch/pytorch.git
cd pytorch

# Optional: update QNNPACK submodule to latest revision
git submodule update --remote --jobs 0 third_party/QNNPACK
git submodule update --remote third_party/QNNPACK

# Build Caffe2 (including binaries) for Android, and push to device
scripts/build_android.sh -DANDROID_TOOLCHAIN=clang -DBUILD_BINARY=ON
Expand Down Expand Up @@ -127,7 +127,7 @@ git clone --recursive https://github.com/pytorch/pytorch.git
cd pytorch

# Optional: update QNNPACK submodule to latest revision
git submodule update --remote --jobs 0 third_party/QNNPACK
git submodule update --remote third_party/QNNPACK

# Build Caffe2 (including binaries) for Android, and push to device
scripts/build_android.sh -DANDROID_ABI=arm64-v8a -DANDROID_TOOLCHAIN=clang -DBUILD_BINARY=ON
Expand Down Expand Up @@ -164,7 +164,7 @@ git clone --recursive https://github.com/pytorch/pytorch.git
cd pytorch

# Optional: update QNNPACK submodule to latest revision
git submodule update --remote --jobs 0 third_party/QNNPACK
git submodule update --remote third_party/QNNPACK

# Clone PEP repo
cd ~/Code
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/FindMKLDNN.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ IF(NOT MKLDNN_FOUND)
FIND_PATH(IDEEP_INCLUDE_DIR ideep.hpp PATHS ${IDEEP_ROOT} PATH_SUFFIXES include)
FIND_PATH(MKLDNN_INCLUDE_DIR dnnl.hpp dnnl.h PATHS ${MKLDNN_ROOT} PATH_SUFFIXES include)
IF(NOT MKLDNN_INCLUDE_DIR)
EXECUTE_PROCESS(COMMAND git${CMAKE_EXECUTABLE_SUFFIX} submodule update --init --jobs 0 mkl-dnn WORKING_DIRECTORY ${IDEEP_ROOT})
EXECUTE_PROCESS(COMMAND git${CMAKE_EXECUTABLE_SUFFIX} submodule update --init mkl-dnn WORKING_DIRECTORY ${IDEEP_ROOT})
FIND_PATH(MKLDNN_INCLUDE_DIR dnnl.hpp dnnl.h PATHS ${MKLDNN_ROOT} PATH_SUFFIXES include)
ENDIF(NOT MKLDNN_INCLUDE_DIR)
IF(BUILD_ONEDNN_GRAPH)
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def check_submodules():
def check_for_files(folder, files):
if not any(os.path.exists(os.path.join(folder, f)) for f in files):
report("Could not find any of {} in {}".format(", ".join(files), folder))
report("Did you run 'git submodule update --init --recursive --jobs 0'?")
report("Did you run 'git submodule update --init --recursive'?")
sys.exit(1)

def not_exists_or_empty(folder):
Expand All @@ -354,7 +354,7 @@ def not_exists_or_empty(folder):
print(' --- Submodule initialization took {:.2f} sec'.format(end - start))
except Exception:
print(' --- Submodule initalization failed')
print('Please run:\n\tgit submodule update --init --recursive --jobs 0')
print('Please run:\n\tgit submodule update --init --recursive')
sys.exit(1)
for folder in folders:
check_for_files(folder, ["CMakeLists.txt", "Makefile", "setup.py", "LICENSE", "LICENSE.md", "LICENSE.txt"])
Expand Down
2 changes: 1 addition & 1 deletion torch/utils/benchmark/examples/prepare_e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ make_clean_env pr_39967
make_clean_env ref_39744
make_clean_env pr_39744

git submodule update --init --recursive --jobs 0
git submodule update --init --recursive
wget https://github.com/pytorch/pytorch/pull/39850.diff
wget https://github.com/pytorch/pytorch/pull/39744.diff

Expand Down

0 comments on commit 3bd37ff

Please sign in to comment.