Skip to content

Improve and standardize the cuPDLPx Python API #79

Improve and standardize the cuPDLPx Python API

Improve and standardize the cuPDLPx Python API #79

Workflow file for this run

name: Build
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build-cuda:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-2022]
cuda: ["12.4.0", "12.5.0", "12.6.0", "12.8.0", "12.9.0", "13.0.0", "13.1.0"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: Jimver/cuda-toolkit@v0.2.30
id: cuda-toolkit
with:
cuda: ${{ matrix.cuda }}
linux-local-args: '["--toolkit"]'
use-github-cache: 'false'
log-file-suffix: '${{ matrix.os }}-${{ matrix.cuda }}'
- name: CUDA info
run: |
echo "Installed cuda version is: ${{ steps.cuda-toolkit.outputs.cuda }}"
echo "Cuda install location: ${{ steps.cuda-toolkit.outputs.CUDA_PATH }}"
nvcc -V
- name: Install build deps (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y ninja-build zlib1g-dev
- name: Configure (Linux)
if: runner.os == 'Linux'
run: |
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCUPDLPX_BUILD_TESTS=OFF
- name: Build (Linux)
if: runner.os == 'Linux'
run: |
cmake --build build --clean-first
- name: Configure (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
cmake -B build `
-DCMAKE_CONFIGURATION_TYPES=Release `
-DCUPDLPX_BUILD_TESTS=OFF
- name: Build (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
cmake --build build --clean-first --config Release
build-hip:
name: build-hip (rocm ${{ matrix.rocm }})
strategy:
fail-fast: false
matrix:
rocm: ["7.2", "7.2.4"]
runs-on: ubuntu-latest
container:
image: rocm/dev-ubuntu-22.04:${{ matrix.rocm }}
env:
DEBIAN_FRONTEND: noninteractive
steps:
# actions/checkout needs git, which the ROCm dev image does not ship with.
- name: Install checkout prerequisites
run: |
apt-get update
apt-get install -y --no-install-recommends git ca-certificates
- uses: actions/checkout@v4
- name: Install build deps
run: |
apt-get install -y --no-install-recommends \
cmake ninja-build zlib1g-dev \
hipblas-dev hipsparse-dev hipcub-dev rocprim-dev
# The ROCm apt packages don't add /opt/rocm/bin to PATH for non-interactive shells.
- name: Add ROCm to PATH
run: echo "/opt/rocm/bin" >> "$GITHUB_PATH"
- name: HIP info
run: |
hipcc --version
- name: Configure
run: |
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCUPDLPX_BUILD_TESTS=OFF \
-DUSE_HIP=ON \
-DCMAKE_HIP_ARCHITECTURES=gfx90a \
-DCMAKE_PREFIX_PATH=/opt/rocm
- name: Build
run: |
cmake --build build --clean-first