From 172ba679774a124a3b5a74cfa5298ee079d72993 Mon Sep 17 00:00:00 2001 From: Timothy Fei Truong Jr Date: Mon, 17 Jul 2023 20:12:30 +0000 Subject: [PATCH] use causal-prefix-mask branch publish code --- .github/workflows/cuda/cu116-Linux.sh | 2 +- .github/workflows/cuda/cu117-Linux-env.sh | 9 ++++++ .github/workflows/cuda/cu117-Linux.sh | 15 ++++++++++ .github/workflows/cuda/cu118-Linux-env.sh | 9 ++++++ .github/workflows/cuda/cu118-Linux.sh | 15 ++++++++++ .github/workflows/publish.yml | 35 +++++++++++++++-------- 6 files changed, 72 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/cuda/cu117-Linux-env.sh create mode 100644 .github/workflows/cuda/cu117-Linux.sh create mode 100644 .github/workflows/cuda/cu118-Linux-env.sh create mode 100644 .github/workflows/cuda/cu118-Linux.sh diff --git a/.github/workflows/cuda/cu116-Linux.sh b/.github/workflows/cuda/cu116-Linux.sh index e3e4e2af7..883d939fc 100644 --- a/.github/workflows/cuda/cu116-Linux.sh +++ b/.github/workflows/cuda/cu116-Linux.sh @@ -1,6 +1,6 @@ #!/bin/bash -OS=ubuntu1804 +OS=ubuntu2004 wget -nv https://developer.download.nvidia.com/compute/cuda/repos/${OS}/x86_64/cuda-${OS}.pin sudo mv cuda-${OS}.pin /etc/apt/preferences.d/cuda-repository-pin-600 diff --git a/.github/workflows/cuda/cu117-Linux-env.sh b/.github/workflows/cuda/cu117-Linux-env.sh new file mode 100644 index 000000000..ab432d16f --- /dev/null +++ b/.github/workflows/cuda/cu117-Linux-env.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +CUDA_HOME=/usr/local/cuda-11.7 +LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH} +PATH=${CUDA_HOME}/bin:${PATH} + +export FORCE_CUDA=1 +export TORCH_CUDA_ARCH_LIST="3.5;5.0+PTX;6.0;7.0;7.5;8.0;8.6" +export CUDA_HOME=/usr/local/cuda-11.7 \ No newline at end of file diff --git a/.github/workflows/cuda/cu117-Linux.sh b/.github/workflows/cuda/cu117-Linux.sh new file mode 100644 index 000000000..3935b4ddb --- /dev/null +++ b/.github/workflows/cuda/cu117-Linux.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +OS=ubuntu2004 + +wget -nv https://developer.download.nvidia.com/compute/cuda/repos/${OS}/x86_64/cuda-${OS}.pin +sudo mv cuda-${OS}.pin /etc/apt/preferences.d/cuda-repository-pin-600 +wget -nv https://developer.download.nvidia.com/compute/cuda/11.7.0/local_installers/cuda-repo-${OS}-11-7-local_11.7.0-515.43.04-1_amd64.deb +sudo dpkg -i cuda-repo-${OS}-11-7-local_11.7.0-515.43.04-1_amd64.deb +sudo cp /var/cuda-repo-${OS}-11-7-local/cuda-*-keyring.gpg /usr/share/keyrings/ + +sudo apt-get -qq update +sudo apt install cuda cuda-nvcc-11-7 cuda-libraries-dev-11-7 +sudo apt clean + +rm -f https://developer.download.nvidia.com/compute/cuda/11.7.0/local_installers/cuda-repo-${OS}-11-7-local_11.7.0-515.43.04-1_amd64.deb \ No newline at end of file diff --git a/.github/workflows/cuda/cu118-Linux-env.sh b/.github/workflows/cuda/cu118-Linux-env.sh new file mode 100644 index 000000000..c85efc6f0 --- /dev/null +++ b/.github/workflows/cuda/cu118-Linux-env.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +CUDA_HOME=/usr/local/cuda-11.8 +LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH} +PATH=${CUDA_HOME}/bin:${PATH} + +export FORCE_CUDA=1 +export TORCH_CUDA_ARCH_LIST="3.5;5.0+PTX;6.0;7.0;7.5;8.0;8.6" +export CUDA_HOME=/usr/local/cuda-11.8 \ No newline at end of file diff --git a/.github/workflows/cuda/cu118-Linux.sh b/.github/workflows/cuda/cu118-Linux.sh new file mode 100644 index 000000000..832b3fa38 --- /dev/null +++ b/.github/workflows/cuda/cu118-Linux.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +OS=ubuntu2004 + +wget -nv https://developer.download.nvidia.com/compute/cuda/repos/${OS}/x86_64/cuda-${OS}.pin +sudo mv cuda-${OS}.pin /etc/apt/preferences.d/cuda-repository-pin-600 +wget -nv https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda-repo-${OS}-11-8-local_11.8.0-520.61.05-1_amd64.deb +sudo dpkg -i cuda-repo-${OS}-11-8-local_11.8.0-520.61.05-1_amd64.deb +sudo cp /var/cuda-repo-${OS}-11-8-local/cuda-*-keyring.gpg /usr/share/keyrings/ + +sudo apt-get -qq update +sudo apt install cuda cuda-nvcc-11-8 cuda-libraries-dev-11-8 +sudo apt clean + +rm -f https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda-repo-${OS}-11-8-local_11.8.0-520.61.05-1_amd64.deb \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 72df6053c..22e10c3f2 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,7 +5,7 @@ name: Python Package on: - create: + push: tags: - '**' @@ -36,15 +36,26 @@ jobs: strategy: fail-fast: false matrix: - # os: [ubuntu-20.04] - os: [ubuntu-18.04] - python-version: ['3.7', '3.8', '3.9', '3.10'] - torch-version: [1.11.0, 1.12.0, 1.12.1] - cuda-version: ['113', '116'] + os: [ubuntu-20.04] + # python-version: ['3.8', '3.9'] + # torch-version: [1.12.1, 2.0.0] + # cuda-version: ['116', '118'] + python-version: ['3.9'] + torch-version: [1.12.1, 1.13.1, 2.0.1] + cuda-version: ['116', '117', '118'] exclude: - - torch-version: 1.11.0 + - torch-version: 1.12.1 + cuda-version: '117' + - torch-version: 1.12.1 + cuda-version: '118' + - torch-version: 1.13.1 cuda-version: '116' - + - torch-version: 1.13.1 + cuda-version: '118' + - torch-version: 2.0.1 + cuda-version: '116' + - torch-version: 2.0.1 + cuda-version: '117' steps: - name: Checkout uses: actions/checkout@v3 @@ -81,8 +92,8 @@ jobs: - name: Install PyTorch ${{ matrix.torch-version }}+cu${{ matrix.cuda-version }} run: | - pip install numpy pyyaml scipy ipython mkl mkl-include ninja cython typing pandas typing-extensions dataclasses && conda clean -ya - pip install --no-index --no-cache-dir torch==${{ matrix.torch-version }} -f https://download.pytorch.org/whl/cu${{ matrix.cuda-version }}/torch_stable.html + pip install numpy pyyaml scipy ipython mkl mkl-include ninja cython typing pandas typing-extensions dataclasses packaging einops setuptools && conda clean -ya + pip install --no-cache-dir torch==${{ matrix.torch-version }} --index-url https://download.pytorch.org/whl/cu${{ matrix.cuda-version }} --extra-index-url https://pypi.org/simple python --version python -c "import torch; print('PyTorch:', torch.__version__)" python -c "import torch; print('CUDA:', torch.version.cuda)" @@ -107,7 +118,7 @@ jobs: export FORCE_CUDA="1" export PATH=/usr/local/nvidia/bin:/usr/local/nvidia/lib64:$PATH export LD_LIBRARY_PATH=/usr/local/nvidia/lib64:/usr/local/cuda/lib64:$LD_LIBRARY_PATH - export CUDA_INSTALL_DIR=/usr/local/cuda-11.3$CUDA_INSTALL_DIR + export CUDA_INSTALL_DIR=/usr/local/cuda$CUDA_INSTALL_DIR pip install wheel python setup.py bdist_wheel --dist-dir=dist tmpname=cu${{ matrix.cuda-version }}torch${{ matrix.torch-version }} @@ -124,4 +135,4 @@ jobs: upload_url: ${{ steps.get_current_release.outputs.upload_url }} asset_path: ./${{env.wheel_name}} asset_name: ${{env.wheel_name}} - asset_content_type: application/* \ No newline at end of file + asset_content_type: application/*