Skip to content

Commit f7aebe8

Browse files
committed
Merge branch 'main' into update-ufmt
2 parents 4cf35b3 + 22d981f commit f7aebe8

Some content is hidden

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

43 files changed

+1279
-768
lines changed

.clang-format

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@ MacroBlockBegin: ''
6060
MacroBlockEnd: ''
6161
MaxEmptyLinesToKeep: 1
6262
NamespaceIndentation: None
63-
ObjCBlockIndentWidth: 2
64-
ObjCSpaceAfterProperty: false
65-
ObjCSpaceBeforeProtocolList: false
6663
PenaltyBreakBeforeFirstCallParameter: 1
6764
PenaltyBreakComment: 300
6865
PenaltyBreakFirstLessLess: 120
@@ -85,4 +82,11 @@ SpacesInSquareBrackets: false
8582
Standard: Cpp11
8683
TabWidth: 8
8784
UseTab: Never
85+
---
86+
Language: ObjC
87+
ColumnLimit: 120
88+
AlignAfterOpenBracket: Align
89+
ObjCBlockIndentWidth: 2
90+
ObjCSpaceAfterProperty: false
91+
ObjCSpaceBeforeProtocolList: false
8892
...

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@
77
d367a01a18a3ae6bee13d8be3b63fd6a581ea46f
88
# Upgrade usort to 1.0.2 and black to 22.3.0 (#5106)
99
6ca9c76adb6daf2695d603ad623a9cf1c4f4806f
10+
# Fix unnecessary exploded black formatting (#7709)
11+
a335d916db0694770e8152f41e19195de3134523

.github/scripts/setup-env.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ echo '::endgroup::'
5454

5555
if [[ "${OS_TYPE}" == windows && "${GPU_ARCH_TYPE}" == cuda ]]; then
5656
echo '::group::Install VisualStudio CUDA extensions on Windows'
57-
TARGET_DIR="/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/MSBuild/Microsoft/VC/v160/BuildCustomizations"
57+
if [[ "${VC_YEAR:-}" == "2022" ]]; then
58+
TARGET_DIR="/c/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Microsoft/VC/v170/BuildCustomizations"
59+
else
60+
TARGET_DIR="/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/MSBuild/Microsoft/VC/v160/BuildCustomizations"
61+
fi
5862
mkdir -p "${TARGET_DIR}"
5963
cp -r "${CUDA_HOME}/MSBuildExtensions/"* "${TARGET_DIR}"
6064
echo '::endgroup::'

.github/workflows/build-cmake.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ jobs:
7474
script: |
7575
set -euo pipefail
7676
77-
source packaging/windows/internal/vc_install_helper.sh
78-
7977
export PYTHON_VERSION=3.8
78+
export VC_YEAR=2022
79+
export VSDEVCMD_ARGS=""
8080
export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }}
8181
export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }}
8282

.github/workflows/tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ jobs:
9898
set -euxo pipefail
9999
100100
export PYTHON_VERSION=${{ matrix.python-version }}
101+
export VC_YEAR=2019
102+
export VSDEVCMD_ARGS=""
101103
export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }}
102104
export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }}
103105

.pre-commit-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ repos:
66
- id: check-toml
77
- id: check-yaml
88
exclude: packaging/.*
9+
args:
10+
- --allow-multiple-documents
911
- id: mixed-line-ending
1012
args: [--fix=lf]
1113
- id: end-of-file-fixer

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
"logo_only": True,
141141
"pytorch_project": "docs",
142142
"navigation_with_keys": True,
143-
"analytics_id": "UA-117752657-2",
143+
"analytics_id": "GTM-T8XT4PS",
144144
}
145145

146146
html_logo = "_static/img/pytorch-logo-dark.svg"

packaging/wheel/relocate.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import glob
44
import hashlib
5-
import io
65

76
# Standard library imports
87
import os
@@ -65,21 +64,12 @@
6564
PYTHON_VERSION = sys.version_info
6665

6766

68-
def read_chunks(file, size=io.DEFAULT_BUFFER_SIZE):
69-
"""Yield pieces of data from a file-like object until EOF."""
70-
while True:
71-
chunk = file.read(size)
72-
if not chunk:
73-
break
74-
yield chunk
75-
76-
7767
def rehash(path, blocksize=1 << 20):
7868
"""Return (hash, length) for path using hashlib.sha256()"""
7969
h = hashlib.sha256()
8070
length = 0
8171
with open(path, "rb") as f:
82-
for block in read_chunks(f, size=blocksize):
72+
while block := f.read(blocksize):
8373
length += len(block)
8474
h.update(block)
8575
digest = "sha256=" + urlsafe_b64encode(h.digest()).decode("latin1").rstrip("=")

packaging/windows/internal/vc_env_helper.bat

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
@echo on
22

3-
set VC_VERSION_LOWER=16
4-
set VC_VERSION_UPPER=17
3+
set VC_VERSION_LOWER=17
4+
set VC_VERSION_UPPER=18
5+
if "%VC_YEAR%" == "2019" (
6+
set VC_VERSION_LOWER=16
7+
set VC_VERSION_UPPER=17
8+
)
59
if "%VC_YEAR%" == "2017" (
610
set VC_VERSION_LOWER=15
711
set VC_VERSION_UPPER=16

packaging/windows/internal/vc_install_helper.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)