Skip to content

Commit

Permalink
CUDA 12.1.1 build
Browse files Browse the repository at this point in the history
  • Loading branch information
casper-hansen committed Oct 29, 2023
1 parent b9ed664 commit dde1206
Showing 1 changed file with 29 additions and 35 deletions.
64 changes: 29 additions & 35 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,45 @@ name: Build AutoAWQ Wheels with CUDA

on:
push:
tags:
- "v*"
branches:
- cuda_releases

jobs:
release:
# Retrieve tag and create release
name: Create Release
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Checkout
uses: actions/checkout@v3
# release:
# # Retrieve tag and create release
# name: Create Release
# runs-on: ubuntu-latest
# outputs:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# steps:
# - name: Checkout
# uses: actions/checkout@v3

- name: Extract branch info
shell: bash
run: |
echo "release_tag=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
# - name: Extract branch info
# shell: bash
# run: |
# echo "release_tag=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Create Release
id: create_release
uses: "actions/github-script@v6"
env:
RELEASE_TAG: ${{ env.release_tag }}
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
script: |
const script = require('.github/workflows/scripts/github_create_release.js')
await script(github, context, core)
# - name: Create Release
# id: create_release
# uses: "actions/github-script@v6"
# env:
# RELEASE_TAG: ${{ env.release_tag }}
# with:
# github-token: "${{ secrets.GITHUB_TOKEN }}"
# script: |
# const script = require('.github/workflows/scripts/github_create_release.js')
# await script(github, context, core)

build_wheels:
name: Build AWQ
runs-on: ${{ matrix.os }}
needs: release

strategy:
matrix:
os: [ubuntu-20.04, windows-latest]
pyver: ["3.8", "3.9", "3.10", "3.11"]
cuda: ["11.8"]
cuda: ["11.8.0", "12.1.1"]
defaults:
run:
shell: pwsh
Expand Down Expand Up @@ -81,14 +80,15 @@ jobs:
- name: Install Dependencies
run: |
# Install CUDA toolkit
mamba install -y 'cuda' -c "nvidia/label/cuda-${env:CUDA_VERSION}.0"
mamba install -y 'cuda' -c "nvidia/label/cuda-${env:CUDA_VERSION}"
# Env variables
$env:CUDA_PATH = $env:CONDA_PREFIX
$env:CUDA_HOME = $env:CONDA_PREFIX
# Install torch
$cudaVersionPytorch = $env:CUDA_VERSION.Replace('.', '')
$cudaVersion = $env:CUDA_VERSION.Replace('.', '')
$cudaVersionPytorch = $cudaVersion.Substring(0, $cudaVersion.Length - 1)
python -m pip install --upgrade --no-cache-dir torch==2.0.1+cu$cudaVersionPytorch --index-url https://download.pytorch.org/whl/cu$cudaVersionPytorch
python -m pip install build setuptools wheel ninja
Expand All @@ -105,9 +105,3 @@ jobs:
$env:CUDA_HOME = $env:CONDA_PREFIX
python setup.py sdist bdist_wheel
- name: Upload Assets
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: ./dist/*.whl

0 comments on commit dde1206

Please sign in to comment.