From 2418b945763845b645b83dd9ea9b68e5a21f56f9 Mon Sep 17 00:00:00 2001 From: Nikita Shulga Date: Sun, 16 Apr 2023 18:48:14 -0700 Subject: [PATCH] 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. --- .circleci/README.md | 36 +++++++++---------- .circleci/scripts/binary_checkout.sh | 4 +-- .github/ISSUE_TEMPLATE.md | 4 +-- .github/scripts/README.md | 4 +-- .github/scripts/fetch_latest_green_commit.py | 2 +- .github/scripts/generate_ci_workflows.py | 12 +++---- .github/scripts/test_tryrebase.py | 14 ++++---- .github/scripts/trymerge.py | 4 +-- .github/scripts/update_commit_hashes.py | 4 +-- .github/workflows/_android-build-test.yml | 4 +-- .../workflows/_android-full-build-test.yml | 4 +-- .github/workflows/_bazel-build-test.yml | 6 ++-- .github/workflows/_binary-build-linux.yml | 2 +- .github/workflows/_binary-test-linux.yml | 2 +- .github/workflows/_binary-upload.yml | 6 ++-- .github/workflows/_buck-build-test.yml | 4 +-- .github/workflows/_calculate-docker-image.yml | 2 +- .github/workflows/_docs.yml | 4 +-- .github/workflows/_ios-build-test.yml | 4 +-- .github/workflows/_linux-build.yml | 2 +- .github/workflows/_linux-test.yml | 4 +-- .github/workflows/_mac-build.yml | 2 +- .github/workflows/_mac-test-mps.yml | 2 +- .github/workflows/_mac-test.yml | 4 +-- .github/workflows/_rocm-test.yml | 4 +-- .github/workflows/_run_android_tests.yml | 4 +-- .github/workflows/_win-build.yml | 2 +- .github/workflows/_win-test.yml | 4 +-- .github/workflows/build-triton-wheel.yml | 9 +++-- .github/workflows/check-labels.yml | 2 +- .github/workflows/create_release.yml | 1 - .github/workflows/docker-builds.yml | 3 +- ...-linux-binary-libtorch-cxx11-abi-main.yml} | 2 +- ...-linux-binary-libtorch-pre-cxx11-main.yml} | 2 +- ...generated-linux-binary-manywheel-main.yml} | 2 +- ...ed-windows-binary-libtorch-debug-main.yml} | 2 +- ...-windows-binary-libtorch-release-main.yml} | 2 +- .github/workflows/inductor.yml | 1 - .github/workflows/lint.yml | 7 ++-- .github/workflows/nightly-rockset-uploads.yml | 4 +-- .github/workflows/pull.yml | 3 +- .github/workflows/scorecards.yml | 2 +- .github/workflows/trunk.yml | 1 - .github/workflows/trymerge.yml | 2 +- .github/workflows/unstable.yml | 1 - .github/workflows/update_pytorch_labels.yml | 2 +- .github/workflows/upload-test-stats.yml | 2 +- .../upload-torch-dynamo-perf-stats.yml | 2 +- CONTRIBUTING.md | 14 ++++---- README.md | 16 ++++----- RELEASE.md | 4 +-- 51 files changed, 114 insertions(+), 122 deletions(-) rename .github/workflows/{generated-linux-binary-libtorch-cxx11-abi-master.yml => generated-linux-binary-libtorch-cxx11-abi-main.yml} (99%) rename .github/workflows/{generated-linux-binary-libtorch-pre-cxx11-master.yml => generated-linux-binary-libtorch-pre-cxx11-main.yml} (99%) rename .github/workflows/{generated-linux-binary-manywheel-master.yml => generated-linux-binary-manywheel-main.yml} (99%) rename .github/workflows/{generated-windows-binary-libtorch-debug-master.yml => generated-windows-binary-libtorch-debug-main.yml} (99%) rename .github/workflows/{generated-windows-binary-libtorch-release-master.yml => generated-windows-binary-libtorch-release-main.yml} (99%) diff --git a/.circleci/README.md b/.circleci/README.md index e2429b4d1f03..569f58a1242e 100644 --- a/.circleci/README.md +++ b/.circleci/README.md @@ -106,7 +106,7 @@ All binaries are built in CircleCI workflows except Windows. There are checked-i Some quick vocab: -* A \**workflow** is a CircleCI concept; it is a DAG of '**jobs**'. ctrl-f 'workflows' on https://github.com/pytorch/pytorch/blob/master/.circleci/config.yml to see the workflows. +* A \**workflow** is a CircleCI concept; it is a DAG of '**jobs**'. ctrl-f 'workflows' on https://github.com/pytorch/pytorch/blob/main/.circleci/config.yml to see the workflows. * **jobs** are a sequence of '**steps**' * **steps** are usually just a bash script or a builtin CircleCI command. *All steps run in new environments, environment variables declared in one script DO NOT persist to following steps* * CircleCI has a **workspace**, which is essentially a cache between steps of the *same job* in which you can store artifacts between steps. @@ -117,8 +117,8 @@ The nightly binaries have 3 workflows. We have one job (actually 3 jobs: build, 1. binary_builds 1. every day midnight EST - 2. linux: https://github.com/pytorch/pytorch/blob/master/.circleci/verbatim-sources/linux-binary-build-defaults.yml - 3. macos: https://github.com/pytorch/pytorch/blob/master/.circleci/verbatim-sources/macos-binary-build-defaults.yml + 2. linux: https://github.com/pytorch/pytorch/blob/main/.circleci/verbatim-sources/linux-binary-build-defaults.yml + 3. macos: https://github.com/pytorch/pytorch/blob/main/.circleci/verbatim-sources/macos-binary-build-defaults.yml 4. For each binary configuration, e.g. linux_conda_3.7_cpu there is a 1. binary_linux_conda_3.7_cpu_build 1. Builds the build. On linux jobs this uses the 'docker executor'. @@ -133,12 +133,12 @@ The nightly binaries have 3 workflows. We have one job (actually 3 jobs: build, 2. Uploads the package 2. update_s3_htmls 1. every day 5am EST - 2. https://github.com/pytorch/pytorch/blob/master/.circleci/verbatim-sources/binary_update_htmls.yml + 2. https://github.com/pytorch/pytorch/blob/main/.circleci/verbatim-sources/binary_update_htmls.yml 3. See below for what these are for and why they're needed 4. Three jobs that each examine the current contents of aws and the conda repo and update some html files in s3 3. binarysmoketests 1. every day - 2. https://github.com/pytorch/pytorch/blob/master/.circleci/verbatim-sources/nightly-build-smoke-tests-defaults.yml + 2. https://github.com/pytorch/pytorch/blob/main/.circleci/verbatim-sources/nightly-build-smoke-tests-defaults.yml 3. For each binary configuration, e.g. linux_conda_3.7_cpu there is a 1. smoke_linux_conda_3.7_cpu 1. Downloads the package from the cloud, e.g. using the official pip or conda instructions @@ -146,26 +146,26 @@ The nightly binaries have 3 workflows. We have one job (actually 3 jobs: build, ## How are the jobs structured? -The jobs are in https://github.com/pytorch/pytorch/tree/master/.circleci/verbatim-sources. Jobs are made of multiple steps. There are some shared steps used by all the binaries/smokes. Steps of these jobs are all delegated to scripts in https://github.com/pytorch/pytorch/tree/master/.circleci/scripts . +The jobs are in https://github.com/pytorch/pytorch/tree/main/.circleci/verbatim-sources. Jobs are made of multiple steps. There are some shared steps used by all the binaries/smokes. Steps of these jobs are all delegated to scripts in https://github.com/pytorch/pytorch/tree/main/.circleci/scripts . -* Linux jobs: https://github.com/pytorch/pytorch/blob/master/.circleci/verbatim-sources/linux-binary-build-defaults.yml +* Linux jobs: https://github.com/pytorch/pytorch/blob/main/.circleci/verbatim-sources/linux-binary-build-defaults.yml * binary_linux_build.sh * binary_linux_test.sh * binary_linux_upload.sh -* MacOS jobs: https://github.com/pytorch/pytorch/blob/master/.circleci/verbatim-sources/macos-binary-build-defaults.yml +* MacOS jobs: https://github.com/pytorch/pytorch/blob/main/.circleci/verbatim-sources/macos-binary-build-defaults.yml * binary_macos_build.sh * binary_macos_test.sh * binary_macos_upload.sh -* Update html jobs: https://github.com/pytorch/pytorch/blob/master/.circleci/verbatim-sources/binary_update_htmls.yml +* Update html jobs: https://github.com/pytorch/pytorch/blob/main/.circleci/verbatim-sources/binary_update_htmls.yml * These delegate from the pytorch/builder repo - * https://github.com/pytorch/builder/blob/master/cron/update_s3_htmls.sh - * https://github.com/pytorch/builder/blob/master/cron/upload_binary_sizes.sh -* Smoke jobs (both linux and macos): https://github.com/pytorch/pytorch/blob/master/.circleci/verbatim-sources/nightly-build-smoke-tests-defaults.yml + * https://github.com/pytorch/builder/blob/main/cron/update_s3_htmls.sh + * https://github.com/pytorch/builder/blob/main/cron/upload_binary_sizes.sh +* Smoke jobs (both linux and macos): https://github.com/pytorch/pytorch/blob/main/.circleci/verbatim-sources/nightly-build-smoke-tests-defaults.yml * These delegate from the pytorch/builder repo - * https://github.com/pytorch/builder/blob/master/run_tests.sh - * https://github.com/pytorch/builder/blob/master/smoke_test.sh - * https://github.com/pytorch/builder/blob/master/check_binary.sh -* Common shared code (shared across linux and macos): https://github.com/pytorch/pytorch/blob/master/.circleci/verbatim-sources/nightly-binary-build-defaults.yml + * https://github.com/pytorch/builder/blob/main/run_tests.sh + * https://github.com/pytorch/builder/blob/main/smoke_test.sh + * https://github.com/pytorch/builder/blob/main/check_binary.sh +* Common shared code (shared across linux and macos): https://github.com/pytorch/pytorch/blob/main/.circleci/verbatim-sources/nightly-binary-build-defaults.yml * binary_checkout.sh - checks out pytorch/builder repo. Right now this also checks out pytorch/pytorch, but it shouldn't. pytorch/pytorch should just be shared through the workspace. This can handle being run before binary_populate_env.sh * binary_populate_env.sh - parses BUILD_ENVIRONMENT into the separate env variables that make up a binary configuration. Also sets lots of default values, the date, the version strings, the location of folders in s3, all sorts of things. This generally has to be run before other steps. * binary_install_miniconda.sh - Installs miniconda, cross platform. Also hacks this for the update_binary_sizes job that doesn't have the right env variables @@ -308,7 +308,7 @@ Note that the Windows Python wheels are still built in conda environments. Some * These should all be consolidated * These must run on all OS types: MacOS, Linux, and Windows -* These all run smoke tests at the moment. They inspect the packages some, maybe run a few import statements. They DO NOT run the python tests nor the cpp tests. The idea is that python tests on master and PR merges will catch all breakages. All these tests have to do is make sure the special binary machinery didn’t mess anything up. +* These all run smoke tests at the moment. They inspect the packages some, maybe run a few import statements. They DO NOT run the python tests nor the cpp tests. The idea is that python tests on main and PR merges will catch all breakages. All these tests have to do is make sure the special binary machinery didn’t mess anything up. * There are separate run_tests.sh and smoke_test.sh because one used to be called by the smoke jobs and one used to be called by the binary test jobs (see circleci structure section above). This is still true actually, but these could be united into a single script that runs these checks, given an installed pytorch package. ### Note on libtorch @@ -340,7 +340,7 @@ The Dockerfiles are available in pytorch/builder, but there is no circleci job o tl;dr make a PR that looks like https://github.com/pytorch/pytorch/pull/21159 -Sometimes we want to push a change to master and then rebuild all of today's binaries after that change. As of May 30, 2019 there isn't a way to manually run a workflow in the UI. You can manually re-run a workflow, but it will use the exact same git commits as the first run and will not include any changes. So we have to make a PR and then force circleci to run the binary workflow instead of the normal tests. The above PR is an example of how to do this; essentially you copy-paste the binarybuilds workflow steps into the default workflow steps. If you need to point the builder repo to a different commit then you'd need to change https://github.com/pytorch/pytorch/blob/master/.circleci/scripts/binary_checkout.sh#L42-L45 to checkout what you want. +Sometimes we want to push a change to mainand then rebuild all of today's binaries after that change. As of May 30, 2019 there isn't a way to manually run a workflow in the UI. You can manually re-run a workflow, but it will use the exact same git commits as the first run and will not include any changes. So we have to make a PR and then force circleci to run the binary workflow instead of the normal tests. The above PR is an example of how to do this; essentially you copy-paste the binarybuilds workflow steps into the default workflow steps. If you need to point the builder repo to a different commit then you'd need to change https://github.com/pytorch/pytorch/blob/main/.circleci/scripts/binary_checkout.sh#L42-L45 to checkout what you want. ## How to test changes to the binaries via .circleci diff --git a/.circleci/scripts/binary_checkout.sh b/.circleci/scripts/binary_checkout.sh index 29f4c6bf08a3..7bcf0b7b6431 100755 --- a/.circleci/scripts/binary_checkout.sh +++ b/.circleci/scripts/binary_checkout.sh @@ -48,7 +48,7 @@ if [[ -n "${CIRCLE_PR_NUMBER:-}" ]]; then git checkout -q -B "$CIRCLE_BRANCH" git reset --hard "$CIRCLE_SHA1" elif [[ -n "${CIRCLE_SHA1:-}" ]]; then - # Scheduled workflows & "smoke" binary build on master on PR merges + # Scheduled workflows & "smoke" binary build on trunk on PR merges DEFAULT_BRANCH="$(git remote show $CIRCLE_REPOSITORY_URL | awk '/HEAD branch/ {print $NF}')" git reset --hard "$CIRCLE_SHA1" git checkout -q -B $DEFAULT_BRANCH @@ -61,7 +61,7 @@ echo "Using Pytorch from " git --no-pager log --max-count 1 popd -# Clone the Builder master repo +# Clone the Builder main repo retry git clone -q https://github.com/pytorch/builder.git "$BUILDER_ROOT" pushd "$BUILDER_ROOT" echo "Using builder from " diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 407cab08f113..6fd1b285ed54 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -15,12 +15,12 @@ Error messages and stack traces are also helpful. ## System Info Please copy and paste the output from our -[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py) +[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/main/torch/utils/collect_env.py) (or fill out the checklist below manually). You can get the script and run it with: ``` -wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py +wget https://raw.githubusercontent.com/pytorch/pytorch/main/torch/utils/collect_env.py # For security purposes, please check the contents of collect_env.py before running it. python collect_env.py ``` diff --git a/.github/scripts/README.md b/.github/scripts/README.md index bc7dc87ac9e5..8273dd0221be 100644 --- a/.github/scripts/README.md +++ b/.github/scripts/README.md @@ -7,9 +7,9 @@ This directory contains workflows and scripts to support our CI infrastructure t ## Workflows -- Pull CI (`pull.yml`) is run on PRs and on master. +- Pull CI (`pull.yml`) is run on PRs and on main. - Trunk CI (`trunk.yml`) is run on trunk to validate incoming commits. Trunk jobs are usually more expensive to run so we do not run them on PRs unless specified. -- Scheduled CI (`periodic.yml`) is a subset of trunk CI that is run every few hours on master. +- Scheduled CI (`periodic.yml`) is a subset of trunk CI that is run every few hours on main. - Binary CI is run to package binaries for distribution for all platforms. ## Templates diff --git a/.github/scripts/fetch_latest_green_commit.py b/.github/scripts/fetch_latest_green_commit.py index bf98a9ff49b4..caeca098bb0b 100644 --- a/.github/scripts/fetch_latest_green_commit.py +++ b/.github/scripts/fetch_latest_green_commit.py @@ -35,7 +35,7 @@ def get_latest_commits() -> List[str]: "git", "rev-list", f"{latest_viable_commit}^..HEAD", - "--remotes=*origin/master", + "--remotes=*origin/main", ], encoding="ascii", ).splitlines() diff --git a/.github/scripts/generate_ci_workflows.py b/.github/scripts/generate_ci_workflows.py index b557fd91f4b2..2d503c3cf052 100755 --- a/.github/scripts/generate_ci_workflows.py +++ b/.github/scripts/generate_ci_workflows.py @@ -148,7 +148,7 @@ LINUX_BINARY_SMOKE_WORKFLOWS = [ build_configs=generate_binary_build_matrix.generate_wheels_matrix( OperatingSystem.LINUX, arches=["11.8"], python_versions=["3.8"] ), - branches="master", + branches="main", ), BinaryBuildWorkflow( os=OperatingSystem.LINUX, @@ -156,7 +156,7 @@ LINUX_BINARY_SMOKE_WORKFLOWS = [ build_configs=generate_binary_build_matrix.generate_wheels_matrix( OperatingSystem.LINUX, arches=["11.7"], python_versions=["3.8"] ), - branches="master", + branches="main", ), BinaryBuildWorkflow( os=OperatingSystem.LINUX, @@ -168,7 +168,7 @@ LINUX_BINARY_SMOKE_WORKFLOWS = [ arches=["cpu"], libtorch_variants=["shared-with-deps"], ), - branches="master", + branches="main", ), BinaryBuildWorkflow( os=OperatingSystem.LINUX, @@ -180,7 +180,7 @@ LINUX_BINARY_SMOKE_WORKFLOWS = [ arches=["cpu"], libtorch_variants=["shared-with-deps"], ), - branches="master", + branches="main", ), ] @@ -243,7 +243,7 @@ WINDOWS_BINARY_SMOKE_WORKFLOWS = [ arches=["cpu"], libtorch_variants=["shared-with-deps"], ), - branches="master", + branches="main", ), BinaryBuildWorkflow( os=OperatingSystem.WINDOWS, @@ -255,7 +255,7 @@ WINDOWS_BINARY_SMOKE_WORKFLOWS = [ arches=["cpu"], libtorch_variants=["shared-with-deps"], ), - branches="master", + branches="main", ), ] diff --git a/.github/scripts/test_tryrebase.py b/.github/scripts/test_tryrebase.py index b666d369e93a..e9a34ae0dd83 100644 --- a/.github/scripts/test_tryrebase.py +++ b/.github/scripts/test_tryrebase.py @@ -26,10 +26,10 @@ class TestRebase(TestCase): "Tests rebase successfully" pr = GitHubPR("pytorch", "pytorch", 31093) repo = GitRepo(get_git_repo_dir(), get_git_remote_name()) - rebase_onto(pr, repo, "master") + rebase_onto(pr, repo, "main") calls = [ mock.call("fetch", "origin", "pull/31093/head:pull/31093/head"), - mock.call("rebase", "refs/remotes/origin/master", "pull/31093/head"), + mock.call("rebase", "refs/remotes/origin/main", "pull/31093/head"), mock.call( "push", "-f", @@ -39,7 +39,7 @@ class TestRebase(TestCase): ] mocked_run_git.assert_has_calls(calls) self.assertTrue( - "Successfully rebased `master` onto `refs/remotes/origin/master`" + "Successfully rebased `master` onto `refs/remotes/origin/main`" in mocked_post_comment.call_args[0][3] ) @@ -88,10 +88,10 @@ class TestRebase(TestCase): "Tests branch already up to date" pr = GitHubPR("pytorch", "pytorch", 31093) repo = GitRepo(get_git_repo_dir(), get_git_remote_name()) - rebase_onto(pr, repo, "master") + rebase_onto(pr, repo, "main") calls = [ mock.call("fetch", "origin", "pull/31093/head:pull/31093/head"), - mock.call("rebase", "refs/remotes/origin/master", "pull/31093/head"), + mock.call("rebase", "refs/remotes/origin/main", "pull/31093/head"), mock.call( "push", "-f", @@ -120,9 +120,9 @@ class TestRebase(TestCase): pr = GitHubPR("pytorch", "pytorch", 31093) repo = GitRepo(get_git_repo_dir(), get_git_remote_name()) with self.assertRaisesRegex(Exception, "same sha as the target branch"): - rebase_onto(pr, repo, "master") + rebase_onto(pr, repo, "main") with self.assertRaisesRegex(Exception, "same sha as the target branch"): - rebase_ghstack_onto(pr, repo, "master") + rebase_ghstack_onto(pr, repo, "main") if __name__ == "__main__": diff --git a/.github/scripts/trymerge.py b/.github/scripts/trymerge.py index 8587a926981f..1bead30ccb90 100755 --- a/.github/scripts/trymerge.py +++ b/.github/scripts/trymerge.py @@ -436,7 +436,7 @@ CIFLOW_TRUNK_LABEL = re.compile(r"^ciflow/trunk") MERGE_RULE_PATH = Path(".github") / "merge_rules.yaml" ROCKSET_MERGES_COLLECTION = "merges" ROCKSET_MERGES_WORKSPACE = "commons" -REMOTE_MAIN_BRANCH = "origin/master" +REMOTE_MAIN_BRANCH = "origin/main" def gh_graphql(query: str, **kwargs: Any) -> Dict[str, Any]: @@ -636,7 +636,7 @@ def get_ghstack_prs(repo: GitRepo, pr: "GitHubPR") -> List[Tuple["GitHubPR", str if not are_ghstack_branches_in_sync(repo, stacked_pr.head_ref()): raise RuntimeError( f"PR {stacked_pr.pr_num} is out of sync with the corresponding revision {rev} on " - + f"branch {orig_ref} that would be merged into master. " + + f"branch {orig_ref} that would be merged into main. " + "This usually happens because there is a non ghstack change in the PR. " + f"Please sync them and try again (ex. make the changes on {orig_ref} and run ghstack)." ) diff --git a/.github/scripts/update_commit_hashes.py b/.github/scripts/update_commit_hashes.py index 8f63e2f54ac2..d29346daf063 100644 --- a/.github/scripts/update_commit_hashes.py +++ b/.github/scripts/update_commit_hashes.py @@ -50,8 +50,8 @@ def make_pr(repo_name: str, branch_name: str) -> Any: params = { "title": f"[{repo_name} hash update] update the pinned {repo_name} hash", "head": branch_name, - "base": "master", - "body": "This PR is auto-generated nightly by [this action](https://github.com/pytorch/pytorch/blob/master/" + "base": "main", + "body": "This PR is auto-generated nightly by [this action](https://github.com/pytorch/pytorch/blob/main/" + f".github/workflows/_update-commit-hash.yml).\nUpdate the pinned {repo_name} hash.", } response = git_api(f"/repos/{OWNER}/{REPO}/pulls", params, type="post") diff --git a/.github/workflows/_android-build-test.yml b/.github/workflows/_android-build-test.yml index 9f955c9678a8..295448bffb6b 100644 --- a/.github/workflows/_android-build-test.yml +++ b/.github/workflows/_android-build-test.yml @@ -36,7 +36,7 @@ jobs: keep-going: ${{ steps.filter.outputs.keep-going }} steps: - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main with: fetch-depth: 1 submodules: false @@ -64,7 +64,7 @@ jobs: # [see note: pytorch repo ref] - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main - name: Setup Linux uses: ./.github/actions/setup-linux diff --git a/.github/workflows/_android-full-build-test.yml b/.github/workflows/_android-full-build-test.yml index 45c65460a059..0391a3ab1d46 100644 --- a/.github/workflows/_android-full-build-test.yml +++ b/.github/workflows/_android-full-build-test.yml @@ -36,7 +36,7 @@ jobs: keep-going: ${{ steps.filter.outputs.keep-going }} steps: - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main with: fetch-depth: 1 submodules: false @@ -64,7 +64,7 @@ jobs: # [see note: pytorch repo ref] - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main - name: Setup Linux uses: ./.github/actions/setup-linux diff --git a/.github/workflows/_bazel-build-test.yml b/.github/workflows/_bazel-build-test.yml index 668e923cdb31..03a47867f767 100644 --- a/.github/workflows/_bazel-build-test.yml +++ b/.github/workflows/_bazel-build-test.yml @@ -40,7 +40,7 @@ jobs: keep-going: ${{ steps.filter.outputs.keep-going }} steps: - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main with: fetch-depth: 1 submodules: false @@ -68,7 +68,7 @@ jobs: # [see note: pytorch repo ref] - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main - name: Setup Linux uses: ./.github/actions/setup-linux @@ -163,7 +163,7 @@ jobs: # detached container should get cleaned up by teardown_ec2_linux export SHARD_NUMBER=0 - COMMIT_MESSAGES=$(git cherry -v "origin/${GIT_DEFAULT_BRANCH:-master}") + COMMIT_MESSAGES=$(git cherry -v "origin/${GIT_DEFAULT_BRANCH:-main}") # sanitize the input commit message and PR body here: # diff --git a/.github/workflows/_binary-build-linux.yml b/.github/workflows/_binary-build-linux.yml index 70753356648c..232807fc7824 100644 --- a/.github/workflows/_binary-build-linux.yml +++ b/.github/workflows/_binary-build-linux.yml @@ -131,7 +131,7 @@ jobs: with: github-secret: ${{ secrets.github-token }} - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main - name: Setup Linux uses: ./.github/actions/setup-linux - name: Chown workspace diff --git a/.github/workflows/_binary-test-linux.yml b/.github/workflows/_binary-test-linux.yml index 323a7ca14bb4..820008cffdb3 100644 --- a/.github/workflows/_binary-test-linux.yml +++ b/.github/workflows/_binary-test-linux.yml @@ -128,7 +128,7 @@ jobs: github-secret: ${{ secrets.github-token }} # Setup the environment - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main - name: Setup Linux uses: ./.github/actions/setup-linux - name: Chown workspace diff --git a/.github/workflows/_binary-upload.yml b/.github/workflows/_binary-upload.yml index 2dc77dba09bc..f1294913f432 100644 --- a/.github/workflows/_binary-upload.yml +++ b/.github/workflows/_binary-upload.yml @@ -10,7 +10,7 @@ on: use_s3: type: boolean default: true - description: If true, will download artifacts from s3. Otherwise will use the default github artifact download action + description: If true, will download artifacts from s3. Otherwise will use the default GitHub artifact download action PYTORCH_ROOT: required: false type: string @@ -26,7 +26,7 @@ on: DESIRED_CUDA: required: true type: string - description: Desired Cuda version + description: Desired CUDA version GPU_ARCH_VERSION: required: false type: string @@ -96,7 +96,7 @@ jobs: SHA1: ${{ github.event.pull_request.head.sha || github.sha }} steps: - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main with: no-sudo: true diff --git a/.github/workflows/_buck-build-test.yml b/.github/workflows/_buck-build-test.yml index 12860bbd1c86..1b554fa87e48 100644 --- a/.github/workflows/_buck-build-test.yml +++ b/.github/workflows/_buck-build-test.yml @@ -22,7 +22,7 @@ jobs: keep-going: ${{ steps.filter.outputs.keep-going }} steps: - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main with: fetch-depth: 1 submodules: false @@ -43,7 +43,7 @@ jobs: runs-on: ${{ matrix.runner }} steps: - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main - name: Set up JDK 8 uses: actions/setup-java@v3 diff --git a/.github/workflows/_calculate-docker-image.yml b/.github/workflows/_calculate-docker-image.yml index cb4e91f2acd4..ade5d7f858f1 100644 --- a/.github/workflows/_calculate-docker-image.yml +++ b/.github/workflows/_calculate-docker-image.yml @@ -22,7 +22,7 @@ jobs: docker-image: ${{ steps.calculate-docker-image.outputs.docker-image }} steps: - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main with: submodules: false diff --git a/.github/workflows/_docs.yml b/.github/workflows/_docs.yml index cfe36bcc04d9..eeb4b52c912d 100644 --- a/.github/workflows/_docs.yml +++ b/.github/workflows/_docs.yml @@ -76,7 +76,7 @@ jobs: # [see note: pytorch repo ref] - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main - name: Setup Linux uses: ./.github/actions/setup-linux @@ -121,7 +121,7 @@ jobs: if [[ "${GITHUB_REF}" =~ ^refs/tags/v([0-9]+\.[0-9]+)\.* ]]; then target="${BASH_REMATCH[1]}" else - target="master" + target="main" fi # detached container should get cleaned up by teardown_ec2_linux container_name=$(docker run \ diff --git a/.github/workflows/_ios-build-test.yml b/.github/workflows/_ios-build-test.yml index 99b22dda8cb1..7473862dd85c 100644 --- a/.github/workflows/_ios-build-test.yml +++ b/.github/workflows/_ios-build-test.yml @@ -43,7 +43,7 @@ jobs: keep-going: ${{ steps.filter.outputs.keep-going }} steps: - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main with: fetch-depth: 1 submodules: false @@ -67,7 +67,7 @@ jobs: steps: # [see note: pytorch repo ref] - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main - name: Populate CI build options run: | diff --git a/.github/workflows/_linux-build.yml b/.github/workflows/_linux-build.yml index 89b1c7a18c7c..0f89905991c1 100644 --- a/.github/workflows/_linux-build.yml +++ b/.github/workflows/_linux-build.yml @@ -76,7 +76,7 @@ jobs: # checkout because when we run this action we don't *have* a local # checkout. In other cases you should prefer a local checkout. - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main - name: Setup Linux uses: ./.github/actions/setup-linux diff --git a/.github/workflows/_linux-test.yml b/.github/workflows/_linux-test.yml index b59d4365d37b..6fa244d393dc 100644 --- a/.github/workflows/_linux-test.yml +++ b/.github/workflows/_linux-test.yml @@ -57,7 +57,7 @@ jobs: docker exec -it $(docker container ps --format '{{.ID}}') bash - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main - name: Setup Linux uses: ./.github/actions/setup-linux @@ -150,7 +150,7 @@ jobs: TEST_COMMAND=.ci/pytorch/test.sh fi - COMMIT_MESSAGES=$(git cherry -v "origin/${GIT_DEFAULT_BRANCH:-master}") + COMMIT_MESSAGES=$(git cherry -v "origin/${GIT_DEFAULT_BRANCH:-main}") # sanitize the input commit message and PR body here: # diff --git a/.github/workflows/_mac-build.yml b/.github/workflows/_mac-build.yml index 98be3c799d53..9ba093e6c7ed 100644 --- a/.github/workflows/_mac-build.yml +++ b/.github/workflows/_mac-build.yml @@ -75,7 +75,7 @@ jobs: # [see note: pytorch repo ref] - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main - name: Set xcode version env: diff --git a/.github/workflows/_mac-test-mps.yml b/.github/workflows/_mac-test-mps.yml index a0c566c56e38..7cefc385c0f2 100644 --- a/.github/workflows/_mac-test-mps.yml +++ b/.github/workflows/_mac-test-mps.yml @@ -40,7 +40,7 @@ jobs: keep-going: ${{ steps.filter.outputs.keep-going }} steps: - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main with: fetch-depth: 1 submodules: false diff --git a/.github/workflows/_mac-test.yml b/.github/workflows/_mac-test.yml index 583c60310b68..dbd699df7092 100644 --- a/.github/workflows/_mac-test.yml +++ b/.github/workflows/_mac-test.yml @@ -73,7 +73,7 @@ jobs: # [see note: pytorch repo ref] - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main - name: Download build artifacts uses: ./.github/actions/download-build-artifacts @@ -134,7 +134,7 @@ jobs: # shellcheck disable=SC1090 set -ex - COMMIT_MESSAGES=$(git cherry -v "origin/${GIT_DEFAULT_BRANCH:-master}") + COMMIT_MESSAGES=$(git cherry -v "origin/${GIT_DEFAULT_BRANCH:-main}") # sanitize the input commit message and PR body here: # diff --git a/.github/workflows/_rocm-test.yml b/.github/workflows/_rocm-test.yml index 7c2dd6fb3d4b..a600497eed85 100644 --- a/.github/workflows/_rocm-test.yml +++ b/.github/workflows/_rocm-test.yml @@ -56,7 +56,7 @@ jobs: steps: # [see note: pytorch repo ref] - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main with: no-sudo: true @@ -135,7 +135,7 @@ jobs: TEST_COMMAND=.ci/pytorch/test.sh fi - COMMIT_MESSAGES=$(git cherry -v "origin/${GIT_DEFAULT_BRANCH:-master}") + COMMIT_MESSAGES=$(git cherry -v "origin/${GIT_DEFAULT_BRANCH:-main}") # sanitize the input commit message and PR body here: # diff --git a/.github/workflows/_run_android_tests.yml b/.github/workflows/_run_android_tests.yml index fdb757c4d546..5f1a1c46bc07 100644 --- a/.github/workflows/_run_android_tests.yml +++ b/.github/workflows/_run_android_tests.yml @@ -22,7 +22,7 @@ jobs: keep-going: ${{ steps.filter.outputs.keep-going }} steps: - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main with: fetch-depth: 1 submodules: false @@ -45,7 +45,7 @@ jobs: steps: # [see note: pytorch repo ref] - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main - name: Setup miniconda uses: pytorch/test-infra/.github/actions/setup-miniconda@main diff --git a/.github/workflows/_win-build.yml b/.github/workflows/_win-build.yml index b2cccbc203a7..d3b1c38598bd 100644 --- a/.github/workflows/_win-build.yml +++ b/.github/workflows/_win-build.yml @@ -70,7 +70,7 @@ jobs: # [see note: pytorch repo ref] - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main with: no-sudo: true diff --git a/.github/workflows/_win-test.yml b/.github/workflows/_win-test.yml index 5c15e3ac8b5b..11e9a83eef67 100644 --- a/.github/workflows/_win-test.yml +++ b/.github/workflows/_win-test.yml @@ -97,7 +97,7 @@ jobs: # [see note: pytorch repo ref] - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main with: no-sudo: true @@ -165,7 +165,7 @@ jobs: PYTORCH_TEST_CUDA_MEM_LEAK_CHECK: ${{ matrix.mem_leak_check && '1' || '0' }} PYTORCH_TEST_RERUN_DISABLED_TESTS: ${{ matrix.rerun_disabled_tests && '1' || '0' }} run: | - COMMIT_MESSAGES=$(git cherry -v "origin/${GIT_DEFAULT_BRANCH:-master}") + COMMIT_MESSAGES=$(git cherry -v "origin/${GIT_DEFAULT_BRANCH:-main}") # sanitize the input commit message and PR body here: # diff --git a/.github/workflows/build-triton-wheel.yml b/.github/workflows/build-triton-wheel.yml index 29bb67a04f2f..aff5b1014b63 100644 --- a/.github/workflows/build-triton-wheel.yml +++ b/.github/workflows/build-triton-wheel.yml @@ -4,7 +4,6 @@ on: push: branches: - main - - master paths: - .github/workflows/build-triton-wheel.yml - .github/scripts/build_triton_wheel.py @@ -40,7 +39,7 @@ jobs: github-secret: ${{ secrets.GITHUB_TOKEN }} - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main with: submodules: false @@ -129,7 +128,7 @@ jobs: name: "pytorch-triton-wheel-3.11" path: "${{ runner.temp }}/artifacts/" - name: Upload binaries - if: ${{ github.event_name == 'push' && (github.event.ref == 'refs/heads/master' || github.event.ref == 'refs/heads/main') }} + if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' }} env: PKG_DIR: "${{ runner.temp }}/artifacts" # When running these on pull_request events these should be blank @@ -162,7 +161,7 @@ jobs: github-secret: ${{ secrets.GITHUB_TOKEN }} - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main with: submodules: false @@ -192,7 +191,7 @@ jobs: docker exec -t "${container_name}" python /pytorch/.github/scripts/build_triton_wheel.py --build-conda --py-version="${PY_VERS}" - name: Upload artifacts to Anaconda - if: ${{ github.event_name == 'push' && (github.event.ref == 'refs/heads/master' || github.event.ref == 'refs/heads/main') }} + if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' }} run: | container_name=$(docker container ps --format '{{.ID}}') docker exec -t "${container_name}" sh -c "anaconda upload /artifacts/torch*.tar.bz2 -u pytorch-nightly --label main --no-progress --force" diff --git a/.github/workflows/check-labels.yml b/.github/workflows/check-labels.yml index 5fa5fed16daf..a6b0ef19b489 100644 --- a/.github/workflows/check-labels.yml +++ b/.github/workflows/check-labels.yml @@ -15,7 +15,7 @@ jobs: runs-on: linux.20_04.4x steps: - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main with: submodules: false fetch-depth: 1 diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 59c2d871e31a..2ad28b4f14a0 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -4,7 +4,6 @@ on: push: tags: ['v*'] branches: - - master - main - nightly release: diff --git a/.github/workflows/docker-builds.yml b/.github/workflows/docker-builds.yml index 4fc2954c1ca1..c67bbcd5788b 100644 --- a/.github/workflows/docker-builds.yml +++ b/.github/workflows/docker-builds.yml @@ -8,7 +8,6 @@ on: - .github/workflows/docker-builds.yml push: branches: - - master - main - release/* - landchecks/* @@ -60,7 +59,7 @@ jobs: # [see note: pytorch repo ref] # deep clone (fetch-depth 0) required for git merge-base - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main - name: Setup Linux uses: ./.github/actions/setup-linux diff --git a/.github/workflows/generated-linux-binary-libtorch-cxx11-abi-master.yml b/.github/workflows/generated-linux-binary-libtorch-cxx11-abi-main.yml similarity index 99% rename from .github/workflows/generated-linux-binary-libtorch-cxx11-abi-master.yml rename to .github/workflows/generated-linux-binary-libtorch-cxx11-abi-main.yml index 76bfe089aa55..8f3901373e5f 100644 --- a/.github/workflows/generated-linux-binary-libtorch-cxx11-abi-master.yml +++ b/.github/workflows/generated-linux-binary-libtorch-cxx11-abi-main.yml @@ -7,7 +7,7 @@ name: linux-binary-libtorch-cxx11-abi on: push: branches: - - master + - main tags: - 'ciflow/trunk/*' workflow_dispatch: diff --git a/.github/workflows/generated-linux-binary-libtorch-pre-cxx11-master.yml b/.github/workflows/generated-linux-binary-libtorch-pre-cxx11-main.yml similarity index 99% rename from .github/workflows/generated-linux-binary-libtorch-pre-cxx11-master.yml rename to .github/workflows/generated-linux-binary-libtorch-pre-cxx11-main.yml index 39e41e67853a..a2f6daee4ac8 100644 --- a/.github/workflows/generated-linux-binary-libtorch-pre-cxx11-master.yml +++ b/.github/workflows/generated-linux-binary-libtorch-pre-cxx11-main.yml @@ -7,7 +7,7 @@ name: linux-binary-libtorch-pre-cxx11 on: push: branches: - - master + - main tags: - 'ciflow/trunk/*' workflow_dispatch: diff --git a/.github/workflows/generated-linux-binary-manywheel-master.yml b/.github/workflows/generated-linux-binary-manywheel-main.yml similarity index 99% rename from .github/workflows/generated-linux-binary-manywheel-master.yml rename to .github/workflows/generated-linux-binary-manywheel-main.yml index 684cc8fe0fa5..ba6547187a84 100644 --- a/.github/workflows/generated-linux-binary-manywheel-master.yml +++ b/.github/workflows/generated-linux-binary-manywheel-main.yml @@ -7,7 +7,7 @@ name: linux-binary-manywheel on: push: branches: - - master + - main tags: - 'ciflow/trunk/*' workflow_dispatch: diff --git a/.github/workflows/generated-windows-binary-libtorch-debug-master.yml b/.github/workflows/generated-windows-binary-libtorch-debug-main.yml similarity index 99% rename from .github/workflows/generated-windows-binary-libtorch-debug-master.yml rename to .github/workflows/generated-windows-binary-libtorch-debug-main.yml index 754705bdcbc0..1289ad5ba013 100644 --- a/.github/workflows/generated-windows-binary-libtorch-debug-master.yml +++ b/.github/workflows/generated-windows-binary-libtorch-debug-main.yml @@ -7,7 +7,7 @@ name: windows-binary-libtorch-debug on: push: branches: - - master + - main tags: - 'ciflow/trunk/*' workflow_dispatch: diff --git a/.github/workflows/generated-windows-binary-libtorch-release-master.yml b/.github/workflows/generated-windows-binary-libtorch-release-main.yml similarity index 99% rename from .github/workflows/generated-windows-binary-libtorch-release-master.yml rename to .github/workflows/generated-windows-binary-libtorch-release-main.yml index b004c66542dc..6b2e198f4193 100644 --- a/.github/workflows/generated-windows-binary-libtorch-release-master.yml +++ b/.github/workflows/generated-windows-binary-libtorch-release-main.yml @@ -7,7 +7,7 @@ name: windows-binary-libtorch-release on: push: branches: - - master + - main tags: - 'ciflow/trunk/*' workflow_dispatch: diff --git a/.github/workflows/inductor.yml b/.github/workflows/inductor.yml index 711b0f86a424..c6edef17a229 100644 --- a/.github/workflows/inductor.yml +++ b/.github/workflows/inductor.yml @@ -3,7 +3,6 @@ name: inductor on: push: branches: - - master - main tags: - ciflow/inductor/* diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 44b8db3dda2d..9baa5a09e0b0 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -4,7 +4,6 @@ on: pull_request: push: branches: - - master - main - release/* - landchecks/* @@ -108,7 +107,7 @@ jobs: if: github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'skip-pr-sanity-checks') steps: - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main with: submodules: false fetch-depth: -1 @@ -146,7 +145,7 @@ jobs: echo ' .github/scripts/generate_ci_workflows.py' echo echo 'If running that command does nothing, you may need to rebase' - echo 'onto a more recent commit from the PyTorch master branch.' + echo 'onto a more recent commit from the PyTorch main branch.' RC=1 fi @@ -221,7 +220,7 @@ jobs: # [see note: pytorch repo ref] # deep clone (fetch-depth 0) required, to allow us to use git log - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main with: submodules: false fetch-depth: 1 diff --git a/.github/workflows/nightly-rockset-uploads.yml b/.github/workflows/nightly-rockset-uploads.yml index 6977b6233000..ad4e095d8cc0 100644 --- a/.github/workflows/nightly-rockset-uploads.yml +++ b/.github/workflows/nightly-rockset-uploads.yml @@ -15,7 +15,7 @@ jobs: runs-on: [self-hosted, linux.2xlarge] steps: - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main with: fetch-depth: 1 submodules: false @@ -38,4 +38,4 @@ jobs: echo "Uploading testing aggregate data" "$(date -d yesterday '+%Y-%m-%d')" python3 -m tools.stats.upload_test_stat_aggregates --date "$(date -d yesterday '+%Y-%m-%d')" echo "Uploading external contribution stats for" "$(date -d yesterday '+%Y-%m-%d')" - python3 -m tools.stats.upload_external_contrib_stats --startDate "$(date -d yesterday '+%Y-%m-%d')" \ No newline at end of file + python3 -m tools.stats.upload_external_contrib_stats --startDate "$(date -d yesterday '+%Y-%m-%d')" diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml index 5bfd86f3b65f..d1997b143c2d 100644 --- a/.github/workflows/pull.yml +++ b/.github/workflows/pull.yml @@ -4,7 +4,6 @@ on: pull_request: push: branches: - - master - main - release/* - landchecks/* @@ -355,7 +354,7 @@ jobs: ]} linux-focal-rocm5_4_2-py3_8-build: - # don't run build twice on master + # don't run build twice on main if: github.event_name == 'pull_request' name: linux-focal-rocm5.4.2-py3.8 uses: ./.github/workflows/_linux-build.yml diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml index 8abee79cf400..cd4258c47876 100644 --- a/.github/workflows/scorecards.yml +++ b/.github/workflows/scorecards.yml @@ -6,7 +6,7 @@ on: schedule: - cron: '32 16 * * 3' push: - branches: [ "master" ] + branches: [ "main" ] # Declare default permissions as read only. permissions: read-all diff --git a/.github/workflows/trunk.yml b/.github/workflows/trunk.yml index e71972e109b2..ed877a6ecad9 100644 --- a/.github/workflows/trunk.yml +++ b/.github/workflows/trunk.yml @@ -3,7 +3,6 @@ name: trunk on: push: branches: - - master - main - release/* - landchecks/* diff --git a/.github/workflows/trymerge.yml b/.github/workflows/trymerge.yml index 5da7cc114c25..7a7b46b37154 100644 --- a/.github/workflows/trymerge.yml +++ b/.github/workflows/trymerge.yml @@ -44,7 +44,7 @@ jobs: set -ex if [ -n "${REBASE}" ]; then python3 .github/scripts/tryrebase.py "${PR_NUM}" --branch "${REBASE}" - git checkout master + git checkout main git fetch -p # give github some time between the push and start workflows so that Github's messages # on the PR appear in chronological order (timing issues can shuffle them around) diff --git a/.github/workflows/unstable.yml b/.github/workflows/unstable.yml index b6ddf081184e..362a0731bfad 100644 --- a/.github/workflows/unstable.yml +++ b/.github/workflows/unstable.yml @@ -3,7 +3,6 @@ name: unstable on: push: branches: - - master - main tags: - ciflow/unstable/* diff --git a/.github/workflows/update_pytorch_labels.yml b/.github/workflows/update_pytorch_labels.yml index 5d5a05cc8927..81dc264cbcd6 100644 --- a/.github/workflows/update_pytorch_labels.yml +++ b/.github/workflows/update_pytorch_labels.yml @@ -14,7 +14,7 @@ jobs: if: ${{ github.repository == 'pytorch/pytorch' }} steps: - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main with: fetch-depth: 1 submodules: false diff --git a/.github/workflows/upload-test-stats.yml b/.github/workflows/upload-test-stats.yml index acd2f98ea4fc..ec1b4e22a731 100644 --- a/.github/workflows/upload-test-stats.yml +++ b/.github/workflows/upload-test-stats.yml @@ -37,7 +37,7 @@ jobs: run: echo "${TRIGGERING_WORKFLOW}" - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main - run: | pip3 install requests==2.26 diff --git a/.github/workflows/upload-torch-dynamo-perf-stats.yml b/.github/workflows/upload-torch-dynamo-perf-stats.yml index 6bcc163ce4d2..3164766cdac1 100644 --- a/.github/workflows/upload-torch-dynamo-perf-stats.yml +++ b/.github/workflows/upload-torch-dynamo-perf-stats.yml @@ -28,7 +28,7 @@ jobs: name: Upload dynamo performance stats for ${{ github.event.workflow_run.id }}, attempt ${{ github.event.workflow_run.run_attempt }} steps: - name: Checkout PyTorch - uses: pytorch/pytorch/.github/actions/checkout-pytorch@master + uses: pytorch/pytorch/.github/actions/checkout-pytorch@main with: submodules: false fetch-depth: 1 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b8e4b86191e5..286b34a52338 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1060,7 +1060,7 @@ Note: There's a [compilation issue](https://github.com/oneapi-src/oneDNN/issues/ linter and static analysis tool based on the clang compiler. We run clang-tidy in our CI to make sure that new C++ code is safe, sane and efficient. See the [`clang-tidy` job in our GitHub Workflow's -lint.yml file](https://github.com/pytorch/pytorch/blob/master/.github/workflows/lint.yml) +lint.yml file](https://github.com/pytorch/pytorch/blob/main/.github/workflows/lint.yml) for the simple commands we use for this. To run clang-tidy locally, follow these steps: @@ -1100,7 +1100,7 @@ If you have already committed files and CI reports `flake8` errors, you can run the check locally in your PR branch with: ```bash - flake8 $(git diff --name-only $(git merge-base --fork-point master)) + flake8 $(git diff --name-only $(git merge-base --fork-point main)) ``` You'll need to install an appropriately configured flake8; see @@ -1241,11 +1241,11 @@ our [CI wiki](https://github.com/pytorch/pytorch/wiki/Debugging-using-with-ssh-f ### Which commit is used in CI? -For CI run on `master`, this repository is checked out for a given `master` +For CI run on `main`, this repository is checked out for a given `main` commit, and CI is run on that commit (there isn't really any other choice). For PRs, however, it's a bit more complicated. Consider this commit graph, where -`master` is at commit `A`, and the branch for PR #42 (just a placeholder) is at +`main` is at commit `A`, and the branch for PR #42 (just a placeholder) is at commit `B`: ``` @@ -1253,7 +1253,7 @@ commit `B`: / \ / C (refs/pull/42/merge) / / ----o---o---o---A (merge-destination) - usually master +---o---o---o---A (merge-destination) - usually main ``` There are two possible choices for which commit to use: @@ -1261,7 +1261,7 @@ There are two possible choices for which commit to use: 1. Checkout commit `B`, the head of the PR (manually committed by the PR author). 2. Checkout commit `C`, the hypothetical result of what would happen if the PR - were merged into it's destination (usually `master`). + were merged into it's destination (usually `main`). For all practical purposes, most people can think of the commit being used as commit `B` (choice **1**). @@ -1269,7 +1269,7 @@ commit `B` (choice **1**). However, if workflow files (which govern CI behavior) were modified (either by your PR or since dev branch were created ) there's a nuance to know about: The workflow files themselves get taken from checkpoint `C`, the merger of your -PR and the `master` branch. But only the workflow files get taken from that merged +PR and the `main` branch. But only the workflow files get taken from that merged checkpoint. Everything else (tests, code, etc) all get taken directly from your PR's commit (commit `B`). Please note, this scenario would never affect PRs authored by `ghstack` as they would not automatically ingest the updates from default branch. diff --git a/README.md b/README.md index 087171c76133..1f652d5fdbb5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![PyTorch Logo](https://github.com/pytorch/pytorch/blob/master/docs/source/_static/img/pytorch-logo-dark.png) +![PyTorch Logo](https://github.com/pytorch/pytorch/blob/main/docs/source/_static/img/pytorch-logo-dark.png) -------------------------------------------------------------------------------- @@ -8,7 +8,7 @@ PyTorch is a Python package that provides two high-level features: You can reuse your favorite Python packages such as NumPy, SciPy, and Cython to extend PyTorch when needed. -Our trunk health (Continuous Integration signals) can be found at [hud.pytorch.org](https://hud.pytorch.org/ci/pytorch/pytorch/master). +Our trunk health (Continuous Integration signals) can be found at [hud.pytorch.org](https://hud.pytorch.org/ci/pytorch/pytorch/main). @@ -93,7 +93,7 @@ from several research papers on this topic, as well as current and past work suc While this technique is not unique to PyTorch, it's one of the fastest implementations of it to date. You get the best of speed and flexibility for your crazy research. -![Dynamic graph](https://github.com/pytorch/pytorch/blob/master/docs/source/_static/img/dynamic_graph.gif) +![Dynamic graph](https://github.com/pytorch/pytorch/blob/main/docs/source/_static/img/dynamic_graph.gif) ### Python First @@ -264,7 +264,7 @@ Professional, or Community Editions. You can also install the build tools from https://visualstudio.microsoft.com/visual-cpp-build-tools/. The build tools *do not* come with Visual Studio Code by default. -If you want to build legacy python code, please refer to [Building on legacy code and CUDA](https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md#building-on-legacy-code-and-cuda) +If you want to build legacy python code, please refer to [Building on legacy code and CUDA](https://github.com/pytorch/pytorch/blob/main/CONTRIBUTING.md#building-on-legacy-code-and-cuda) **CPU-only builds** @@ -275,7 +275,7 @@ conda activate python setup.py develop ``` -Note on OpenMP: The desired OpenMP implementation is Intel OpenMP (iomp). In order to link against iomp, you'll need to manually download the library and set up the building environment by tweaking `CMAKE_INCLUDE_PATH` and `LIB`. The instruction [here](https://github.com/pytorch/pytorch/blob/master/docs/source/notes/windows.rst#building-from-source) is an example for setting up both MKL and Intel OpenMP. Without these configurations for CMake, Microsoft Visual C OpenMP runtime (vcomp) will be used. +Note on OpenMP: The desired OpenMP implementation is Intel OpenMP (iomp). In order to link against iomp, you'll need to manually download the library and set up the building environment by tweaking `CMAKE_INCLUDE_PATH` and `LIB`. The instruction [here](https://github.com/pytorch/pytorch/blob/main/docs/source/notes/windows.rst#building-from-source) is an example for setting up both MKL and Intel OpenMP. Without these configurations for CMake, Microsoft Visual C OpenMP runtime (vcomp) will be used. **CUDA based build** @@ -289,9 +289,9 @@ Currently, VS 2017 / 2019, and Ninja are supported as the generator of CMake. If
If Ninja is selected as the generator, the latest MSVC will get selected as the underlying toolchain. Additional libraries such as -[Magma](https://developer.nvidia.com/magma), [oneDNN, a.k.a MKLDNN or DNNL](https://github.com/oneapi-src/oneDNN), and [Sccache](https://github.com/mozilla/sccache) are often needed. Please refer to the [installation-helper](https://github.com/pytorch/pytorch/tree/master/.ci/pytorch/win-test-helpers/installation-helpers) to install them. +[Magma](https://developer.nvidia.com/magma), [oneDNN, a.k.a MKLDNN or DNNL](https://github.com/oneapi-src/oneDNN), and [Sccache](https://github.com/mozilla/sccache) are often needed. Please refer to the [installation-helper](https://github.com/pytorch/pytorch/tree/main/.ci/pytorch/win-test-helpers/installation-helpers) to install them. -You can refer to the [build_pytorch.bat](https://github.com/pytorch/pytorch/blob/master/.ci/pytorch/win-test-helpers/build_pytorch.bat) script for some other environment variables configurations +You can refer to the [build_pytorch.bat](https://github.com/pytorch/pytorch/blob/main/.ci/pytorch/win-test-helpers/build_pytorch.bat) script for some other environment variables configurations ```cmd @@ -397,7 +397,7 @@ Three-pointers to get you started: - [Tutorials: get you started with understanding and using PyTorch](https://pytorch.org/tutorials/) - [Examples: easy to understand PyTorch code across all domains](https://github.com/pytorch/examples) - [The API Reference](https://pytorch.org/docs/) -- [Glossary](https://github.com/pytorch/pytorch/blob/master/GLOSSARY.md) +- [Glossary](https://github.com/pytorch/pytorch/blob/main/GLOSSARY.md) ## Resources diff --git a/RELEASE.md b/RELEASE.md index d1f6141236c2..86c689442a76 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -150,7 +150,7 @@ git push origin v1.12.0-rc2 Pushing a release candidate should trigger the `binary_builds` workflow within CircleCI using [`pytorch/pytorch-probot`](https://github.com/pytorch/pytorch-probot)'s [`trigger-circleci-workflows`](trigger-circleci-workflows) functionality. -This trigger functionality is configured here: [`pytorch-circleci-labels.yml`](https://github.com/pytorch/pytorch/blob/master/.github/pytorch-circleci-labels.yml) +This trigger functionality is configured here: [`pytorch-circleci-labels.yml`](https://github.com/pytorch/pytorch/blob/main/.github/pytorch-circleci-labels.yml) To view the state of the release build, please navigate to [HUD](https://hud.pytorch.org/hud/pytorch/pytorch/release%2F1.12). and make sure all binary builds are successful. ### Release Candidate Storage @@ -190,7 +190,7 @@ Please also make sure to add milestone target to the PR/issue, especially if it ## Promoting RCs to Stable Promotion of RCs to stable is done with this script: -[`pytorch/builder:release/promote.sh`](https://github.com/pytorch/builder/blob/master/release/promote.sh) +[`pytorch/builder:release/promote.sh`](https://github.com/pytorch/builder/blob/main/release/promote.sh) Users of that script should take care to update the versions necessary for the specific packages you are attempting to promote.