Skip to content

Commit 8d6a1a3

Browse files
committed
Merge branch 'minjean/mkldnn_tbb_support' of https://github.com/min-jean-cho/pytorch into minjean/mkldnn_tbb_support
2 parents 45aa7e0 + e06e3fa commit 8d6a1a3

File tree

151 files changed

+17983
-1136
lines changed

Some content is hidden

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

151 files changed

+17983
-1136
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ebee0a27940adfbb30444d83387b9ea0f1173f40

.github/ci_commit_pins/timm.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ebee0a27940adfbb30444d83387b9ea0f1173f40
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
24b95f2f627bf07a61cefed653419389a7586357

.github/ci_commit_pins/xla.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
e1f5a49664b904e3ec1ddb9095ca75b6bbb5c10d
1+
eff277e81fcfdeccba71e75ff40b6e2f3e29e27b

.github/labeler.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,8 @@
77
"module: inductor":
88
- torch/_inductor/**
99
- test/inductor/**
10+
11+
"ciflow/inductor":
12+
- torch/_dynamo/**
13+
- torch/_inductor/**
14+
- benchmarks/dynamo/**

.github/requirements-gha-cache.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
# docs/cpp/requirements.txt
66
# functorch/docs/requirements.txt
77
# .circleci/docker/requirements-ci.txt
8+
boto3==1.19.12
89
cffi==1.15.0
910
dataclasses==0.6
1011
jinja2==3.0.1
1112
lintrunner==0.9.2
1213
ninja==1.10.0.post1
1314
pynvml==11.4.1
15+
pyyaml==6.0
1416
requests==2.26
1517
rich==10.9.0
1618
rockset==0.8.10

.github/scripts/check_labels.py

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
#!/usr/bin/env python3
2+
"""check_labels.py"""
3+
4+
from typing import Any, List
5+
from datetime import datetime, timedelta
6+
7+
from export_pytorch_labels import get_pytorch_labels
8+
from gitutils import (
9+
get_git_remote_name,
10+
get_git_repo_dir,
11+
GitRepo,
12+
)
13+
from trymerge import (
14+
_fetch_url,
15+
gh_post_pr_comment,
16+
GitHubPR,
17+
)
18+
19+
20+
BOT_AUTHORS = ["github-actions", "pytorchmergebot", "pytorch-bot"]
21+
22+
ERR_MSG_TITLE = "This PR needs a label"
23+
ERR_MSG = (
24+
f"# {ERR_MSG_TITLE}\n"
25+
"If your changes are user facing and intended to be a part of release notes, please use a label starting with `release notes:`.\n\n" # noqa: E501 pylint: disable=line-too-long
26+
"If not, please add the `topic: not user facing` label.\n\n"
27+
"For more information, see https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work." # noqa: E501 pylint: disable=line-too-long
28+
)
29+
30+
31+
def get_release_notes_labels() -> List[str]:
32+
return [label for label in get_pytorch_labels() if label.lstrip().startswith("release notes:")]
33+
34+
35+
def delete_comment(comment_id: int) -> None:
36+
url = f"https://api.github.com/repos/pytorch/pytorch/issues/comments/{comment_id}"
37+
_fetch_url(url, method="DELETE")
38+
39+
40+
def has_required_labels(pr: GitHubPR) -> bool:
41+
pr_labels = pr.get_labels()
42+
43+
# Check if PR is not user facing
44+
is_not_user_facing_pr = any(label.strip() == "topic: not user facing" for label in pr_labels)
45+
if is_not_user_facing_pr:
46+
return True
47+
48+
# Check if bot has already posted a message within the past hour to include a release notes label
49+
for comment in pr.get_comments():
50+
if comment.body_text.lstrip(" #").startswith(ERR_MSG_TITLE) and comment.author_login in BOT_AUTHORS:
51+
ts = datetime.strptime(comment.created_at, "%Y-%m-%dT%H:%M:%SZ")
52+
if (datetime.utcnow() - ts) < timedelta(hours=1):
53+
return True
54+
delete_comment(comment.database_id)
55+
break
56+
57+
return any(label.strip() in get_release_notes_labels() for label in pr_labels)
58+
59+
60+
def parse_args() -> Any:
61+
from argparse import ArgumentParser
62+
parser = ArgumentParser("Check PR labels")
63+
parser.add_argument("pr_num", type=int)
64+
65+
return parser.parse_args()
66+
67+
68+
def main() -> None:
69+
args = parse_args()
70+
repo = GitRepo(get_git_repo_dir(), get_git_remote_name())
71+
org, project = repo.gh_owner_and_name()
72+
pr = GitHubPR(org, project, args.pr_num)
73+
74+
try:
75+
if not has_required_labels(pr):
76+
print(ERR_MSG)
77+
gh_post_pr_comment(pr.org, pr.project, pr.pr_num, ERR_MSG)
78+
exit(1)
79+
except Exception as e:
80+
pass
81+
82+
83+
if __name__ == "__main__":
84+
main()

.github/scripts/filter_test_configs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"dynamo",
2323
"force_on_cpu",
2424
"functorch",
25+
"inductor",
2526
"jit_legacy",
2627
"multigpu",
2728
"nogpu_AVX512",

0 commit comments

Comments
 (0)