Commit Graph

242 Commits

Author SHA1 Message Date
14b258b5bc Fix broken link in README (#120698)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/120698
Approved by: https://github.com/janeyx99
2024-02-27 23:55:06 +00:00
3ad067fe2b [CPP] Update GCC minversion check to 9 or newer (#120126)
It's already a requirement for building PyTorch, but should be a
requirement for linking extensions with it, as that can lead to runtime
crashes, as `std::optional` template layout is incompatible between
gcc-9 and older compilers.

Also, update minimum supported clang version to 9.x(used to build Android), as clang-5 is clearly not C++17 compliant.

Fixes https://github.com/pytorch/pytorch/issues/120020

Pull Request resolved: https://github.com/pytorch/pytorch/pull/120126
Approved by: https://github.com/Skylion007
2024-02-19 22:05:00 +00:00
8c167f9fc3 [CMake] Explicitly error out if CuDNN older than 8.5 (#118235)
Also update README.md
Fixes https://github.com/pytorch/pytorch/issues/118193

Pull Request resolved: https://github.com/pytorch/pytorch/pull/118235
Approved by: https://github.com/zou3519
2024-01-25 23:41:04 +00:00
4a10e9eed4 update build guide to use mkl-static. (#116946)
# Background:
We found current build guide use mkl dynamic link. It may trigger a mkl link issue.

Detailed:
In build environment, libtorch_cpu.so will dynamic link to system mkl binaries by default.
If users install another version mkl library, it may lead to mkl symbol conflict.

I also checked released pytorch binary it use static mkl link. The build script shows it: https://github.com/pytorch/builder/blob/main/common/install_mkl.sh#L10

# Solution:
Update build guide to use mkl static link. And it is aligned to build script.

Conda install command docs:
https://anaconda.org/intel/mkl-static
https://anaconda.org/intel/mkl-include

# Validation
No mkl libraries dependencing, after use `conda install intel::mkl-static intel::mkl-include`.
## Windows
![image](https://github.com/pytorch/pytorch/assets/8433590/cc554ded-d827-4de5-81c6-cc3039155580)

## Linux
<img width="959" alt="image" src="https://github.com/pytorch/pytorch/assets/8433590/79766ad8-4ba2-4ff1-adc9-63affd8d419a">

Pull Request resolved: https://github.com/pytorch/pytorch/pull/116946
Approved by: https://github.com/jgong5, https://github.com/malfet
2024-01-10 01:35:02 +00:00
8367cf1220 Add Early Link To Intro Doc (#107344)
Fixes #106600 by including an early link to the intro docs.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/107344
Approved by: https://github.com/albanD, https://github.com/soulitzer
2023-08-22 23:00:52 +00:00
aef27bdbe7 Reword release version: major->minor in README.md (#106980)
Correct wording to reflect reality
Pull Request resolved: https://github.com/pytorch/pytorch/pull/106980
Approved by: https://github.com/huydhn, https://github.com/albanD
2023-08-10 21:32:30 +00:00
a2e8ac1d34 Update Anaconda download link (#106335)
I found out reading the readme that link is broken and thought that would be great first time contribution
Pull Request resolved: https://github.com/pytorch/pytorch/pull/106335
Approved by: https://github.com/msaroufim
2023-08-01 00:57:59 +00:00
e695b397e1 Fix broken ROCm quick start link (#104527)
The AMD ROCm docs got a new subdomain and the naming changed a bit, so the old link went 404.

This PR just updates the link to the newest quick start guide which includes the installation.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/104527
Approved by: https://github.com/pruthvistony, https://github.com/hongxiayang, https://github.com/malfet
2023-07-10 16:49:17 +00:00
93f5a82e37 Add detailed requirement of compiler in README.md (#103819)
Refer to this [issue](https://github.com/pytorch/pytorch/issues/102258), a compiler that fully supports C++17 is required, otherwise the precision of some operators will have problems for aarch64. Therefore, It will be more user-friendly to specify the gcc version especially for aarch64.

Fixes #102258

Pull Request resolved: https://github.com/pytorch/pytorch/pull/103819
Approved by: https://github.com/kit1980
2023-06-30 22:59:50 +00:00
806a642eb1 update README.md to reflect current build from source status on master (#92729)
Signed-off-by: Mike Brown <brownwm@us.ibm.com>

To avoid new contributor issues when building master a couple README.md comments will help... This change:

~~- Documents the current support restriction to apt package `g++-9` #91328 ** noting here that with the commit in https://github.com/pytorch/pytorch/pull/92911 g++-11.3 appears to build and run local tests at least as well as g++9, so this restriction may be overcome with that PR merge depending on success and CI updates.~~ (fixed now)

- Documents wip status for CUDA 12 #91122 (by forwarding to support matrix per suggestion)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/92729
Approved by: https://github.com/kit1980
2023-06-16 00:21:01 +00:00
600f7dc211 add instruction to compile with new C++ ABI (#95177)
Fixes #ISSUE_NUMBER

Pull Request resolved: https://github.com/pytorch/pytorch/pull/95177
Approved by: https://github.com/jgong5, https://github.com/mingfeima, https://github.com/kit1980
2023-06-14 22:25:26 +00:00
7ffdd4fedc Update release related information (#101819)
Update release related information. Features became more complex. Number of commits per releases have increased a lot.
We had in average:
2.5k commits for releases 1.1.0-1.7.0,
3-3.5k commits for releases  1.8.0-1.12.0
4.5k-5k commits for releases  1.13.0, 2.0.0

Hence current target is 3 releases a year
Pull Request resolved: https://github.com/pytorch/pytorch/pull/101819
Approved by: https://github.com/svekars, https://github.com/malfet
2023-05-18 20:27:16 +00:00
e762cce61f Allow cmake vars in docker build (#100867)
Fixes #100866

Pull Request resolved: https://github.com/pytorch/pytorch/pull/100867
Approved by: https://github.com/malfet
2023-05-10 17:44:30 +00:00
dfa951171a Fix typo in RELEASE.md and README.md (#100536)
Some minor spelling, grammar and typographical mistakes have been fixed in RELEASE.md & README.md files
Pull Request resolved: https://github.com/pytorch/pytorch/pull/100536
Approved by: https://github.com/ezyang
2023-05-10 05:06:45 +00:00
f0e28b1cb9 Adding the maintainers approved in 2023Q1 Core Maintainers meeting (#98520)
Added Nikita to Core Maintainers
Merged MKLDNN with CPU Performance
Renamed CUDA to GPU Performance
Added Jiong to Compiler and CPU Performance
Added Xiaobing to CPU Performance
Marking Vitaly and Jian Hui as Emeritus
Pull Request resolved: https://github.com/pytorch/pytorch/pull/98520
Approved by: https://github.com/ezyang, https://github.com/soumith, https://github.com/dzhulgakov
2023-04-24 17:58:18 +00:00
9b909cbe9a Update README.md to explain installing triton (#99464)
users building from source should know how to install triton the recommended way.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/99464
Approved by: https://github.com/msaroufim, https://github.com/alanwaketan
2023-04-19 13:48:56 +00:00
2418b94576 Rename default branch to main (#99210)
Mostly `s/@master/@main` in numerous `.yml` files.

Keep `master` in `weekly.yml` as it refers to `xla` repo and in `test_trymerge.py` as it refers to a branch PR originates from.
2023-04-16 18:48:14 -07:00
3faa636196 Clarify the instructions for setting up dev environment [skip ci] (#94155)
The `requirement.txt` file is in the PyTorch directory. The instructions to `clone` and `cd` to the PyTorch directory are in the later section under Get the PyTorch Source. So, the instructions as such gives an error that requirement.txt is not found.
```ERROR: Could not open requirements file: .. No such file or directory: 'requirements.txt' ```

This PR clarifies the usage of the command.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/94155
Approved by: https://github.com/malfet
2023-02-14 03:56:11 +00:00
c0fe5fb987 [BE] Doc Update: Python 3.7 is past End of Life (#94314)
Python 3.7 is no longer supported
Pull Request resolved: https://github.com/pytorch/pytorch/pull/94314
Approved by: https://github.com/seemethere, https://github.com/malfet
2023-02-08 17:34:45 +00:00
a719bb0e37 Readme: Fix for outdated build-from-source documentation (#91861)
## `pip install -r requirements.txt` in build-from-source documentation

This line
81b5eff3c3/README.md (L182-L188)
Is outdated. Let's default to `requirements.txt`

### My problem
Without touching this codebase for years I'm trying to build repo for local development and run unit tests. I go to `build from source => Contributing.md`. I immediately run into various problems.

* [Contributing.md](https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md#developing-pytorch) suggests one way of setting up environment different from [README.md#from-source](https://github.com/pytorch/pytorch/blob/master/README.md#from-source) that does not work for me.
* [README.md#from-source](https://github.com/pytorch/pytorch/blob/master/README.md#from-source) suggests a different set of dependencies than [`requirements.txt`](https://github.com/pytorch/pytorch/blob/master/requirements.txt), many of which are unnecessary, and there's still missing ones to run unit tests.
* Dependencies in `requirements.txt` are needed to run unit tests

So there's competing, inlined and outdated equally confident recommendations on how to set up. https://github.com/pytorch/pytorch/pull/91850 tries to remove one recommendation, this PR tries to make the default one simpler.

### Goals
* Improve society somewhat 😁
* Remove a dead end roundtrip in the developer onboarding funnel
* Update a duplicated & outdated line of documentation
* Two broken things => one broken thing
* Improve doc maintainability and nudge us to a productive discussion of what `requirements.txt` is there for.

### Non-goals
* Give a definite recommendation how to set up your machine for local development. I read the instructions in readme at this moment as an outline on how to do it.
* Say that `requirements.txt` is a definite guide to dependencies, I know it's not (but probably should be)

### Background
* Dependency handling/reproducibility in this repo is tricky! See geist of [this](fdbbd20f32/.github/requirements/README.md). There's many different sets of dependencies with different setups for different environments.
* There's been great attempts of _"one requirements.txt to rule them all"_ which got halted https://github.com/pytorch/pytorch/pull/60697/ see https://github.com/pytorch/pytorch/issues/61375
* The unofficial `requirements.txt` file seem to be .circleci/docker/requirements-ci.txt https://github.com/pytorch/pytorch/issues/72556
* Unofficial _"how to build from source"_ docs seem to be here https://github.com/pytorch/pytorch/tree/master/.circleci#how-to-build-a-binary-locally

### Considered alternatives
* a) Point only to python dependencies in `requirements.txt` **(Chosen option)**
```
conda install cmake ninja
pip install -r requirements.txt
```
This guarantees `python setup.py` to run (on my machine) and gets me one step closer to be able to `python test/run_test.py`
* b) Only add whats needed to `python setup.py install`. Point to `Contributing.md` for explanations on how to run tests (which doesn't exactly mention how yet).
```
conda create -n pytorch-source python cmake ninja pyyaml typing_extensions
conda activate pytorch-source
python setup.py develop
```
* c) Add dependencies needed to run (most) unit tests
I assume _"Install from source"_ describes how to "install so I can do development.". This is why we recommend `python setup.py develop`. Doing development implies running unit tests.
```
conda create -n pytorch-source python cmake ninja pytest click
conda activate pytorch-source
pip install -r requirements.txt xdoctest
python setup.py develop
python test/run_test.py --keep-going
```
This still eclectically goes outside the simple principle _"Use dependencies in requirements.txt"_ without solving the whole problem. Instructions to get tests to run is not the goal of this PR.

* d) Point to ex [`.circleci/docker/requirements-ci.txt`](https://github.com/pytorch/pytorch/blob/master/.circleci/docker/requirements-ci.txt) or any of the system-specific sets of pinned requirements like [`requirements-{conda-env-macOS-ARM64}.txt`](https://github.com/pytorch/pytorch/blob/master/.github/requirements/conda-env-macOS-ARM64)
I don't want to jump into this rabbit hole.

<details>
  <summary>My system according to setup.py when verifying it runs</summary>

```
Target system: Darwin-21.6.0
Target processor: arm64
Host system: Darwin-21.6.0
Host processor: arm64
Detected C compiler: AppleClang @ /Library/Developer/CommandLineTools/usr/bin/cc
CMake: 3.22.1
Make program: /opt/homebrew/Caskroom/miniconda/base/envs/pytorch-source/bin/ninja
Python version      : 3.10.8
Python executable   : /opt/homebrew/Caskroom/miniconda/base/envs/pytorch-source/bin/python
Pythonlibs version  : 3.10.8
Python library      : /opt/homebrew/Caskroom/miniconda/base/envs/pytorch-source/lib/libpython3.10.a
Python includes     : /opt/homebrew/Caskroom/miniconda/base/envs/pytorch-source/include/python3.10
Python site-packages: lib/python3.10/site-packages
```

</details>

See details in comments below.
[skip ci]
Pull Request resolved: https://github.com/pytorch/pytorch/pull/91861
Approved by: https://github.com/malfet, https://github.com/ZainRizvi
2023-02-03 00:52:23 +00:00
8dfcb59d66 Update version of Python to 3.8 in the prerequisites (#93399)
With support of Python 3.7 being deprecated, updating the prerequisites to list Python 3.8 or later.

Fixes #93256

Pull Request resolved: https://github.com/pytorch/pytorch/pull/93399
Approved by: https://github.com/atalman, https://github.com/Skylion007
2023-01-31 23:38:19 +00:00
0ecb071fc4 [BE][CI] change references from .jenkins to .ci (#92624)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/92624
Approved by: https://github.com/ZainRizvi, https://github.com/huydhn
2023-01-30 22:50:07 +00:00
2f6a975f25 Remove cffi dependency as it doesn't look like we're using it (#92738)
Maybe this will go horribly wrong in CI but works fine without it locally!

Pull Request resolved: https://github.com/pytorch/pytorch/pull/92738
Approved by: https://github.com/kit1980, https://github.com/seemethere
2023-01-22 15:03:52 +00:00
1906eaf22f [BE] Get rid of future (#92596)
PyTorch has been Python-3.X+ for ages, so it's a shame to still rely on `future.utils` even in a deprecated Caffe2 codebase

For the reference:
https://peps.python.org/pep-0469/#migrating-directly-to-python-3

Pull Request resolved: https://github.com/pytorch/pytorch/pull/92596
Approved by: https://github.com/kit1980, https://github.com/orionr
2023-01-19 08:46:50 +00:00
6790a558dd Simplify macOS build instruction (#91561)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/91561
Approved by: https://github.com/malfet
2023-01-05 00:10:16 +00:00
cyy
9710ac6531 Some CMake and CUDA cleanup given recent update to C++17 (#90599)
The main changes are:
1. Remove outdated checks for old compiler versions because they can't support C++17.
2. Remove outdated CMake checks because it now requires 3.18.
3. Remove outdated CUDA checks because we are moving to CUDA 11.

Almost all changes are in CMake files for easy audition.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/90599
Approved by: https://github.com/soumith
2022-12-30 11:19:26 +00:00
5725a44080 Remove Windows compilation dependencies installation from CI/CD scripts (#89909)
They should be already installed in the runner VM.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/89909
Approved by: https://github.com/huydhn
2022-12-23 17:40:19 +00:00
3bd37ff2d5 Removing invalid git option when updating submodules (#91132)
Same as this: https://github.com/pytorch/builder/pull/1246
Related to following git commit: 51243f9f0f
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: https://github.com/pytorch/pytorch/pull/91132
Approved by: https://github.com/kit1980, https://github.com/huydhn, https://github.com/malfet, https://github.com/seemethere
2022-12-20 02:17:02 +00:00
b2082833c6 Revert "woof (#89010)"
This reverts commit 4570bd6030c97577d2fa994857d0a022ef7563a4.

Reverted https://github.com/pytorch/pytorch/pull/89010 on behalf of https://github.com/ezyang due to whoops this actually landed
2022-11-14 21:21:09 +00:00
4570bd6030 woof (#89010)
Signed-off-by: Edward Z. Yang <ezyang@fb.com>

Differential Revision: [D41276175](https://our.internmc.facebook.com/intern/diff/D41276175)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/89010
Approved by: https://github.com/bigfootjon
2022-11-14 20:58:27 +00:00
394b998de2 sub setup.py install -> develop (#88507)
If someone is building the project from source they're likely a contributor for which develop will be much more useful. For people that want to try the latest and greatest they can leverage the nightlies

Fixes #ISSUE_NUMBER

Pull Request resolved: https://github.com/pytorch/pytorch/pull/88507
Approved by: https://github.com/malfet
2022-11-10 21:04:38 +00:00
546d68226c Update README.md (#84263)
Just fixed a couple of typos (i.e. upzipped -> unzipped) :)

Fixes #84262

Pull Request resolved: https://github.com/pytorch/pytorch/pull/84263
Approved by: https://github.com/Lezcano, https://github.com/albanD
2022-08-30 15:00:30 +00:00
938765e0b6 Add all supported Jetson platforms (#82404)
### Description
Simple README fix to add all supported Jetson platforms (Xavier NX, new Jetson Orin AGX)

### Issue
No issue was reported

### Testing
No tests required for given change
Pull Request resolved: https://github.com/pytorch/pytorch/pull/82404
Approved by: https://github.com/ezyang
2022-07-28 21:17:37 +00:00
e100e6fd4f Added note about katex install for building docs (#81550)
Currently, the version of katex that npm installs
and the version of nodejs that is installed by conda
from conda-forge are incompatible. This note describes
which version of katex to install to avoid this
Pull Request resolved: https://github.com/pytorch/pytorch/pull/81550
Approved by: https://github.com/Lezcano, https://github.com/kit1980
2022-07-15 22:30:49 +00:00
9aad40e8eb Capitalized first letters in the contents of readme table (#77953)
Fixes #ISSUE_NUMBER

Changes have been made to the table in the  readme docs
![Screenshot (98)](https://user-images.githubusercontent.com/96517901/169482656-e36f66aa-61fa-4e40-8f2d-5a833552a921.png)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/77953
Approved by: https://github.com/svekars, https://github.com/kit1980
2022-06-17 04:20:39 +00:00
5ef378a30f Fix out of date documentation & remove friction points (#78682)
Fixes various friction points with the documentation for onboarding new users and remove instructions that were no longer valid

Changes include:
- Listing prerequisites earlier, so that devs can ensure they're met before encountering error messages
- Removing linter invocations that are no longer valid
- Modifying instructions to install mkl packages to only apply to x86 based CPUs

[skip ci]
Pull Request resolved: https://github.com/pytorch/pytorch/pull/78682
Approved by: https://github.com/seemethere, https://github.com/janeyx99, https://github.com/malfet
2022-06-02 19:31:48 +00:00
8880e3a3c7 Readme update to remove old python version
Pull Request resolved: https://github.com/pytorch/pytorch/pull/76328
Approved by: https://github.com/ptrblck, https://github.com/seemethere
2022-04-28 17:10:10 +00:00
9de2beb86b Update README.md
Fixes #ISSUE_NUMBER

Pull Request resolved: https://github.com/pytorch/pytorch/pull/76369
Approved by: https://github.com/zou3519
2022-04-26 21:55:58 +00:00
bb82a700f0 Remove inaccurate confusing signal box from README.md
Replaces with HUD
Pull Request resolved: https://github.com/pytorch/pytorch/pull/74131
Approved by: https://github.com/kit1980, https://github.com/seemethere
2022-03-15 02:15:16 +00:00
6c4437118b Deprecating Python 3.6 (#70493)
Summary:
Deprecating python 3.6 from documentation and from cmake

Pull Request resolved: https://github.com/pytorch/pytorch/pull/70493

Reviewed By: suo

Differential Revision: D33433118

Pulled By: atalman

fbshipit-source-id: c3adc7b75714efdb5b6acda5d4cddc068fb4a145
2022-01-05 11:46:32 -08:00
1adb70c6f0 Revert D33409880: [pytorch][PR] Deprecating Python 3.6
Test Plan: revert-hammer

Differential Revision:
D33409880 (d95be99561)

Original commit changeset: 4f9123398960

Original Phabricator Diff: D33409880 (d95be99561)

fbshipit-source-id: 32dc1c3c07ef99a04fab7d0fb742cf4e6c4b718a
2022-01-04 16:37:09 -08:00
d95be99561 Deprecating Python 3.6 (#70493)
Summary:
Deprecating python 3.6 from documentation and from cmake

Pull Request resolved: https://github.com/pytorch/pytorch/pull/70493

Reviewed By: malfet

Differential Revision: D33409880

Pulled By: atalman

fbshipit-source-id: 4f912339896096be95b344724a4d9ae88cdf1a8f
2022-01-04 14:41:27 -08:00
bc3246453b Added explicit build command for Windows and clarification on obtaining (#70190)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/70190

C++ build tools to readme.md

Test Plan: Imported from OSS

Reviewed By: jbschlosser

Differential Revision: D33245438

Pulled By: ikriv

fbshipit-source-id: ef863d68926bd7416d0e10d24197d19392c124de
2022-01-03 14:33:59 -08:00
e70b5d64f4 Change README getting started link to explicit instructions (#66828)
Summary:
This changes the link for installing binaries to the page on pytorch.org that is entirely the download command selector (which isn't visible on a normal aspect ratio screen when the main website page first loads anymore).

This also includes some other random fixes:
* Update HUD link
* Clean ups

Fixes #{issue number}

Pull Request resolved: https://github.com/pytorch/pytorch/pull/66828

Reviewed By: malfet

Differential Revision: D31750654

Pulled By: driazati

fbshipit-source-id: aef9ceba71418f6f7648eab9a8c8a78d6c60518b
2021-10-19 14:59:48 -07:00
4c4c03124b Remove old references to 9.2 in documentation (#65059)
Summary:
Removes references in .rst and README.md and comments in the Dockerfile

Pull Request resolved: https://github.com/pytorch/pytorch/pull/65059

Reviewed By: malfet

Differential Revision: D30961110

Pulled By: janeyx99

fbshipit-source-id: 702a9a81bf08125ec4ac38bc656fc2c128c30018
2021-09-16 13:24:05 -07:00
73431449b3 update readme and contributing.md (#63843)
Summary:
1. In fact, Visual Studio isn't supported as CMAKE generator
2. I was asked many times why there's error as 'Could NOT find OpenMP'
3. Add Newly added Best Practices link in contributing.md

Pull Request resolved: https://github.com/pytorch/pytorch/pull/63843

Reviewed By: seemethere, heitorschueroff

Differential Revision: D30514095

Pulled By: janeyx99

fbshipit-source-id: 76715a1d8c049122546e5a7778cafe54e4dfd5d6
2021-08-24 10:52:11 -07:00
560cd88195 Kill THCUNN (#63429)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/63429

Test Plan: Imported from OSS

Reviewed By: mruberry

Differential Revision: D30441308

Pulled By: ngimel

fbshipit-source-id: 3ae342a2f8d5c7f8827b637c4055c5d1b0a1be26
2021-08-23 12:07:16 -07:00
89f898ebb5 Fix wrong command in README.md (#62472)
Summary:
If it is `[15^,16^)`, 16.10 is not included.
https://github.com/Microsoft/vswhere/wiki/Examples

Fixes #{issue number}

Pull Request resolved: https://github.com/pytorch/pytorch/pull/62472

Reviewed By: nairbv

Differential Revision: D30103199

Pulled By: ezyang

fbshipit-source-id: 82085627ca53cd5a4e666848d27d4ab062de8352
2021-08-04 12:55:18 -07:00
a4af91b2fe Cleanup CUDA 10.1 and 10.0 support on CI (#62597)
Summary:
10.1 is removed in https://github.com/pytorch/pytorch/pull/56056

Pull Request resolved: https://github.com/pytorch/pytorch/pull/62597

Reviewed By: walterddr

Differential Revision: D30053902

Pulled By: seemethere

fbshipit-source-id: deb148e5e44c12b08c267a36fbd4a1afa138e6e4
2021-08-02 14:42:25 -07:00
6107cf3750 Add --jobs 0 for git submodule update (#61311)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/61311

Pull Request resolved: https://github.com/pytorch/pytorch/pull/61152

Some related docs about `submodule.fetchJobs`
https://git-scm.com/docs/git-config#Documentation/git-config.txt-submodulefetchJobs

```
time git submodule update --init --recursive
________________________________________________________
Executed in  243.20 secs    fish           external
   usr time   49.64 secs  213.00 micros   49.64 secs
   sys time   29.27 secs  795.00 micros   29.27 secs
```

```
time git submodule update --init --recursive --jobs 4
________________________________________________________
Executed in  143.04 secs    fish           external
   usr time   51.06 secs  246.00 micros   51.06 secs
   sys time   30.96 secs  742.00 micros   30.96 secs
```

```
time git submodule update --init --recursive --jobs 8
________________________________________________________
Executed in  124.64 secs    fish           external
   usr time   51.76 secs  264.00 micros   51.76 secs
   sys time   30.49 secs  739.00 micros   30.49 secs

```

```
time git submodule update --init --recursive --jobs 0 # use all online cpus
 ________________________________________________________
Executed in  129.75 secs    fish           external
   usr time   51.64 secs  181.00 micros   51.64 secs
   sys time   31.49 secs  781.00 micros   31.49 secs

```

Test Plan: Imported from OSS

Reviewed By: 1ntEgr8

Differential Revision: D29560875

Pulled By: zhouzhuojie

fbshipit-source-id: 556027dffe744c66428075a8a1bf64683930aaaf
2021-07-07 16:28:18 -07:00