-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI] Use torch 2.6.0.dev20241001, reduce torch #include
- Loading branch information
Showing
8 changed files
with
127 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,8 +44,8 @@ jobs: | |
# manylinux docker image, but I haven't figured out how to install CUDA on manylinux. | ||
os: [ubuntu-20.04] | ||
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] | ||
torch-version: ['2.1.2', '2.2.2', '2.3.1', '2.4.0', '2.5.1', '2.6.0.dev20241010'] | ||
cuda-version: ['11.8.0', '12.4.1'] | ||
torch-version: ['2.1.2', '2.2.2', '2.3.1', '2.4.0', '2.5.1', '2.6.0.dev20241001'] | ||
cuda-version: ['11.8.0', '12.3.2'] | ||
# 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. | ||
# Without this we get import error (undefined symbol: _ZN3c105ErrorC2ENS_14SourceLocationESs) | ||
|
@@ -68,10 +68,10 @@ jobs: | |
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
|
@@ -80,6 +80,7 @@ jobs: | |
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 "WHEEL_CUDA_VERSION=$(echo ${{ matrix.cuda-version }} | awk -F \. {'print $1'})" >> $GITHUB_ENV | ||
echo "MATRIX_PYTHON_VERSION=$(echo ${{ matrix.python-version }} | awk -F \. {'print $1 $2'})" >> $GITHUB_ENV | ||
- name: Free up disk space | ||
if: ${{ runner.os == 'Linux' }} | ||
|
@@ -98,26 +99,24 @@ jobs: | |
|
||
- name: Install CUDA ${{ matrix.cuda-version }} | ||
if: ${{ matrix.cuda-version != 'cpu' }} | ||
uses: Jimver/[email protected].18 | ||
uses: Jimver/[email protected].19 | ||
id: cuda-toolkit | ||
with: | ||
cuda: ${{ matrix.cuda-version }} | ||
linux-local-args: '["--toolkit"]' | ||
# default method is "local", and we're hitting some error with caching for CUDA 11.8 and 12.1 | ||
# method: ${{ (matrix.cuda-version == '11.8.0' || matrix.cuda-version == '12.1.0') && 'network' || 'local' }} | ||
method: 'network' | ||
# We need the cuda libraries (e.g. cuSparse, cuSolver) for compiling PyTorch extensions, | ||
# not just nvcc | ||
# sub-packages: '["nvcc"]' | ||
sub-packages: '["nvcc"]' | ||
|
||
- name: Install PyTorch ${{ matrix.torch-version }}+cu${{ matrix.cuda-version }} | ||
run: | | ||
pip install --upgrade pip | ||
# If we don't install before installing Pytorch, we get error for torch 2.0.1 | ||
# ERROR: Could not find a version that satisfies the requirement setuptools>=40.8.0 (from versions: none) | ||
pip install lit | ||
# For some reason torch 2.2.0 on python 3.12 errors saying no setuptools | ||
pip install setuptools | ||
pip install setuptools==68.0.0 | ||
# With python 3.13 and torch 2.5.1, unless we update typing-extensions, we get error | ||
# AttributeError: attribute '__default__' of 'typing.ParamSpec' objects is not writable | ||
pip install typing-extensions==4.12.2 | ||
# We want to figure out the CUDA version to download pytorch | ||
# e.g. we can have system CUDA version being 11.7 but if torch==1.12 then we need to download the wheel from cu116 | ||
# see https://github.com/pytorch/pytorch/blob/main/RELEASE.md#release-compatibility-matrix | ||
|
@@ -128,7 +127,12 @@ jobs: | |
print(minv if int(env['MATRIX_CUDA_VERSION']) < 120 else maxv)" \ | ||
) | ||
if [[ ${{ matrix.torch-version }} == *"dev"* ]]; then | ||
pip install --no-cache-dir --pre torch==${{ matrix.torch-version }} --index-url https://download.pytorch.org/whl/nightly/cu${TORCH_CUDA_VERSION} | ||
# pip install --no-cache-dir --pre torch==${{ matrix.torch-version }} --index-url https://download.pytorch.org/whl/nightly/cu${TORCH_CUDA_VERSION} | ||
# Can't use --no-deps because we need cudnn etc. | ||
# Hard-coding this version of pytorch-triton for torch 2.6.0.dev20241001 | ||
pip install jinja2 | ||
pip install https://download.pytorch.org/whl/nightly/pytorch_triton-3.1.0%2Bcf34004b8a-cp${MATRIX_PYTHON_VERSION}-cp${MATRIX_PYTHON_VERSION}-linux_x86_64.whl | ||
pip install --no-cache-dir --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 torch==${{ matrix.torch-version }} --index-url https://download.pytorch.org/whl/cu${TORCH_CUDA_VERSION} | ||
fi | ||
|
@@ -191,9 +195,9 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.