pytorch/.github/scripts
Nikita Shulga 3fef633333 Add CUDA-12.1 manywheel build to trunk (#99458)
As CUDA-11.7 is getting deprecated anyway.

Also, fix the problem when script actually generated the same workflow twice, overriding 11.8 ones with 11.7+11.7-with-pypi

<!--
copilot:poem
-->
### <samp>🤖 Generated by Copilot at 0c6c182</samp>

> _Oh we are the PyTorch crew and we have a job to do_
> _We build and test the manywheel package with CUDA 11.8_
> _So heave away, me hearties, heave away with all your might_
> _We'll smoke the Linux binary and make sure it runs all right_

Pull Request resolved: https://github.com/pytorch/pytorch/pull/99458
Approved by: https://github.com/dagitses, https://github.com/atalman
2023-04-19 00:13:32 +00:00
..
build_triton_wheel.py [BE] Apply ufmt to run_test and GitHub Python util scripts (#97588) 2023-03-26 04:52:55 +00:00
check_labels.py [BE] Apply ufmt to run_test and GitHub Python util scripts (#97588) 2023-03-26 04:52:55 +00:00
collect_ciflow_labels.py [BE] Apply ufmt to run_test and GitHub Python util scripts (#97588) 2023-03-26 04:52:55 +00:00
comment_on_pr.py [BE] Apply ufmt to run_test and GitHub Python util scripts (#97588) 2023-03-26 04:52:55 +00:00
convert_lintrunner_annotations_to_github.py [BE] Apply ufmt to run_test and GitHub Python util scripts (#97588) 2023-03-26 04:52:55 +00:00
ensure_actions_will_cancel.py [BE] Apply ufmt to run_test and GitHub Python util scripts (#97588) 2023-03-26 04:52:55 +00:00
export_pytorch_labels.py [BE] Apply ufmt to run_test and GitHub Python util scripts (#97588) 2023-03-26 04:52:55 +00:00
fetch_latest_green_commit.py Rename default branch to main (#99210) 2023-04-16 18:48:14 -07:00
filter_test_configs.py Handle GitHub request failure when filter test config (#96145) 2023-03-07 00:40:12 +00:00
generate_binary_build_matrix.py Add CUDA-12.1 manywheel build to trunk (#99458) 2023-04-19 00:13:32 +00:00
generate_ci_workflows.py Add CUDA-12.1 manywheel build to trunk (#99458) 2023-04-19 00:13:32 +00:00
generate_pytorch_version.py [BE] Apply ufmt to run_test and GitHub Python util scripts (#97588) 2023-03-26 04:52:55 +00:00
get_workflow_job_id.py [BE] Apply ufmt to run_test and GitHub Python util scripts (#97588) 2023-03-26 04:52:55 +00:00
github_utils.py Add ephemeral merging label (#98543) 2023-04-07 08:24:54 +00:00
gitutils.py [BE] Apply ufmt to run_test and GitHub Python util scripts (#97588) 2023-03-26 04:52:55 +00:00
gql_mocks.json Upload merge records to Rockset (#97471) 2023-03-27 18:42:00 +00:00
kill_active_ssh_sessions.ps1 .github: Enable with-ssh for Windows (#63440) 2021-08-24 14:14:27 -07:00
label_utils.py Add ephemeral merging label (#98543) 2023-04-07 08:24:54 +00:00
lint_native_functions.py [BE] Apply ufmt to run_test and GitHub Python util scripts (#97588) 2023-03-26 04:52:55 +00:00
on_cancel_merge.py remove merging label when merge is cancelled (#98967) 2023-04-13 00:45:28 +00:00
parse_ref.py [BE] Apply ufmt to run_test and GitHub Python util scripts (#97588) 2023-03-26 04:52:55 +00:00
pr-sanity-check.sh .github: Improve sanity check for generated files (#86143) 2022-10-03 23:38:55 +00:00
README.md Rename default branch to main (#99210) 2023-04-16 18:48:14 -07:00
report_git_status.sh
rockset_mocks.json trymerge to ignore certain failures (#91134) 2023-02-07 17:19:57 +00:00
run_torchbench.py [BE] Enable flake8-comprehension rule C417 (#97880) 2023-03-30 14:34:24 +00:00
stop_runner_service.sh Stop runner service when its GPU crashes (#97585) 2023-03-29 21:17:13 +00:00
test_check_labels.py [BE] Apply ufmt to run_test and GitHub Python util scripts (#97588) 2023-03-26 04:52:55 +00:00
test_fetch_latest_green_commit.py [BE] Apply ufmt to run_test and GitHub Python util scripts (#97588) 2023-03-26 04:52:55 +00:00
test_filter_test_configs.py Handle GitHub request failure when filter test config (#96145) 2023-03-07 00:40:12 +00:00
test_gitutils.py [BE] Apply ufmt to run_test and GitHub Python util scripts (#97588) 2023-03-26 04:52:55 +00:00
test_label_utils.py [BE] Apply ufmt to run_test and GitHub Python util scripts (#97588) 2023-03-26 04:52:55 +00:00
test_trymerge.py [BE] Apply ufmt to run_test and GitHub Python util scripts (#97588) 2023-03-26 04:52:55 +00:00
test_tryrebase.py Rename default branch to main (#99210) 2023-04-16 18:48:14 -07:00
trymerge.py Rename default branch to main (#99210) 2023-04-16 18:48:14 -07:00
trymerge_explainer.py Upload merge records to Rockset (#97471) 2023-03-27 18:42:00 +00:00
tryrebase.py [BE] Apply ufmt to run_test and GitHub Python util scripts (#97588) 2023-03-26 04:52:55 +00:00
update_commit_hashes.py Rename default branch to main (#99210) 2023-04-16 18:48:14 -07:00
wait_for_ssh_to_drain.ps1 .github: Enable with-ssh for Windows (#63440) 2021-08-24 14:14:27 -07:00

pytorch/.github

NOTE: This README contains information for the .github directory but cannot be located there because it will overwrite the repo README.

This directory contains workflows and scripts to support our CI infrastructure that runs on GitHub Actions.

Workflows

  • 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 main.
  • Binary CI is run to package binaries for distribution for all platforms.

Templates

Templates written in Jinja are located in the .github/templates directory and used to generate workflow files for binary jobs found in the .github/workflows/ directory. These are also a couple of utility templates used to discern common utilities that can be used amongst different templates.

(Re)Generating workflow files

You will need jinja2 in order to regenerate the workflow files which can be installed using:

pip install -r .github/requirements/regenerate-requirements.txt

Workflows can be generated / regenerated using the following command:

.github/regenerate.sh

Adding a new generated binary workflow

New generated binary workflows can be added in the .github/scripts/generate_ci_workflows.py script. You can reference examples from that script in order to add the workflow to the stream that is relevant to what you particularly care about.

Different parameters can be used to achieve different goals, i.e. running jobs on a cron, running only on trunk, etc.

ciflow (trunk)

The label ciflow/trunk can be used to run trunk only workflows. This is especially useful if trying to re-land a PR that was reverted for failing a non-default workflow.

Infra

Currently most of our self hosted runners are hosted on AWS, for a comprehensive list of available runner types you can reference .github/scale-config.yml.

Exceptions to AWS for self hosted:

  • ROCM runners

Adding new runner types

New runner types can be added by committing changes to .github/scale-config.yml. Example: https://github.com/pytorch/pytorch/pull/70474

NOTE: New runner types can only be used once the changes to .github/scale-config.yml have made their way into the default branch

Testing pytorch/builder changes

In order to test changes to the builder scripts:

  1. Specify your builder PR's branch and repo as builder_repo and builder_branch in .github/templates/common.yml.j2.
  2. Regenerate workflow files with .github/regenerate.sh (see above).
  3. Submit fake PR to PyTorch. If changing binaries build, add an appropriate label like ciflow/binaries to trigger the builds.