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
af627063
Commit
af627063
authored
May 26, 2024
by
Tri Dao
Browse files
[CI] Compile for pytorch 2.4.0.dev20240407 (for nvcr 24.05)
parent
40e66723
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
+6
-10
.github/workflows/publish.yml
.github/workflows/publish.yml
+6
-10
No files found.
.github/workflows/publish.yml
View file @
af627063
...
@@ -44,7 +44,7 @@ jobs:
...
@@ -44,7 +44,7 @@ jobs:
# 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.7'
,
'
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'
]
torch-version
:
[
'
1.12.1'
,
'
1.13.1'
,
'
2.0.1'
,
'
2.1.2'
,
'
2.2.2'
,
'
2.3.0'
,
'
2.4.0.dev20240407'
]
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.
...
@@ -74,6 +74,8 @@ jobs:
...
@@ -74,6 +74,8 @@ jobs:
python-version
:
'
3.7'
python-version
:
'
3.7'
-
torch-version
:
'
2.3.0'
-
torch-version
:
'
2.3.0'
python-version
:
'
3.7'
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'
-
torch-version
:
'
1.12.1'
cuda-version
:
'
12.2.2'
cuda-version
:
'
12.2.2'
...
@@ -139,18 +141,12 @@ jobs:
...
@@ -139,18 +141,12 @@ 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}[env['MATRIX_TORCH_VERSION']]; \
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']]; \
maxv = {'1.12': 116, '1.13': 117, '2.0': 118, '2.1': 121, '2.2': 121, '2.3': 121}[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']]; \
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
if [[ ${MATRIX_TORCH_VERSION} == "2.2" ]]; then
pip install --no-cache-dir --pre torch==${{ matrix.torch-version }} --index-url https://download.pytorch.org/whl/nightly/cu${TORCH_CUDA_VERSION}
# --no-deps because we can't install old versions of pytorch-triton
pip install typing-extensions jinja2
pip install --no-cache-dir --no-deps --pre https://download.pytorch.org/whl/nightly/cu${TORCH_CUDA_VERSION}/torch-${{ matrix.torch-version }}%2Bcu${TORCH_CUDA_VERSION}-cp${MATRIX_PYTHON_VERSION}-cp${MATRIX_PYTHON_VERSION}-linux_x86_64.whl
else
pip install --no-cache-dir --pre torch==${{ matrix.torch-version }} --index-url https://download.pytorch.org/whl/nightly/cu${TORCH_CUDA_VERSION}
fi
else
else
pip install --no-cache-dir torch==${{ matrix.torch-version }} --index-url https://download.pytorch.org/whl/cu${TORCH_CUDA_VERSION}
pip install --no-cache-dir torch==${{ matrix.torch-version }} --index-url https://download.pytorch.org/whl/cu${TORCH_CUDA_VERSION}
fi
fi
...
...
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