8000 Merge branch 'upstream-main' into liangan1/flex_attention · pytorch/pytorch@0107952 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0107952

Browse files
committed
Merge branch 'upstream-main' into liangan1/flex_attention
2 parents b21033c + 13966d0 commit 0107952

File tree

331 files changed

+5442
-1432
lines changed

Some content is hidden

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

331 files changed

+5442
-1432
lines changed

.ci/caffe2/test.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ if [[ "${BUILD_ENVIRONMENT}" == *-android* ]]; then
1313
echo 'Skipping tests'
1414
exit 0
1515
fi
16-
if [[ "${BUILD_ENVIRONMENT}" == *-rocm* ]]; then
17-
# temporary to locate some kernel issues on the CI nodes
18-
export HSAKMT_DEBUG_LEVEL=4
19-
fi
2016
# These additional packages are needed for circleci ROCm builds.
2117
if [[ $BUILD_ENVIRONMENT == *rocm* ]]; then
2218
# Need networkx 2.0 because bellmand_ford was moved in 2.1 . Scikit-image by

.ci/docker/almalinux/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ RUN rm -rf /usr/local/cuda-*
4646
ADD ./common/install_cuda.sh install_cuda.sh
4747
COPY ./common/install_nccl.sh install_nccl.sh
4848
COPY ./ci_commit_pins/nccl-cu* /ci_commit_pins/
49+
COPY ./common/install_cusparselt.sh install_cusparselt.sh
4950
ENV CUDA_HOME=/usr/local/cuda-${CUDA_VERSION}
5051
# Preserve CUDA_VERSION for the builds
5152
ENV CUDA_VERSION=${CUDA_VERSION}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
381ae5d57d35c165d98df728380b20fbde350392
1+
a325c56864c5b25630c1ebda03c8f16a96a02a19

.ci/docker/common/install_cuda.sh

Lines changed: 4 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,6 @@ set -ex
44

55
CUDNN_VERSION=9.5.1.17
66

7-
function install_cusparselt_040 {
8-
# cuSparseLt license: https://docs.nvidia.com/cuda/cusparselt/license.html
9-
mkdir tmp_cusparselt && pushd tmp_cusparselt
10-
wget -q https://developer.download.nvidia.com/compute/cusparselt/redist/libcusparse_lt/linux-x86_64/libcusparse_lt-linux-x86_64-0.4.0.7-archive.tar.xz
11-
tar xf libcusparse_lt-linux-x86_64-0.4.0.7-archive.tar.xz
12-
cp -a libcusparse_lt-linux-x86_64-0.4.0.7-archive/include/* /usr/local/cuda/include/
13-
cp -a libcusparse_lt-linux-x86_64-0.4.0.7-archive/lib/* /usr/local/cuda/lib64/
14-
popd
15-
rm -rf tmp_cusparselt
16-
}
17-
18-
function install_cusparselt_062 {
19-
# cuSparseLt license: https://docs.nvidia.com/cuda/cusparselt/license.html
20-
mkdir tmp_cusparselt && pushd tmp_cusparselt
21-
wget -q https://developer.download.nvidia.com/compute/cusparselt/redist/libcusparse_lt/linux-x86_64/libcusparse_lt-linux-x86_64-0.6.2.3-archive.tar.xz
22-
tar xf libcusparse_lt-linux-x86_64-0.6.2.3-archive.tar.xz
23-
cp -a libcusparse_lt-linux-x86_64-0.6.2.3-archive/include/* /usr/local/cuda/include/
24-
cp -a libcusparse_lt-linux-x86_64-0.6.2.3-archive/lib/* /usr/local/cuda/lib64/
25-
popd
26-
rm -rf tmp_cusparselt
27-
}
28-
29-
function install_cusparselt_063 {
30-
# cuSparseLt license: https://docs.nvidia.com/cuda/cusparselt/license.html
31-
mkdir tmp_cusparselt && pushd tmp_cusparselt
32-
wget -q https://developer.download.nvidia.com/compute/cusparselt/redist/libcusparse_lt/linux-x86_64/libcusparse_lt-linux-x86_64-0.6.3.2-archive.tar.xz
33-
tar xf libcusparse_lt-linux-x86_64-0.6.3.2-archive.tar.xz
34-
cp -a libcusparse_lt-linux-x86_64-0.6.3.2-archive/include/* /usr/local/cuda/include/
35-
cp -a libcusparse_lt-linux-x86_64-0.6.3.2-archive/lib/* /usr/local/cuda/lib64/
36-
popd
37-
rm -rf tmp_cusparselt
38-
}
39-
407
function install_118 {
418
CUDNN_VERSION=9.1.0.70
429
echo "Installing CUDA 11.8 and cuDNN ${CUDNN_VERSION} and NCCL and cuSparseLt-0.4.0"
@@ -59,7 +26,7 @@ function install_118 {
5926

6027
CUDA_VERSION=11.8 bash install_nccl.sh
6128

62-
install_cusparselt_040
29+
CUDA_VERSION=11.8 bash install_cusparselt.sh
6330

6431
ldconfig
6532
}
@@ -86,7 +53,7 @@ function install_124 {
8653

8754
CUDA_VERSION=12.4 bash install_nccl.sh
8855

89-
install_cusparselt_062
56+
CUDA_VERSION=12.4 bash install_cusparselt.sh
9057

9158
ldconfig
9259
}
@@ -112,7 +79,7 @@ function install_126 {
11279

11380
CUDA_VERSION=12.6 bash install_nccl.sh
11481

115-
install_cusparselt_063
82+
CUDA_VERSION=12.6 bash install_cusparselt.sh
11683

11784
ldconfig
11885
}
@@ -238,7 +205,7 @@ function install_128 {
238205

239206
CUDA_VERSION=12.8 bash install_nccl.sh
240207

241-
install_cusparselt_063
208+
CUDA_VERSION=12.8 bash install_cusparselt.sh
242209

243210
ldconfig
244211
}

.ci/docker/common/install_cuda_aarch64.sh

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,6 @@ set -ex
55

66
CUDNN_VERSION=9.8.0.87
77

8-
function install_cusparselt_063 {
9-
# cuSparseLt license: https://docs.nvidia.com/cuda/cusparselt/license.html
10-
mkdir tmp_cusparselt && pushd tmp_cusparselt
11-
wget -q https://developer.download.nvidia.com/compute/cusparselt/redist/libcusparse_lt/linux-sbsa/libcusparse_lt-linux-sbsa-0.6.3.2-archive.tar.xz
12-
tar xf libcusparse_lt-linux-sbsa-0.6.3.2-archive.tar.xz
13-
cp -a libcusparse_lt-linux-sbsa-0.6.3.2-archive/include/* /usr/local/cuda/include/
14-
cp -a libcusparse_lt-linux-sbsa-0.6.3.2-archive/lib/* /usr/local/cuda/lib64/
15-
popd
16-
rm -rf tmp_cusparselt
17-
}
18-
198
function install_128 {
209
echo "Installing CUDA 12.8.0 and cuDNN ${CUDNN_VERSION} and NCCL and cuSparseLt-0.6.3"
2110
rm -rf /usr/local/cuda-12.8 /usr/local/cuda
@@ -37,7 +26,7 @@ function install_128 {
3726

3827
CUDA_VERSION=12.8 bash install_nccl.sh
3928

40-
install_cusparselt_063
29+
CUDA_VERSION=12.8 bash install_cusparselt.sh
4130

4231
ldconfig
4332
}

.ci/docker/libtorch/Dockerfile

Lines changed: 1 addition &am F438 p; 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ ADD ./common/install_cuda.sh install_cuda.sh
5151
ADD ./common/install_magma.sh install_magma.sh
5252
COPY ./common/install_nccl.sh install_nccl.sh
5353
COPY ./ci_commit_pins/nccl-cu* /ci_commit_pins/
54+
COPY ./common/install_cusparselt.sh install_cusparselt.sh
5455
ENV CUDA_HOME /usr/local/cuda
5556

5657
FROM cuda as cuda11.8

.ci/docker/linter-cuda/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ ARG CUDA_VERSION
3232
COPY ./common/install_cuda.sh install_cuda.sh
3333
COPY ./common/install_nccl.sh install_nccl.sh
3434
COPY ./ci_commit_pins/nccl-cu* /ci_commit_pins/
35-
RUN bash ./install_cuda.sh ${CUDA_VERSION} && rm install_cuda.sh install_nccl.sh /ci_commit_pins/nccl-cu*
35+
COPY ./common/install_cusparselt.sh install_cusparselt.sh
36+
RUN bash ./install_cuda.sh ${CUDA_VERSION} && rm install_cuda.sh install_nccl.sh /ci_commit_pins/nccl-cu* install_cusparselt.sh
3637
ENV DESIRED_CUDA ${CUDA_VERSION}
3738
ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:$PATH
3839

.ci/docker/manywheel/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ ARG BASE_CUDA_VERSION=10.2
6666
ADD ./common/install_cuda.sh install_cuda.sh
6767
COPY ./common/install_nccl.sh install_nccl.sh
6868
COPY ./ci_commit_pins/nccl-cu* /ci_commit_pins/
69-
RUN bash ./install_cuda.sh ${BASE_CUDA_VERSION} && rm install_cuda.sh install_nccl.sh /ci_commit_pins/nccl-cu*
69+
COPY ./common/install_cusparselt.sh install_cusparselt.sh
70+
RUN bash ./install_cuda.sh ${BASE_CUDA_VERSION} && rm install_cuda.sh install_nccl.sh /ci_commit_pins/nccl-cu* install_cusparselt.sh
7071

7172
FROM base as intel
7273
# MKL

.ci/docker/manywheel/Dockerfile_2_28

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ ARG BASE_CUDA_VERSION=11.8
3838
ADD ./common/install_cuda.sh install_cuda.sh
3939
COPY ./common/install_nccl.sh install_nccl.sh
4040
COPY ./ci_commit_pins/nccl-cu* /ci_commit_pins/
41-
RUN bash ./install_cuda.sh ${BASE_CUDA_VERSION} && rm install_cuda.sh install_nccl.sh ci_commit_pins/nccl-cu*
41+
COPY ./common/install_cusparselt.sh install_cusparselt.sh
42+
RUN bash ./install_cuda.sh ${BASE_CUDA_VERSION} && rm install_cuda.sh install_nccl.sh ci_commit_pins/nccl-cu* install_cusparselt.sh
4243

4344
FROM base as intel
4445
# MKL

.ci/docker/manywheel/Dockerfile_cuda_aarch64

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,9 @@ ARG BASE_CUDA_VERSION
6868
# Install CUDA
6969
ADD ./common/install_cuda_aarch64.sh install_cuda_aarch64.sh
7070
COPY ./common/install_nccl.sh install_nccl.sh
71+
COPY ./common/install_cusparselt.sh install_cusparselt.sh
7172
COPY ./ci_commit_pins/nccl-cu* /ci_commit_pins/
72-
RUN bash ./install_cuda_aarch64.sh ${BASE_CUDA_VERSION} && rm install_cuda_aarch64.sh install_nccl.sh ci_commit_pins/nccl-cu*
73+
RUN bash ./install_cuda_aarch64.sh ${BASE_CUDA_VERSION} && rm install_cuda_aarch64.sh install_nccl.sh ci_commit_pins/nccl-cu* install_cusparselt.sh
7374

7475
FROM base as magma
7576
ARG BASE_CUDA_VERSION

.ci/docker/requirements-docs.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
sphinx==5.3.0
22
#Description: This is used to generate PyTorch docs
33
#Pinned versions: 5.3.0
4-
-e git+https://github.com/pytorch/pytorch_sphinx_theme.git@a98ffecb792d50df495be401becbf5c414421423#egg=pytorch_sphinx_theme2
4+
-e git+https://github.com/pytorch/pytorch_sphinx_theme.git@pytorch_sphinx_theme2#egg=pytorch_sphinx_theme2
55

66
# TODO: sphinxcontrib.katex 0.9.0 adds a local KaTeX server to speed up pre-rendering
77
# but it doesn't seem to work and hangs around idly. The initial thought is probably

.ci/docker/ubuntu/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ ARG CUDA_VERSION
5454
COPY ./common/install_cuda.sh install_cuda.sh
5555
COPY ./common/install_nccl.sh install_nccl.sh
5656
COPY ./ci_commit_pins/nccl-cu* /ci_commit_pins/
57-
RUN bash ./install_cuda.sh ${CUDA_VERSION} && rm install_cuda.sh install_nccl.sh /ci_commit_pins/nccl-cu*
57+
COPY ./common/install_cusparselt.sh install_cusparselt.sh
58+
RUN bash ./install_cuda.sh ${CUDA_VERSION} && rm install_cuda.sh install_nccl.sh /ci_commit_pins/nccl-cu* install_cusparselt.sh
5859
ENV DESIRED_CUDA ${CUDA_VERSION}
5960
ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:$PATH
6061
# No effect if cuda not installed

.ci/pytorch/common.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ if [[ "${BUILD_ENVIRONMENT}" == *rocm* ]]; then
1313
# HIP_PLATFORM is auto-detected by hipcc; unset to avoid build errors
1414
unset HIP_PLATFORM
1515
export PYTORCH_TEST_WITH_ROCM=1
16-
# temporary to locate some kernel issues on the CI nodes
17-
export HSAKMT_DEBUG_LEVEL=4
18-
# improve rccl performance for distributed tests
19-
export HSA_FORCE_FINE_GRAIN_PCIE=1
2016
fi
2117

2218
# TODO: Renable libtorch testing for MacOS, see https://github.com/pytorch/pytorch/issues/62598

.ci/pytorch/windows/cuda124.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ IF "%CUDA_PATH_V124%"=="" (
3737
)
3838

3939
IF "%BUILD_VISION%" == "" (
40-
set TORCH_CUDA_ARCH_LIST=5.0;6.0;6.1;7.0;7.5;8.0;8.6;9.0
40+
set TORCH_CUDA_ARCH_LIST=6.1;7.0;7.5;8.0;8.6;9.0
4141
set TORCH_NVCC_FLAGS=-Xfatbin -compress-all
4242
) ELSE (
4343
set NVCC_FLAGS=-D__CUDA_NO_HALF_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_50,code=sm_50 -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_70,code=sm_70 -gencode=arch=compute_75,code=sm_75 -gencode=arch=compute_80,code=compute_80 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_90,code=compute_90

.ci/pytorch/windows/cuda126.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ IF "%CUDA_PATH_V126%"=="" (
3737
)
3838

3939
IF "%BUILD_VISION%" == "" (
40-
set TORCH_CUDA_ARCH_LIST=5.0;6.0;6.1;7.0;7.5;8.0;8.6;9.0
40+
set TORCH_CUDA_ARCH_LIST=6.1;7.0;7.5;8.0;8.6;9.0
4141
set TORCH_NVCC_FLAGS=-Xfatbin -compress-all
4242
) ELSE (
4343
set NVCC_FLAGS=-D__CUDA_NO_HALF_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_50,code=sm_50 -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_70,code=sm_70 -gencode=arch=compute_75,code=sm_75 -gencode=arch=compute_80,code=compute_80 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_90,code=compute_90

.ci/pytorch/windows/cuda128.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ IF "%CUDA_PATH_V128%"=="" (
3737
)
3838

3939
IF "%BUILD_VISION%" == "" (
40-
set TORCH_CUDA_ARCH_LIST=5.0;6.0;6.1;7.0;7.5;8.0;8.6;9.0;10.0;12.0
40+
set TORCH_CUDA_ARCH_LIST=6.1;7.0;7.5;8.0;8.6;9.0;10.0;12.0
4141
set TORCH_NVCC_FLAGS=-Xfatbin -compress-all
4242
) ELSE (
4343
set NVCC_FLAGS=-D__CUDA_NO_HALF_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_50,code=sm_50 -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_70,code=sm_70 -gencode=arch=compute_75,code=sm_75 -gencode=arch=compute_80,code=compute_80 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_90,code=compute_90 -gencode=arch=compute_100,code=compute_100 -gencode=arch=compute_120,code=compute_120

.github/ci_commit_pins/audio.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
70e34b183b4615e2ece27e9b312cf3195647d3cf
1+
d60ce09e2c532d5bf2e05619e700ab520543465e

.github/scripts/generate_ci_workflows.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ class OperatingSystem:
233233
build_configs=generate_binary_build_matrix.generate_wheels_matrix(
234234
OperatingSystem.WINDOWS_ARM64,
235235
arches=["cpu"],
236-
python_versions=["3.12"],
236+
python_versions=["3.11", "3.12", "3.13"],
237237
),
238238
ciflow_config=CIFlowConfig(
239239
labels={LABEL_CIFLOW_BINARIES, LABEL_CIFLOW_BINARIES_WHEEL},

.github/scripts/github_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def gh_fetch_json_dict(
128128

129129
def gh_graphql(query: str, **kwargs: Any) -> dict[str, Any]:
130130
rc = gh_fetch_url(
131-
"https://api.github.com/graphql",
131+
"https://api.github.com/graphql", # @lint-ignore
132132
data={"query": query, "variables": kwargs},
133133
reader=json.load,
134134
)

.github/workflows/_bazel-build-test.yml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ on:
3333
default: "linux.large"
3434
description: Runner type
3535

36-
permissions:
37-
id-token: write
38-
contents: read
39-
4036
env:
4137
GIT_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
4238

@@ -84,13 +80,6 @@ jobs:
8480
- name: Setup Linux
8581
uses: ./.github/actions/setup-linux
8682

87-
- name: Configure AWS Credentials
88-
uses: aws-actions/configure-aws-credentials@v4
89-
with:
90-
role-to-assume: arn:aws:iam::308535385114:role/gha_workflow_s3_and_ecr_read_only
91-
role-session-name: gha-bazel-build
92-
aws-region: us-east-1
93-
9483
- name: Calculate docker image
9584
id: calculate-docker-image
9685
uses: pytorch/test-infra/.github/actions/calculate-docker-image@main
@@ -213,13 +202,6 @@ jobs:
213202
uses: ./.github/actions/chown-workspace
214203
if: always()
215204

216-
- name: Configure AWS Credentials
217-
uses: aws-actions/configure-aws-credentials@v4
218-
with:
219-
role-to-assume: arn:aws:iam::308535385114:role/gha_workflow_pytorch_artifacts
220-
role-session-name: gha-bazel-build-upload-artifacts
221-
aws-region: us-east-1
222-
223205
- name: Upload test artifacts
224206
uses: ./.github/actions/upload-test-artifacts
225207
if: always() && steps.test.conclusion && steps.test.conclusion != 'skipped'

0 commit comments

Comments
 (0)
0