diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f959a1cacf866..081e2b08c439d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,7 +6,7 @@ name: Create Release on: push: tags: - - v* + - test_* # Needed to create release and upload assets permissions: @@ -17,6 +17,8 @@ jobs: # Retrieve tag and create release name: Create Release runs-on: ubuntu-latest + container: + image: rocm/pytorch:rocm6.2_ubuntu20.04_py3.9_pytorch_release_2.3.0 outputs: upload_url: ${{ steps.create_release.outputs.upload_url }} steps: @@ -42,26 +44,21 @@ jobs: wheel: name: Build Wheel runs-on: ${{ matrix.os }} + container: + image: rocm/pytorch:rocm6.2_ubuntu20.04_py3.9_pytorch_release_2.3.0 needs: release strategy: fail-fast: false matrix: os: ['ubuntu-20.04'] - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] - pytorch-version: ['2.4.0'] # Must be the most recent version that meets requirements-cuda.txt. - cuda-version: ['11.8', '12.1'] + python-version: ['3.9'] + pytorch-version: ['2.5.0'] # Must be the most recent version that meets requirements-cuda.txt. steps: - name: Checkout uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - - name: Setup ccache - uses: hendrikmuhs/ccache-action@ed74d11c0b343532753ecead8a951bb09bb34bc9 # v1.2.14 - with: - create-symlink: true - key: ${{ github.job }}-${{ matrix.python-version }}-${{ matrix.cuda-version }} - - name: Set up Linux Env if: ${{ runner.os == 'Linux' }} run: | @@ -72,20 +69,12 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Install CUDA ${{ matrix.cuda-version }} - run: | - bash -x .github/workflows/scripts/cuda-install.sh ${{ matrix.cuda-version }} ${{ matrix.os }} - - - name: Install PyTorch ${{ matrix.pytorch-version }} with CUDA ${{ matrix.cuda-version }} - run: | - bash -x .github/workflows/scripts/pytorch-install.sh ${{ matrix.python-version }} ${{ matrix.pytorch-version }} ${{ matrix.cuda-version }} - - name: Build wheel shell: bash env: CMAKE_BUILD_TYPE: Release # do not compile with debug symbol to reduce wheel size run: | - bash -x .github/workflows/scripts/build.sh ${{ matrix.python-version }} ${{ matrix.cuda-version }} + bash -x .github/workflows/scripts/build.sh wheel_name=$(find dist -name "*whl" -print0 | xargs -0 -n 1 basename) asset_name=${wheel_name//"linux"/"manylinux1"} echo "wheel_name=${wheel_name}" >> "$GITHUB_ENV" diff --git a/.github/workflows/scripts/build.sh b/.github/workflows/scripts/build.sh index 122e4e101e201..3f33f11be921b 100644 --- a/.github/workflows/scripts/build.sh +++ b/.github/workflows/scripts/build.sh @@ -1,21 +1,16 @@ #!/bin/bash set -eux -python_executable=python$1 -cuda_home=/usr/local/cuda-$2 +python_executable=python3 # Update paths -PATH=${cuda_home}/bin:$PATH -LD_LIBRARY_PATH=${cuda_home}/lib64:$LD_LIBRARY_PATH - # Install requirements -$python_executable -m pip install -r requirements-build.txt -r requirements-cuda.txt +$python_executable -m pip install -r requirements-rocm.txt # Limit the number of parallel jobs to avoid OOM export MAX_JOBS=1 # Make sure release wheels are built for the following architectures -export TORCH_CUDA_ARCH_LIST="7.0 7.5 8.0 8.6 8.9 9.0+PTX" -export VLLM_FA_CMAKE_GPU_ARCHES="80-real;90-real" +export PYTORCH_ROCM_ARCH="gfx90a;gfx942" bash tools/check_repo.sh