Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
flash-attention
Commits
beb2bf2a
Commit
beb2bf2a
authored
Jul 09, 2024
by
Tri Dao
Browse files
Drop support for pytorch 1.12, 1.13, and python 3.7
parent
f4628b43
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
29 deletions
+6
-29
.github/workflows/publish.yml
.github/workflows/publish.yml
+4
-27
setup.py
setup.py
+2
-2
No files found.
.github/workflows/publish.yml
View file @
beb2bf2a
...
@@ -43,8 +43,8 @@ jobs:
...
@@ -43,8 +43,8 @@ jobs:
# Using ubuntu-20.04 instead of 22.04 for more compatibility (glibc). Ideally we'd use the
# Using ubuntu-20.04 instead of 22.04 for more compatibility (glibc). Ideally we'd use the
# manylinux docker image, but I haven't figured out how to install CUDA on manylinux.
# manylinux docker image, but I haven't figured out how to install CUDA on manylinux.
os
:
[
ubuntu-20.04
]
os
:
[
ubuntu-20.04
]
python-version
:
[
'
3.7'
,
'
3.8'
,
'
3.9'
,
'
3.10'
,
'
3.11'
,
'
3.12'
]
python-version
:
[
'
3.8'
,
'
3.9'
,
'
3.10'
,
'
3.11'
,
'
3.12'
]
torch-version
:
[
'
1.12.1'
,
'
1.13.1'
,
'
2.0.1'
,
'
2.1.2'
,
'
2.2.2'
,
'
2.3.
0
'
,
'
2.4.0.dev20240
407
'
]
torch-version
:
[
'
2.0.1'
,
'
2.1.2'
,
'
2.2.2'
,
'
2.3.
1
'
,
'
2.4.0.dev20240
512
'
]
cuda-version
:
[
'
11.8.0'
,
'
12.2.2'
]
cuda-version
:
[
'
11.8.0'
,
'
12.2.2'
]
# We need separate wheels that either uses C++11 ABI (-D_GLIBCXX_USE_CXX11_ABI) or not.
# We need separate wheels that either uses C++11 ABI (-D_GLIBCXX_USE_CXX11_ABI) or not.
# Pytorch wheels currently don't use it, but nvcr images have Pytorch compiled with C++11 ABI.
# Pytorch wheels currently don't use it, but nvcr images have Pytorch compiled with C++11 ABI.
...
@@ -54,33 +54,11 @@ jobs:
...
@@ -54,33 +54,11 @@ jobs:
exclude
:
exclude
:
# see https://github.com/pytorch/pytorch/blob/main/RELEASE.md#release-compatibility-matrix
# see https://github.com/pytorch/pytorch/blob/main/RELEASE.md#release-compatibility-matrix
# Pytorch < 2.2 does not support Python 3.12
# Pytorch < 2.2 does not support Python 3.12
-
torch-version
:
'
1.12.1'
python-version
:
'
3.12'
-
torch-version
:
'
1.13.1'
python-version
:
'
3.12'
-
torch-version
:
'
2.0.1'
-
torch-version
:
'
2.0.1'
python-version
:
'
3.12'
python-version
:
'
3.12'
-
torch-version
:
'
2.1.2'
-
torch-version
:
'
2.1.2'
python-version
:
'
3.12'
python-version
:
'
3.12'
# Pytorch <= 1.12 does not support Python 3.11
-
torch-version
:
'
1.12.1'
python-version
:
'
3.11'
# Pytorch >= 2.0 only supports Python >= 3.8
-
torch-version
:
'
2.0.1'
python-version
:
'
3.7'
-
torch-version
:
'
2.1.2'
python-version
:
'
3.7'
-
torch-version
:
'
2.2.2'
python-version
:
'
3.7'
-
torch-version
:
'
2.3.0'
python-version
:
'
3.7'
-
torch-version
:
'
2.4.0.dev20240407'
python-version
:
'
3.7'
# Pytorch <= 2.0 only supports CUDA <= 11.8
# Pytorch <= 2.0 only supports CUDA <= 11.8
-
torch-version
:
'
1.12.1'
cuda-version
:
'
12.2.2'
-
torch-version
:
'
1.13.1'
cuda-version
:
'
12.2.2'
-
torch-version
:
'
2.0.1'
-
torch-version
:
'
2.0.1'
cuda-version
:
'
12.2.2'
cuda-version
:
'
12.2.2'
...
@@ -97,7 +75,6 @@ jobs:
...
@@ -97,7 +75,6 @@ jobs:
run
:
|
run
:
|
echo "MATRIX_CUDA_VERSION=$(echo ${{ matrix.cuda-version }} | awk -F \. {'print $1 $2'})" >> $GITHUB_ENV
echo "MATRIX_CUDA_VERSION=$(echo ${{ matrix.cuda-version }} | awk -F \. {'print $1 $2'})" >> $GITHUB_ENV
echo "MATRIX_TORCH_VERSION=$(echo ${{ matrix.torch-version }} | awk -F \. {'print $1 "." $2'})" >> $GITHUB_ENV
echo "MATRIX_TORCH_VERSION=$(echo ${{ matrix.torch-version }} | awk -F \. {'print $1 "." $2'})" >> $GITHUB_ENV
echo "MATRIX_PYTHON_VERSION=$(echo ${{ matrix.python-version }} | awk -F \. {'print $1 $2'})" >> $GITHUB_ENV
-
name
:
Free up disk space
-
name
:
Free up disk space
if
:
${{ runner.os == 'Linux' }}
if
:
${{ runner.os == 'Linux' }}
...
@@ -141,8 +118,8 @@ jobs:
...
@@ -141,8 +118,8 @@ jobs:
# see https://github.com/pytorch/pytorch/blob/main/RELEASE.md#release-compatibility-matrix
# see https://github.com/pytorch/pytorch/blob/main/RELEASE.md#release-compatibility-matrix
# This code is ugly, maybe there's a better way to do this.
# This code is ugly, maybe there's a better way to do this.
export TORCH_CUDA_VERSION=$(python -c "from os import environ as env; \
export TORCH_CUDA_VERSION=$(python -c "from os import environ as env; \
minv = {
'1.12': 113, '1.13': 116,
'2.0': 117, '2.1': 118, '2.2': 118, '2.3': 118, '2.4': 118}[env['MATRIX_TORCH_VERSION']]; \
minv = {'2.0': 117, '2.1': 118, '2.2': 118, '2.3': 118, '2.4': 118}[env['MATRIX_TORCH_VERSION']]; \
maxv = {
'1.12': 116, '1.13': 117,
'2.0': 118, '2.1': 121, '2.2': 121, '2.3': 121, '2.4': 121}[env['MATRIX_TORCH_VERSION']]; \
maxv = {'2.0': 118, '2.1': 121, '2.2': 121, '2.3': 121, '2.4': 121}[env['MATRIX_TORCH_VERSION']]; \
print(max(min(int(env['MATRIX_CUDA_VERSION']), maxv), minv))" \
print(max(min(int(env['MATRIX_CUDA_VERSION']), maxv), minv))" \
)
)
if [[ ${{ matrix.torch-version }} == *"dev"* ]]; then
if [[ ${{ matrix.torch-version }} == *"dev"* ]]; then
...
...
setup.py
View file @
beb2bf2a
...
@@ -325,7 +325,7 @@ setup(
...
@@ -325,7 +325,7 @@ setup(
)
)
),
),
author
=
"Tri Dao"
,
author
=
"Tri Dao"
,
author_email
=
"tri
d@cs.stanford.edu
"
,
author_email
=
"tri
@tridao.me
"
,
description
=
"Flash Attention: Fast and Memory-Efficient Exact Attention"
,
description
=
"Flash Attention: Fast and Memory-Efficient Exact Attention"
,
long_description
=
long_description
,
long_description
=
long_description
,
long_description_content_type
=
"text/markdown"
,
long_description_content_type
=
"text/markdown"
,
...
@@ -341,7 +341,7 @@ setup(
...
@@ -341,7 +341,7 @@ setup(
else
{
else
{
"bdist_wheel"
:
CachedWheelsCommand
,
"bdist_wheel"
:
CachedWheelsCommand
,
},
},
python_requires
=
">=3.
7
"
,
python_requires
=
">=3.
8
"
,
install_requires
=
[
install_requires
=
[
"torch"
,
"torch"
,
"einops"
,
"einops"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment