8000 Update · pytorch/pytorch@0e49d4c · GitHub
[go: up one dir, main page]

Skip to content

Commit 0e49d4c

Browse files
Update
[ghstack-poisoned]
2 parents 9e8336f + 6b67ce7 commit 0e49d4c

File tree

136 files changed

+4680
-3084
lines changed

Some content is hidden

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

136 files changed

+4680
-3084
lines changed

.ci/aarch64_linux/aarch64_ci_setup.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,14 @@ set -eux -o pipefail
55
# By creating symlinks from desired /opt/python to /usr/local/bin/
66

77
NUMPY_VERSION=2.0.2
8-
PYGIT2_VERSION=1.15.1
9-
if [[ "$DESIRED_PYTHON" == "3.13" ]]; then
8+
if [[ "$DESIRED_PYTHON" == "3.13" || "$DESIRED_PYTHON" == "3.13t" ]]; then
109
NUMPY_VERSION=2.1.2
11-
PYGIT2_VERSION=1.16.0
1210
fi
1311

1412
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
1513
source $SCRIPTPATH/../manywheel/set_desired_python.sh
1614

17-
pip install -q numpy==${NUMPY_VERSION} pyyaml==6.0.2 scons==4.7.0 ninja==1.11.1 patchelf==0.17.2 pygit2==${PYGIT2_VERSION}
15+
pip install -q numpy==${NUMPY_VERSION} pyyaml==6.0.2 scons==4.7.0 ninja==1.11.1 patchelf==0.17.2
1816

1917
for tool in python python3 pip pip3 ninja scons patchelf; do
2018
ln -sf ${DESIRED_PYTHON_BIN_DIR}/${tool} /usr/local/bin;

.ci/aarch64_linux/aarch64_wheel_ci_build.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
from subprocess import check_call, check_output
77
from typing import List
88

9-
from pygit2 import Repository
10-
119

1210
def list_dir(path: str) -> List[str]:
1311
"""'
@@ -171,10 +169,9 @@ def parse_arguments():
171169
args = parse_arguments()
172170
enable_mkldnn = args.enable_mkldnn
173171
enable_cuda = args.enable_cuda
174-
repo = Repository("/pytorch")
175-
branch = repo.head.name
176-
if branch == "HEAD":
177-
branch = "master"
172+
branch = check_output(
173+
["git", "rev-parse", "--abbrev-ref", "HEAD"], cwd="/pytorch"
174+
).decode()
178175

179176
print("Building PyTorch wheel")
180177
build_vars = "MAX_JOBS=5 CMAKE_SHARED_LINKER_FLAGS=-Wl,-z,max-page-size=0x10000 "
@@ -186,7 +183,7 @@ def parse_arguments():
186183
build_vars += (
187184
f"BUILD_TEST=0 PYTORCH_BUILD_VERSION={version} PYTORCH_BUILD_NUMBER=1 "
188185
)
189-
elif branch in ["nightly", "master"]:
186+
elif branch in ["nightly", "main"]:
190187
build_date = (
191188
check_output(["git", "log", "--pretty=format:%cs", "-1"], cwd="/pytorch")
192189
.decode()

.ci/aarch64_linux/build_aarch64_wheel.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
"ubuntu22_04": "ami-0c6c29c5125214c77", # login_name: ubuntu
2525
"redhat8": "ami-0698b90665a2ddcf1", # login_name: ec2-user
2626
}
27+
2728
ubuntu18_04_ami = os_amis["ubuntu18_04"]
29+
ubuntu20_04_ami = os_amis["ubuntu20_04"]
2830

2931

3032
def compute_keyfile_path(key_name: Optional[str] = None) -> Tuple[str, str]:
@@ -57,7 +59,7 @@ def ec2_instances_by_id(instance_id):
5759

5860

5961
def start_instance(
60-
key_name, ami=ubuntu18_04_ami, instance_type="t4g.2xlarge", ebs_size: int = 50
62+
key_name, ami=ubuntu20_04_ami, instance_type="t4g.2xlarge", ebs_size: int = 50
6163
):
6264
inst = ec2.create_instances(
6365
ImageId=ami,
@@ -932,9 +934,9 @@ def parse_arguments():
932934
parser.add_argument("--debug", action="store_true")
933935
parser.add_argument("--build-only", action="store_true")
934936
parser.add_argument("--test-only", type=str)
935-
parser.add_argument(
936-
"--os", type=str, choices=list(os_amis.keys()), default="ubuntu20_04"
937-
)
937+
group = parser.add_mutually_exclusive_group()
938+
group.add_argument("--os", type=str, choices=list(os_amis.keys()))
939+
group.add_argument("--ami", type=str)
938940
parser.add_argument(
939941
"--python-version",
940942
type=str,
@@ -964,7 +966,13 @@ def parse_arguments():
964966

965967
if __name__ == "__main__":
966968
args = parse_arguments()
967-
ami = os_amis[args.os]
969+
ami = (
970+
args.ami
971+
if args.ami is not None
972+
else os_amis[args.os]
973+
if args.os is not None
974+
else ubuntu20_04_ami
975+
)
968976
keyfile_path, key_name = compute_keyfile_path(args.key_name)
969977

970978
if args.list_instances:

.ci/pytorch/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ test_inductor_halide() {
657657
}
658658

659659
test_inductor_triton_cpu() {
660-
python test/run_test.py --include inductor/test_triton_cpu_backend.py --verbose
660+
python test/run_test.py --include inductor/test_triton_cpu_backend.py inductor/test_torchinductor_strided_blocks.py --verbose
661661
assert_git_not_dirty
662662
}
663663

.git-blame-ignore-revs

Lines changed: 1 addition & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -43,58 +43,4 @@ a53cda1ddc15336dc1ff0ce1eff2a49cdc5f882e
4343
# 2024-06-28 enable UFMT in `torch/storage.py`
4444
d80939e5e9337e8078f11489afefec59fd42f93b
4545
# 2024-06-28 enable UFMT in `torch.utils.data`
46-
fe5424d0f8604f6e66d827ae9f94b05cb7119d55
47-
# 2024-07-03 Enable UFMT on test/test_public_bindings.py (#128389)
48-
c686304277f7cd72331f685605325498cff94a0b
49-
# 2024-07-15 Enable UFMT on all of torch/sparse (#130545)
50-
535016967ae65a6027f83d6b935a985996223d49
51-
# 2024-07-15 [BE][Easy][1/19] enforce style for empty lines in import segments (#129752)
52-
a3abfa5cb57203b6a8ba7dff763f4057db8282a8
53-
# 2024-07-15 [BE][Easy][2/19] enforce style for empty lines in import segments in `.ci/` and `.github/` (#129753)
54-
ba48cf653541e9160dfdefa7bfea885c22e48608
55-
# 2024-07-16 [BE][Easy][5/19] enforce style for empty lines in import segments in `tools/` and `torchgen/` (#129756)
56-
f6838d521a243dbedc50ae96575720bf2cc8a8ad
57-
# 2024-07-17 [BE][Easy][9/19] enforce style for empty lines in import segments in `test/[e-h]*/` (#129760)
58-
76169cf69184bd462b9add40f893f57675f8a057
59-
# 2024-07-16 [BE][Easy][3/19] enforce style for empty lines in import segments in `benchmarks/` (#129754)
60-
c0ed38e644aed812d76b0ec85fae2f6019bf462b
61-
# 2024-07-16 [BE][Easy][4/19] enforce style for empty lines in import segments in `functorch/` (#129755)
62-
740fb229660f388feddc288c127ab12c82e67d36
63-
# 2024-07-17 [BE][Easy][12/19] enforce style for empty lines in import segments in `test/i*/` (#129763)
64-
aecc746fccc4495313167e3a7f94210daf457e1d
65-
# 2024-07-18 Revert "[BE][Easy][12/19] enforce style for empty lines in import segments in `test/i*/` (#129763)"
66-
b732b52f1e4378f8486ceb5e7026be3321c2651c
67-
# 2024-07-18 [BE][Easy][12/19] enforce style for empty lines in import segments in `test/i*/` (#129763)
68-
134bc4fc34bb02795aa694e66b132dcea5dde1e1
69-
# 2024-07-26 [BE][Easy][8/19] enforce style for empty lines in import segments in `test/[k-p]*/` (#129759)
70-
fbe6f42dcf1834213e0baa87b87529161df3c4d7
71-
# 2024-07-31 [BE][Easy][14/19] enforce style for empty lines in import segments in `torch/_[a-c]*/` and `torch/_[e-h]*/` and `torch/_[j-z]*/` (#129765)
72-
e7eeee473c6cb45942e87de5a616b0eb635513d6
73-
# 2024-07-31 Fix lint after PR #130572 (#132316)
74-
d72e863b3ecd3de4c8ea00518e110da964583f4f
75-
# 2024-07-31 [BE][Easy][15/19] enforce style for empty lines in import segments in `torch/_d*/` (#129767)
76-
e74ba1b34a476b46e76b4e32afe2d481f97e9a47
77-
# 2024-07-31 [BE][Easy][18/19] enforce style for empty lines in import segments in `torch/d*/` (#129770)
78-
b25ef91bf158ce459d8654e33c50c8e6ed8db716
79-
# 2024-07-20 [BE][Easy][13/19] enforce style for empty lines in import segments in `test/j*/` (#129764)
80-
6ff1e43a416c43cd82b210e22ac47384494c172e
81-
# 2024-09-30 Fix lint (#137023)
82-
0f80a70fab672e96a088796fa1b742a70b93070
83-
# 2024-11-01 [Lint] Clang-format all metal kernels (#139530)
84-
b3ad45733bd908b7358959ca1e1f8d026f4507eb
85-
# 2024-11-17 [BE][MPS] Apply clang-format to mps headers (#140906)
86-
99014a297c179862af38ee86bac2051434d3db41
87-
# 2024-11-27 Apply clang-format for ATen/core/boxing headers (#141105)
88-
19d01a1ef0c0d65768eb0a5c97a25328eec57fbd
89-
# 2024-12-05 fix the lint from D66795414 (#142122)
90-
65c2086d452ae6966ce9d7fb3cb2eef2fd0d2add
91-
# 2024-12-20 Apply clang-format for ATen/core/dispatch headers (#143620)
92-
cee06e74eeb54994b97000a02b715a4e63a97951
93-
# 2024-12-22 Better fix for f-strings in set_linter for py3.12 (#143725)
94-
eebc93d41eeffb936cbf20c9052e1e813d0cc052
95-
# 2025-01-04 [mps/BE] Fix linter warning/advice. (#144199)
96-
0dc1e6be192b260f1c072d70e1b06a3ac8e109fa
97-
# 2025-01-07 Fix lint in `test_provenance_tracing.py` (#144296)
98-
61c0a3d1cbaf6420e40ab0f9c9019daa21145e69
99-
# 2025-01-09 [BE] fix ruff rule E226: add missing whitespace around operator in f-strings (#144415)
100-
dcc3cf7066b4d8cab63ecb73daf1e36b01220a4e
46+
7cf0b90e49689d45be91aa539fdf54cf2ea8a9a3

.github/scripts/generate_binary_build_matrix.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def arch_type(arch_version: str) -> str:
207207
("cpu", CXX11_ABI): f"pytorch/libtorch-cxx11-builder:cpu-{DEFAULT_TAG}",
208208
}
209209

210-
FULL_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12"]
210+
FULL_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13", "3.13t"]
211211

212212

213213
def translate_desired_cuda(gpu_arch_type: str, gpu_arch_version: str) -> str:
@@ -297,7 +297,7 @@ def generate_wheels_matrix(
297297
package_type = "manywheel"
298298

299299
if python_versions is None:
300-
python_versions = FULL_PYTHON_VERSIONS + ["3.13", "3.13t"]
300+
python_versions = FULL_PYTHON_VERSIONS
301301

302302
if arches is None:
303303
# Define default compute archivectures
@@ -330,24 +330,10 @@ def generate_wheels_matrix(
330330
else arch_version
331331
)
332332

333-
# TODO: Enable python 3.13 on aarch64, windows
334-
if (
335-
os
336-
not in [
337-
"linux",
338-
"linux-s390x",
339-
"linux-aarch64",
340-
"macos-arm64",
341-
"windows",
342-
]
343-
) and python_version in ["3.13", "3.13t"]:
344-
continue
345-
346333
# TODO: Enable python 3.13t on xpu and cpu-s390x or MacOS or Windows
347334
if (
348335
gpu_arch_type in ["xpu", "cpu-s390x"]
349336
or os == "macos-arm64"
350-
or os == "linux-aarch64"
351337
or os == "windows"
352338
) and python_version == "3.13t":
353339
continue

.github/workflows/_linux-build.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,9 @@ jobs:
197197
AWS_DEFAULT_REGION: us-east-1
198198
PR_NUMBER: ${{ github.event.pull_request.number }}
199199
SHA1: ${{ github.event.pull_request.head.sha || github.sha }}
200+
# Do not set SCCACHE_S3_KEY_PREFIX to share the cache between all build jobs
200201
SCCACHE_BUCKET: ossci-compiler-cache-circleci-v2
201202
SCCACHE_REGION: us-east-1
202-
# Use the build environment here to make sure that all build jobs in the same environment
203-
# will share the same cache regardless of which workflow they belong. This should improve
204-
# the cache usage for jobs in non-pull workflows like periodic, slow, or inductor
205-
SCCACHE_S3_KEY_PREFIX: ${{ inputs.build-environment || github.workflow }}
206203
XLA_CLANG_CACHE_S3_BUCKET_NAME: ossci-compiler-clang-cache-circleci-xla
207204
PR_LABELS: ${{ toJson(github.event.pull_request.labels.*.name) }}
208205
TORCH_CUDA_ARCH_LIST: ${{ inputs.cuda-arch-list }}
@@ -251,7 +248,6 @@ jobs:
251248
-e BRANCH \
252249
-e SCCACHE_BUCKET \
253250
-e SCCACHE_REGION \
254-
-e SCCACHE_S3_KEY_PREFIX \
255251
-e XLA_CUDA \
256252
-e XLA_CLANG_CACHE_S3_BUCKET_NAME \
257253
-e SKIP_SCCACHE_INITIALIZATION=1 \

.github/workflows/_linux-test.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,12 +233,9 @@ jobs:
233233
NO_TEST_TIMEOUT: ${{ steps.keep-going.outputs.ci-no-test-timeout }}
234234
NO_TD: ${{ steps.keep-going.outputs.ci-no-td }}
235235
TD_DISTRIBUTED: ${{ steps.keep-going.outputs.ci-td-distributed }}
236+
# Do not set SCCACHE_S3_KEY_PREFIX to share the cache between all build jobs
236237
SCCACHE_BUCKET: ossci-compiler-cache-circleci-v2
237238
SCCACHE_REGION: us-east-1
238-
# Use the build environment here to make sure that all build jobs in the same environment
239-
# will share the same cache regardless of which workflow they belong. This should improve
240-
# the cache usage for jobs in non-pull workflows like periodic, slow, or inductor
241-
SCCACHE_S3_KEY_PREFIX: ${{ inputs.build-environment || github.workflow }}
242239
SHM_SIZE: ${{ contains(inputs.build-environment, 'cuda') && '2g' || '1g' }}
243240
DOCKER_IMAGE: ${{ inputs.docker-image }}
244241
XLA_CUDA: ${{ contains(inputs.build-environment, 'xla') && '0' || '' }}
@@ -316,7 +313,6 @@ jobs:
316313
-e MAX_JOBS="$(nproc --ignore=2)" \
317314
-e SCCACHE_BUCKET \
318315
-e SCCACHE_REGION \
319-
-e SCCACHE_S3_KEY_PREFIX \
320316
-e XLA_CUDA \
321317
-e XLA_CLANG_CACHE_S3_BUCKET_NAME \
322318
-e PYTORCH_TEST_CUDA_MEM_LEAK_CHECK \

.github/workflows/build-almalinux-images.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
runs-on: linux.9xlarge.ephemeral
3737
strategy:
3838
matrix:
39-
cuda_version: ["11.8", "12.1", "12.4", "12.6", "cpu"]
39+
cuda_version: ["11.8", "12.4", "12.6", "cpu"]
4040
env:
4141
CUDA_VERSION: ${{ matrix.cuda_version }}
4242
steps:

.github/workflows/build-libtorch-images.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
runs-on: "${{ needs.get-label-type.outputs.label-type }}linux.9xlarge.ephemeral"
4646
strategy:
4747
matrix:
48-
cuda_version: ["12.6", "12.4", "12.1", "11.8"]
48+
cuda_version: ["12.6", "12.4", "11.8"]
4949
env:
5050
GPU_ARCH_TYPE: cuda
5151
GPU_ARCH_VERSION: ${{ matrix.cuda_version }}

.github/workflows/build-manywheel-images.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
runs-on: "${{ needs.get-label-type.outputs.label-type }}linux.9xlarge.ephemeral"
5050
strategy:
5151
matrix:
52-
cuda_version: ["12.6", "12.4", "12.1", "11.8"]
52+
cuda_version: ["12.6", "12.4", "11.8"]
5353
env:
5454
GPU_ARCH_TYPE: cuda
5555
GPU_ARCH_VERSION: ${{ matrix.cuda_version }}
@@ -94,7 +94,7 @@ jobs:
9494
runs-on: "${{ needs.get-label-type.outputs.label-type }}linux.9xlarge.ephemeral"
9595
strategy:
9696
matrix:
97-
cuda_version: ["12.6", "12.4", "12.1", "11.8"]
97+
cuda_version: ["12.6", "12.4", "11.8"]
9898
env:
9999
GPU_ARCH_TYPE: cuda-manylinux_2_28
100100
GPU_ARCH_VERSION: ${{ matrix.cuda_version }}

0 commit comments

Comments
 (0)
0