Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
[ghstack-poisoned]
  • Loading branch information
vkuzo committed Jan 8, 2025
2 parents fb3b255 + 457c5b1 commit e6bc640
Show file tree
Hide file tree
Showing 258 changed files with 116,328 additions and 5,295 deletions.
4 changes: 1 addition & 3 deletions .github/scripts/github_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@
import json
import os
import warnings

from dataclasses import dataclass
from typing import Any, Callable, cast, Dict, List, Optional, Tuple, Union
from typing import Any, Callable, Dict, List, Optional, Tuple, Union, cast
from urllib.error import HTTPError
from urllib.parse import quote
from urllib.request import Request, urlopen


GITHUB_API_URL = "https://api.github.com"


Expand Down
4 changes: 2 additions & 2 deletions .github/scripts/gitutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
from typing import (
Any,
Callable,
cast,
Dict,
Iterator,
List,
Optional,
Tuple,
TypeVar,
Union,
cast,
)

T = TypeVar("T")
Expand Down Expand Up @@ -45,7 +45,7 @@ def fuzzy_list_to_dict(items: List[Tuple[str, str]]) -> Dict[str, List[str]]:


def _check_output(items: List[str], encoding: str = "utf-8") -> str:
from subprocess import CalledProcessError, check_output, STDOUT
from subprocess import STDOUT, CalledProcessError, check_output

try:
return check_output(items, stderr=STDOUT).decode(encoding)
Expand Down
5 changes: 2 additions & 3 deletions .github/scripts/label_utils.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"""GitHub Label Utilities."""

import json

from functools import lru_cache
from typing import Any, List, Tuple, TYPE_CHECKING, Union
from typing import TYPE_CHECKING, Any, List, Tuple, Union

from github_utils import gh_fetch_url_and_headers, GitHubComment
from github_utils import GitHubComment, gh_fetch_url_and_headers

# TODO: this is a temp workaround to avoid circular dependencies,
# and should be removed once GitHubPR is refactored out of trymerge script.
Expand Down
16 changes: 6 additions & 10 deletions .github/scripts/trymerge.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,44 +23,41 @@
from typing import (
Any,
Callable,
cast,
Dict,
Iterable,
List,
NamedTuple,
Optional,
Pattern,
Tuple,
cast,
)
from warnings import warn

import yaml
from github_utils import (
GitHubComment,
gh_fetch_json_list,
gh_fetch_merge_base,
gh_fetch_url,
gh_graphql,
gh_post_commit_comment,
gh_post_pr_comment,
gh_update_pr_state,
GitHubComment,
)

from gitutils import (
GitRepo,
are_ghstack_branches_in_sync,
get_git_remote_name,
get_git_repo_dir,
GitRepo,
patterns_to_regex,
retries_decorator,
)
from label_utils import (
gh_add_labels,
gh_remove_label,
has_required_labels,
LABEL_ERR_MSG,
)
from trymerge_explainer import get_revert_message, TryMergeExplainer
from trymerge_explainer import TryMergeExplainer, get_revert_message

# labels
MERGE_IN_PROGRESS_LABEL = "merging"
Expand Down Expand Up @@ -1477,7 +1474,7 @@ def checks_to_str(checks: List[Tuple[str, Optional[str]]]) -> str:


def checks_to_markdown_bullets(
checks: List[Tuple[str, Optional[str], Optional[int]]]
checks: List[Tuple[str, Optional[str], Optional[int]]],
) -> List[str]:
return [
f"- [{c[0]}]({c[1]})" if c[1] is not None else f"- {c[0]}" for c in checks[:5]
Expand Down Expand Up @@ -1716,7 +1713,7 @@ def get_readable_drci_results(drci_classifications: Any) -> str:
try:
print(f"From Dr.CI checkrun summary: {drci_summary}")
drci_classifications = json.loads(str(drci_summary))
except json.JSONDecodeError as error:
except json.JSONDecodeError:
warn("Invalid Dr.CI checkrun summary")
drci_classifications = {}

Expand Down Expand Up @@ -1887,7 +1884,6 @@ def do_revert_prs(
dry_run: bool = False,
) -> None:
# Prepare and push revert commits
commit_shas: List[str] = []
for commit_sha, pr in shas_and_prs:
revert_msg = f"\nReverted {pr.get_pr_url()} on behalf of {prefix_with_github_url(author_login)}"
revert_msg += extra_msg
Expand Down
1 change: 0 additions & 1 deletion .github/scripts/trymerge_explainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import re
from typing import List, Optional, Pattern, Tuple


BOT_COMMANDS_WIKI = "https://github.com/pytorch/pytorch/wiki/Bot-commands"

CIFLOW_LABEL = re.compile(r"^ciflow/.+")
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/float8_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
runner: ${{ matrix.runs-on }}
gpu-arch-type: ${{ matrix.gpu-arch-type }}
gpu-arch-version: ${{ matrix.gpu-arch-version }}
submodules: recursive
script: |
conda create -n venv python=3.9 -y
conda activate venv
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/nightly_smoke_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
runner: ${{ matrix.runs-on }}
gpu-arch-type: ${{ matrix.gpu-arch-type }}
gpu-arch-version: ${{ matrix.gpu-arch-version }}
submodules: recursive
script: |
python -m pip install --upgrade pip
pip install ${{ matrix.torch-spec }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/regression_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
runner: ${{ matrix.runs-on }}
gpu-arch-type: ${{ matrix.gpu-arch-type }}
gpu-arch-version: ${{ matrix.gpu-arch-version }}
submodules: recursive
script: |
conda create -n venv python=3.9 -y
conda activate venv
Expand Down Expand Up @@ -93,6 +94,7 @@ jobs:
runner: ${{ matrix.runs-on }}
gpu-arch-type: ${{ matrix.gpu-arch-type }}
gpu-arch-version: ${{ matrix.gpu-arch-version }}
submodules: recursive
script: |
conda create -n venv python=3.9 -y
conda activate venv
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "third_party/cutlass"]
path = third_party/cutlass
url = https://github.com/NVIDIA/cutlass
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ repos:
alias: ruff-isolated
args:
- --isolated
- select F821,F823,W191
- --select
- F821,F823,W191
2 changes: 0 additions & 2 deletions benchmarks/bench_galore_fused_kernels.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
def run(args):
dtype = getattr(torch, args.dtype)
allow_tf32 = args.allow_tf32
fp8_fast_accum = False
torch.backends.cuda.matmul.allow_tf32 = allow_tf32
kernel = args.kernel
M, N = args.M, args.N
rank = args.rank

Expand Down
Loading

0 comments on commit e6bc640

Please sign in to comment.