• Home
Name Date Size #Lines LOC

..--

amd/04-Jul-2025-206158

s390x-ci/04-Jul-2025-362252

README.mdD04-Jul-20253 KiB6743

build_triton_wheel.pyD04-Jul-20257.4 KiB224184

check_labels.pyD04-Jul-20251.8 KiB6343

cherry_pick.pyD04-Jul-20259.1 KiB313250

close_nonexistent_disable_issues.pyD04-Jul-20255.1 KiB189154

collect_ciflow_labels.pyD04-Jul-20252.5 KiB7557

comment_on_pr.pyD04-Jul-20251.2 KiB3827

convert_lintrunner_annotations_to_github.pyD04-Jul-20251.7 KiB7052

delete_old_branches.pyD04-Jul-202510.2 KiB316258

docathon-label-sync.pyD04-Jul-20251.6 KiB5340

drci_mocks.json.gzD04-Jul-20258.9 KiB1,6671,666

ensure_actions_will_cancel.pyD04-Jul-20252.5 KiB7562

export_pytorch_labels.pyD04-Jul-20251.1 KiB4025

file_io_utils.pyD04-Jul-20252.9 KiB10270

filter_test_configs.pyD04-Jul-202522.2 KiB635439

generate_binary_build_matrix.pyD04-Jul-202517.4 KiB442371

generate_ci_workflows.pyD04-Jul-202514.7 KiB447405

generate_docker_release_matrix.pyD04-Jul-20251.5 KiB5640

generate_pytorch_version.pyD04-Jul-20253.5 KiB12495

get_aws_session_tokens.pyD04-Jul-2025405 148

get_workflow_job_id.pyD04-Jul-20255.5 KiB162112

github_utils.pyD04-Jul-20256.8 KiB221179

gitutils.pyD04-Jul-202515.6 KiB453371

gql_mocks.json.gzD04-Jul-2025664.5 KiB203,865203,864

kill_active_ssh_sessions.ps1D04-Jul-2025261 129

label_utils.pyD04-Jul-20254.2 KiB12789

lint_native_functions.pyD04-Jul-20252.2 KiB6246

lintrunner.shD04-Jul-20251.9 KiB4930

parse_ref.pyD04-Jul-2025734 3021

pr-sanity-check.shD04-Jul-20251.7 KiB6146

pytest_cache.pyD04-Jul-20253.2 KiB11694

pytest_caching_utils.pyD04-Jul-20258.8 KiB265187

report_git_status.shD04-Jul-2025107 64

rockset_mocks.json.gzD04-Jul-2025208.1 KiB72,57272,571

runner_determinator.pyD04-Jul-202510.6 KiB321257

stop_runner_service.shD04-Jul-2025861 2511

sync_distributed_folder_prototype.shD04-Jul-20251.2 KiB3625

tag_docker_images_for_release.pyD04-Jul-20251.8 KiB6554

td_llm_indexer.shD04-Jul-2025374 2214

test_check_labels.pyD04-Jul-20255.1 KiB144122

test_filter_test_configs.pyD04-Jul-202537 KiB877827

test_gitutils.pyD04-Jul-20253 KiB10378

test_label_utils.pyD04-Jul-20253.3 KiB9681

test_pytest_caching_utils.pyD04-Jul-20253.1 KiB8572

test_trymerge.pyD04-Jul-202541.7 KiB1,118924

test_tryrebase.pyD04-Jul-20256.5 KiB170155

trymerge.pyD04-Jul-202580.5 KiB2,4062,006

trymerge_explainer.pyD04-Jul-20253.2 KiB10184

tryrebase.pyD04-Jul-20258.8 KiB249196

wait_for_ssh_to_drain.ps1D04-Jul-2025582 1814

README.md

1# pytorch/.github
2
3> NOTE: This README contains information for the `.github` directory but cannot be located there because it will overwrite the
4repo README.
5
6This directory contains workflows and scripts to support our CI infrastructure that runs on GitHub Actions.
7
8## Workflows
9
10- Pull CI (`pull.yml`) is run on PRs and on main.
11- 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.
12- Scheduled CI (`periodic.yml`) is a subset of trunk CI that is run every few hours on main.
13- Binary CI is run to package binaries for distribution for all platforms.
14
15## Templates
16
17Templates written in [Jinja](https://jinja.palletsprojects.com/en/3.0.x/) are located in the `.github/templates` directory
18and used to generate workflow files for binary jobs found in the `.github/workflows/` directory. These are also a
19couple of utility templates used to discern common utilities that can be used amongst different templates.
20
21### (Re)Generating workflow files
22
23You will need `jinja2` in order to regenerate the workflow files which can be installed using:
24```bash
25pip install -r .github/requirements/regenerate-requirements.txt
26```
27
28Workflows can be generated / regenerated using the following command:
29```bash
30.github/regenerate.sh
31```
32
33### Adding a new generated binary workflow
34
35New generated binary workflows can be added in the `.github/scripts/generate_ci_workflows.py` script. You can reference
36examples from that script in order to add the workflow to the stream that is relevant to what you particularly
37care about.
38
39Different parameters can be used to achieve different goals, i.e. running jobs on a cron, running only on trunk, etc.
40
41#### ciflow (trunk)
42
43The label `ciflow/trunk` can be used to run `trunk` only workflows. This is especially useful if trying to re-land a PR that was
44reverted for failing a `non-default` workflow.
45
46## Infra
47
48Currently most of our self hosted runners are hosted on AWS, for a comprehensive list of available runner types you
49can reference `.github/scale-config.yml`.
50
51Exceptions to AWS for self hosted:
52* ROCM runners
53
54### Adding new runner types
55
56New runner types can be added by committing changes to `.github/scale-config.yml`. Example: https://github.com/pytorch/pytorch/pull/70474
57
58> NOTE: New runner types can only be used once the changes to `.github/scale-config.yml` have made their way into the default branch
59
60### Testing [pytorch/builder](https://github.com/pytorch/builder) changes
61
62In order to test changes to the builder scripts:
63
641. Specify your builder PR's branch and repo as `builder_repo` and  `builder_branch` in [`.github/templates/common.yml.j2`](https://github.com/pytorch/pytorch/blob/32356aaee6a77e0ae424435a7e9da3d99e7a4ca5/.github/templates/common.yml.j2#LL10C26-L10C32).
652. Regenerate workflow files with `.github/regenerate.sh` (see above).
663. Submit fake PR to PyTorch. If changing binaries build, add an appropriate label like `ciflow/binaries` to trigger the builds.
67