Skip to content

Commit b580e89

Browse files
author
Michael Andreas Dagitses
committed
Update on "move //tools/codegen:codegen into shared build structure"
This is currently only used by Buck. Differential Revision: [D34971529](https://our.internmc.facebook.com/intern/diff/D34971529/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D34971529/)! [ghstack-poisoned]
2 parents f87b30d + a05d981 commit b580e89

File tree

182 files changed

+12413
-2867
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

182 files changed

+12413
-2867
lines changed

.circleci/docker/build.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,21 +222,21 @@ case "$image" in
222222
DB=yes
223223
VISION=yes
224224
;;
225-
pytorch-linux-bionic-rocm4.3.1-py3.7)
225+
pytorch-linux-bionic-rocm4.5-py3.7)
226226
ANACONDA_PYTHON_VERSION=3.7
227227
GCC_VERSION=9
228228
PROTOBUF=yes
229229
DB=yes
230230
VISION=yes
231-
ROCM_VERSION=4.3.1
231+
ROCM_VERSION=4.5.2
232232
;;
233-
pytorch-linux-bionic-rocm4.5-py3.7)
233+
pytorch-linux-bionic-rocm5.0-py3.7)
234234
ANACONDA_PYTHON_VERSION=3.7
235235
GCC_VERSION=9
236236
PROTOBUF=yes
237237
DB=yes
238238
VISION=yes
239-
ROCM_VERSION=4.5.2
239+
ROCM_VERSION=5.0
240240
;;
241241
*)
242242
# Catch-all for builds that are not hardcoded.

.circleci/docker/common/install_rocm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ ver() {
3535
}
3636

3737
# Map ROCm version to AMDGPU version
38-
declare -A AMDGPU_VERSIONS=( ["4.5.2"]="21.40.2" )
38+
declare -A AMDGPU_VERSIONS=( ["4.5.2"]="21.40.2" ["5.0"]="21.50" )
3939

4040
install_ubuntu() {
4141
apt-get update

.github/actions/teardown-linux/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ name: Teardown Linux
33
description: Stuff that should always run at the end of a linux job
44

55
inputs:
6-
wait-ssh:
7-
description: If set, wait for ssh to drain before tearing down
6+
skip-wait-ssh:
7+
description: If set, don't wait for ssh to drain before tearing down
88
required: false
99
default: ""
1010

@@ -15,7 +15,7 @@ runs:
1515
# TODO working-directory: !{{ pytorch_directory }}
1616
# Always hold for active ssh sessions
1717
shell: bash
18-
if: inputs.wait-ssh != ''
18+
if: inputs.skip-wait-ssh == ''
1919
run: .github/scripts/wait_for_ssh_to_drain.sh
2020

2121
- name: Kill containers, clean up images

.github/merge_rules.json

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
{
2727
"name": "OSS CI",
2828
"patterns": [".github/**", ".circleci/**", ".jenkins/**", "scripts/**", "tools/**"],
29-
"approved_by": ["janeyx99", "ezyang", "atalman"],
29+
"approved_by": ["ezyang", "pytorch/pytorch-dev-infra"],
3030
"mandatory_checks_name": ["Facebook CLA Check", "Lint"]
3131
},
3232
{
@@ -36,62 +36,86 @@
3636
"mandatory_checks_name": ["Facebook CLA Check", "Lint"]
3737
},
3838
{
39-
"name": "Android",
40-
"patterns": ["android/**", "test/mobile/**"],
41-
"approved_by": ["linbinyu", "kit1980", "IvanKobzarev"],
42-
"mandatory_checks_name": ["Facebook CLA Check", "Lint"]
43-
},
44-
{
45-
"name": "iOS",
46-
"patterns": ["ios/**", "test/mobile/**"],
47-
"approved_by": ["linbinyu", "kit1980", "xta0", "hanton"],
39+
"name": "Mobile",
40+
"patterns": ["ios/**", "android/**", "test/mobile/**"],
41+
"approved_by": ["linbinyu", "kit1980", "IvanKobzarev", "dreiss"],
4842
"mandatory_checks_name": ["Facebook CLA Check", "Lint"]
4943
},
5044
{
5145
"name": "superuser",
5246
"patterns": ["*"],
5347
"approved_by": [
48+
"aaronenyeshi",
49+
"alanwaketan",
5450
"albanD",
51+
"angelayi",
52+
"anijain2305",
5553
"anjali411",
54+
"ansley",
5655
"awgu",
56+
"bertmaher",
5757
"bdhirsh",
5858
"cbalioglu",
59+
"Chillee",
5960
"cpuhrsch",
6061
"dagitses",
62+
"davidberard98",
63+
"desertfire",
64+
"eellison",
6165
"ejguan",
6266
"ezyang",
6367
"fduwjj",
68+
"Gamrix",
6469
"gchanan",
6570
"george-qi",
71+
"gmagogsfm",
72+
"hlu1",
73+
"huiguoo",
6674
"H-Huang",
6775
"jaceyca",
6876
"jamesr66a",
77+
"jansel",
6978
"jbschlosser",
7079
"jiayisuse",
80+
"Krovatkin",
7181
"kumpera",
7282
"kwen2501",
7383
"malfet",
7484
"mikaylagawarecki",
85+
"mikeiovine",
7586
"mingzhe09088",
7687
"mrshenli",
7788
"mruberry",
89+
"navahgar",
7890
"ngimel",
91+
"NicolasHug",
92+
"nikithamalgifb",
7993
"NivekT",
8094
"osalpekar",
95+
"PaliC",
8196
"pbelevich",
8297
"pritamdamania87",
98+
"qihqi",
99+
"robieta",
83100
"rohan-varma",
84101
"saketh-are",
85102
"samdow",
86103
"seemethere",
87104
"SherlockNoMad",
105+
"shunting314",
88106
"soulitzer",
89107
"suo",
108+
"tugsbayasgalan",
90109
"VitalyFedyunin",
110+
"vmoens",
91111
"wanchaol",
112+
"wconstab",
92113
"wenleix",
93114
"yaroslavvb",
115+
"zdevito",
94116
"zhaojuanmao",
117+
"zhxchen17",
118+
"ZolotukhinM",
95119
"zou3519"
96120
],
97121
"mandatory_checks_name": ["Facebook CLA Check", "Lint"]

.github/scripts/generate_binary_build_matrix.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ def arch_type(arch_version: str) -> str:
5959
(gpu_arch, CXX11_ABI): f"pytorch/libtorch-cxx11-builder:cuda{gpu_arch}"
6060
for gpu_arch in CUDA_ARCHES
6161
},
62+
**{
63+
(gpu_arch, PRE_CXX11_ABI): f"pytorch/manylinux-builder:rocm{gpu_arch}"
64+
for gpu_arch in ROCM_ARCHES
65+
},
66+
**{
67+
(gpu_arch, CXX11_ABI): f"pytorch/libtorch-cxx11-builder:rocm{gpu_arch}"
68+
for gpu_arch in ROCM_ARCHES
69+
},
6270
("cpu", PRE_CXX11_ABI): "pytorch/manylinux-builder:cpu",
6371
("cpu", CXX11_ABI): "pytorch/libtorch-cxx11-builder:cpu",
6472
}
@@ -119,6 +127,7 @@ def generate_libtorch_matrix(os: str, abi_version: str,
119127
arches = ["cpu"]
120128
if os == "linux":
121129
arches += CUDA_ARCHES
130+
arches += ROCM_ARCHES
122131
elif os == "windows":
123132
# We don't build CUDA 10.2 for window see https://github.com/pytorch/pytorch/issues/65648
124133
arches += list_without(CUDA_ARCHES, ["10.2"])
@@ -134,7 +143,6 @@ def generate_libtorch_matrix(os: str, abi_version: str,
134143
ret: List[Dict[str, str]] = []
135144
for arch_version in arches:
136145
for libtorch_variant in libtorch_variants:
137-
# We don't currently build libtorch for rocm
138146
# one of the values in the following list must be exactly
139147
# CXX11_ABI, but the precise value of the other one doesn't
140148
# matter

.github/scripts/generate_ci_workflows.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -667,8 +667,8 @@ def generate_workflow_file(self, workflow_template: jinja2.Template) -> None:
667667
),
668668
CIWorkflow(
669669
arch="linux",
670-
build_environment="linux-bionic-rocm4.5-py3.7",
671-
docker_image_base=f"{DOCKER_REGISTRY}/pytorch/pytorch-linux-bionic-rocm4.5-py3.7",
670+
build_environment="linux-bionic-rocm5.0-py3.7",
671+
docker_image_base=f"{DOCKER_REGISTRY}/pytorch/pytorch-linux-bionic-rocm5.0-py3.7",
672672
test_runner_type=LINUX_ROCM_TEST_RUNNER,
673673
num_test_shards=2,
674674
enable_distributed_test=False,
@@ -936,8 +936,8 @@ def generate_workflow_file(self, workflow_template: jinja2.Template) -> None:
936936
]
937937

938938
DOCKER_IMAGES = {
939-
f"{DOCKER_REGISTRY}/pytorch/pytorch-linux-bionic-rocm4.3.1-py3.7", # for rocm
940-
f"{DOCKER_REGISTRY}/pytorch/pytorch-linux-bionic-rocm4.5-py3.7", # for rocm
939+
f"{DOCKER_REGISTRY}/pytorch/pytorch-linux-bionic-rocm4.5-py3.7", # for rocm
940+
f"{DOCKER_REGISTRY}/pytorch/pytorch-linux-bionic-rocm5.0-py3.7", # for rocm
941941
}
942942

943943
DOCKER_IMAGES.update({

.github/scripts/gql_mocks.json

Lines changed: 56 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/scripts/test_trymerge.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import json
33
import os
44
from hashlib import sha256
5-
from trymerge import find_matching_merge_rule, gh_graphql, GitHubPR
5+
from trymerge import find_matching_merge_rule, gh_graphql, gh_get_team_members, GitHubPR
66
from gitutils import get_git_remote_name, get_git_repo_dir, GitRepo
77
from typing import Any
88
from unittest import TestCase, main, mock
@@ -106,6 +106,15 @@ def test_gql_complexity(self, mocked_gql: Any) -> None:
106106
self.assertGreater(len(pr.get_checkrun_conclusions()), 3)
107107
self.assertGreater(pr.get_commit_count(), 60)
108108

109+
@mock.patch('trymerge.gh_graphql', side_effect=mocked_gh_graphql)
110+
def test_team_members(self, mocked_gql: Any) -> None:
111+
"Test fetching team members works"
112+
dev_infra_team = gh_get_team_members("pytorch", "pytorch-dev-infra")
113+
self.assertGreater(len(dev_infra_team), 2)
114+
with self.assertWarns(Warning):
115+
non_existing_team = gh_get_team_members("pytorch", "qwertyuiop")
116+
self.assertEqual(len(non_existing_team), 0)
117+
109118

110119
if __name__ == "__main__":
111120
main()

0 commit comments

Comments
 (0)