diff --git a/.github/workflows/build_wheels_cuda_linux.yml b/.github/workflows/build_wheels_cuda_linux.yml index 39b0ed0d..ae15e974 100644 --- a/.github/workflows/build_wheels_cuda_linux.yml +++ b/.github/workflows/build_wheels_cuda_linux.yml @@ -9,8 +9,8 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04] - pyver: ["3.8", "3.9", "3.10", "3.11"] + os: [ubuntu-22.04] + pyver: ["3.8", "3.9", "3.10", "3.11", "3.12"] cuda: ["11.8"] # wheel for 12.1 are built in build_wheels_pypi.yml defaults: run: diff --git a/.github/workflows/build_wheels_cuda_windows.yml b/.github/workflows/build_wheels_cuda_windows.yml deleted file mode 100644 index d65fd5e7..00000000 --- a/.github/workflows/build_wheels_cuda_windows.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: Build AutoGPTQ Wheels with CUDA for Windows - -on: workflow_dispatch - -jobs: - build_wheels: - if: ${{ github.repository_owner == 'AutoGPTQ' }} - name: Build wheels for ${{ matrix.os }} and Python ${{ matrix.python }} and CUDA ${{ matrix.cuda }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [windows-latest] - pyver: ["3.8", "3.9", "3.10", "3.11"] - cuda: ["11.8"] # wheel for 12.1 are built in build_wheels_pypi.yml - defaults: - run: - shell: pwsh - env: - CUDA_VERSION: ${{ matrix.cuda }} - - steps: - - uses: actions/checkout@v3 - - - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.pyver }} - - - name: Setup Miniconda - uses: conda-incubator/setup-miniconda@v2.2.0 - with: - activate-environment: "build" - python-version: ${{ matrix.pyver }} - mamba-version: "*" - use-mamba: false - channels: conda-forge,defaults - channel-priority: true - add-pip-as-python-dependency: true - auto-activate-base: false - - - name: Install Dependencies - run: | - conda install cuda-toolkit -c "nvidia/label/cuda-${env:CUDA_VERSION}.0" - - # Refer to https://pytorch.org/get-started/locally/ - python -m pip install torch --index-url https://download.pytorch.org/whl/cu118 - python -m pip install --upgrade build setuptools wheel ninja numpy gekko pandas - - - name: Check install - run: | - python -c "import torch; print('torch version:', torch.__version__)" - - - name: Build Wheel - run: | - $env:CUDA_PATH = $env:CONDA_PREFIX - $env:CUDA_HOME = $env:CONDA_PREFIX - - $env:TORCH_CUDA_ARCH_LIST = '6.0 6.1 7.0 7.5 8.0 8.6+PTX' - if ([decimal]$env:CUDA_VERSION -ge 11.8) { $env:TORCH_CUDA_ARCH_LIST = '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' } - python setup.py sdist bdist_wheel - - - uses: actions/upload-artifact@v3 - with: - name: 'windows-cuda-wheels' - path: ./dist/*.whl diff --git a/.github/workflows/build_wheels_pypi_linux.yml b/.github/workflows/build_wheels_pypi_linux.yml index 29cd45ca..940391e2 100644 --- a/.github/workflows/build_wheels_pypi_linux.yml +++ b/.github/workflows/build_wheels_pypi_linux.yml @@ -1,16 +1,16 @@ -name: Build AutoGPTQ Wheels for PyPI with CUDA for Linux +name: Build AutoGPTQ-NEXT Wheels for PyPI with CUDA for Linux on: workflow_dispatch jobs: build_wheels: - if: ${{ github.repository_owner == 'AutoGPTQ' }} + if: ${{ github.repository_owner == 'ModelCloud' }} name: Build wheels for ${{ matrix.os }} and Python ${{ matrix.python }} and CUDA 12.1 runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04] - pyver: ["3.8", "3.9", "3.10", "3.11"] + os: [ubuntu-22.04] + pyver: ["3.8", "3.9", "3.10", "3.11", "3.12"] defaults: run: shell: bash diff --git a/.github/workflows/build_wheels_pypi_windows.yml b/.github/workflows/build_wheels_pypi_windows.yml deleted file mode 100644 index 403e8eab..00000000 --- a/.github/workflows/build_wheels_pypi_windows.yml +++ /dev/null @@ -1,72 +0,0 @@ -name: Build AutoGPTQ Wheels for PyPI with CUDA for Windows - -on: workflow_dispatch - -jobs: - build_wheels: - if: ${{ github.repository_owner == 'AutoGPTQ' }} - name: Build wheels for ${{ matrix.os }} and Python ${{ matrix.python }} and CUDA 12.1 - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [windows-latest] - pyver: ["3.8", "3.9", "3.10", "3.11"] - defaults: - run: - shell: pwsh - env: - CUDA_VERSION: "12.1" - - steps: - - uses: actions/checkout@v3 - - - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.pyver }} - - - name: Setup Miniconda - uses: conda-incubator/setup-miniconda@v2.2.0 - with: - activate-environment: "build" - python-version: ${{ matrix.pyver }} - mamba-version: "*" - use-mamba: false - channels: conda-forge,defaults - channel-priority: true - add-pip-as-python-dependency: true - auto-activate-base: false - - - name: Install Dependencies - run: | - conda install cuda-toolkit -c "nvidia/label/cuda-${env:CUDA_VERSION}.0" - - # Refer to https://pytorch.org/get-started/locally/ - python -m pip install torch --index-url https://download.pytorch.org/whl/cu121 - - python -m pip install --upgrade build setuptools wheel ninja numpy gekko pandas - - - name: Check install - run: | - python -c "import torch; print('torch version:', torch.__version__)" - - - name: Build Wheel - run: | - $env:CUDA_PATH = $env:CONDA_PREFIX - $env:CUDA_HOME = $env:CONDA_PREFIX - - $env:TORCH_CUDA_ARCH_LIST = '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' - - $env:PYPI_RELEASE = "1" - - echo "CUDA_PATH:" - echo $env:CUDA_PATH - - echo "PYPI_RELEASE:" - echo $env:PYPI_RELEASE - - python setup.py sdist bdist_wheel - - - uses: actions/upload-artifact@v3 - with: - name: 'windows-cuda-wheels-pypi' - path: ./dist/*.whl diff --git a/.github/workflows/build_wheels_rocm.yml b/.github/workflows/build_wheels_rocm.yml deleted file mode 100644 index 482fafb6..00000000 --- a/.github/workflows/build_wheels_rocm.yml +++ /dev/null @@ -1,131 +0,0 @@ -name: Build AutoGPTQ Wheels with ROCm - -on: workflow_dispatch - -jobs: - build_wheels: - if: ${{ github.repository_owner == 'AutoGPTQ' }} - - strategy: - matrix: - os: [ubuntu-20.04] - python: ["3.8", "3.9", "3.10", "3.11"] - rocm: ["5.7.3"] # we build only for ROCm 5.7 to match PyTorch 2.2.0 and PyTorch 2.2 nightly - - name: Build wheels for ${{ matrix.os }} and Python ${{ matrix.python }} and RoCm ${{ matrix.rocm }} - runs-on: ${{ matrix.os }} - - defaults: - run: - shell: bash - - steps: - - uses: actions/checkout@v3 - - - name: Free disk space - run: | - # Go from 19G to 54G free disk space in 3min - df -h - sudo apt-get update - sudo apt-get purge -y '^apache.*' - sudo apt-get purge -y '^imagemagick.*' - sudo apt-get purge -y '^dotnet.*' - sudo apt-get purge -y '^aspnetcore.*' - sudo apt-get purge -y 'php.*' - sudo apt-get purge -y '^temurin.*' - sudo apt-get purge -y '^mysql.*' - sudo apt-get purge -y '^java.*' - sudo apt-get purge -y '^openjdk.*' - sudo apt-get purge -y microsoft-edge-stable google-cloud-cli azure-cli google-chrome-stable firefox powershell mono-devel - df -h - sudo apt-get autoremove -y >/dev/null 2>&1 - sudo apt-get clean - df -h - echo "https://github.com/actions/virtual-environments/issues/709" - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - df -h - echo "remove big /usr/local" - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf /usr/local/lib/android >/dev/null 2>&1 - df -h - echo "remove /usr/share leftovers" - sudo rm -rf /usr/share/dotnet/sdk > /dev/null 2>&1 - sudo rm -rf /usr/share/dotnet/shared > /dev/null 2>&1 - sudo rm -rf /usr/share/swift > /dev/null 2>&1 - df -h - echo "remove other leftovers" - sudo rm -rf /var/lib/mysql > /dev/null 2>&1 - sudo rm -rf /home/runner/.dotnet > /dev/null 2>&1 - sudo rm -rf /home/runneradmin/.dotnet > /dev/null 2>&1 - sudo rm -rf /etc/skel/.dotnet > /dev/null 2>&1 - sudo rm -rf /usr/local/.ghcup > /dev/null 2>&1 - sudo rm -rf /usr/local/aws-cli > /dev/null 2>&1 - sudo rm -rf /usr/local/lib/node_modules > /dev/null 2>&1 - sudo rm -rf /usr/lib/heroku > /dev/null 2>&1 - sudo rm -rf /usr/local/share/chromium > /dev/null 2>&1 - df -h - - - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python }} - - - name: Setup Miniconda - uses: conda-incubator/setup-miniconda@v2.2.0 - with: - activate-environment: "build" - python-version: ${{ matrix.python }} - mamba-version: "*" - use-mamba: false - channels: conda-forge,defaults - channel-priority: true - add-pip-as-python-dependency: true - auto-activate-base: false - - - name: Set up environment - run: | - echo "Using python:" - python --version - which python - - if [[ "${{ matrix.rocm }}" == "5.4.2" ]]; then - export ROCM_DL_FILE=amdgpu-install_5.4.50402-1_all.deb - elif [[ "${{ matrix.rocm }}" == "5.6.1" ]]; then - export ROCM_DL_FILE=amdgpu-install_5.6.50601-1_all.deb - elif [[ "${{ matrix.rocm }}" == "5.7.3" ]]; then - export ROCM_DL_FILE=amdgpu-install_5.7.50703-1_all.deb - else - echo Unknown rocm version - exit 1 - fi - - curl -O https://repo.radeon.com/amdgpu-install/${{ matrix.rocm }}/ubuntu/focal/$ROCM_DL_FILE - sudo dpkg -i $ROCM_DL_FILE - sudo DEBIAN_FRONTEND=noninteractive amdgpu-install --usecase=rocm --no-dkms --no-32 -y - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y --no-install-recommends rocsparse-dev rocthrust-dev rocblas-dev hipblas-dev hipsparse-dev - - python -m pip install --upgrade build setuptools wheel ninja numpy gekko pandas - - if [[ "${{ matrix.rocm }}" == "5.7.3" ]]; then - echo "Using PyTorch stable" - python -m pip install torch --index-url https://download.pytorch.org/whl/rocm5.7 - else - echo Unknown rocm version for python install - exit 1 - fi - - - name: Build wheels - run: | - echo "Using python for build:" - python --version - which python - - ROCM_VERSION=${{ matrix.rocm }} python setup.py sdist bdist_wheel - - - uses: actions/upload-artifact@v3 - with: - name: 'linux-rocm-wheels' - path: ./dist/*.whl