Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 0 additions & 50 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,53 +64,3 @@ jobs:

- name: Test GPU infrastructure
run: uv run pytest -q -m "not gpu"

gpu-test:
if: github.event_name == 'push'
needs: build-and-test
concurrency:
group: gpu-ci
cancel-in-progress: false
runs-on: ubuntu-24.04
timeout-minutes: 45

steps:
- uses: actions/checkout@v4

- name: Install LLVM ${{ env.LLVM_VERSION }} and MLIR
run: |
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
sudo add-apt-repository -y "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-${LLVM_VERSION} main"
sudo apt-get update
sudo apt-get install -y \
clang-${LLVM_VERSION} \
llvm-${LLVM_VERSION}-dev \
libmlir-${LLVM_VERSION}-dev \
mlir-${LLVM_VERSION}-tools

- uses: astral-sh/setup-uv@v4

- name: Install Python dependencies
run: uv sync

- name: Configure
run: |
cmake -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=clang-${LLVM_VERSION} \
-DCMAKE_CXX_COMPILER=clang++-${LLVM_VERSION} \
-DMLIR_DIR=/usr/lib/llvm-${LLVM_VERSION}/lib/cmake/mlir \
-DLLVM_DIR=/usr/lib/llvm-${LLVM_VERSION}/lib/cmake/llvm

- name: Build
run: cmake --build build

- name: Run GPU tests on Vast.ai
env:
VASTAI_API_KEY: ${{ secrets.VASTAI_API_KEY }}
run: |
if [ -z "$VASTAI_API_KEY" ]; then
echo "VASTAI_API_KEY repository secret is not configured" >&2
exit 1
fi
uv run pytest -v -m gpu
113 changes: 0 additions & 113 deletions .github/workflows/gpu-pr.yml

This file was deleted.

83 changes: 83 additions & 0 deletions .github/workflows/gpu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: GPU

on:
pull_request:
types: [labeled]
workflow_run:
workflows: [CI]
types: [completed]
branches: [canon]

permissions:
contents: read
issues: write
pull-requests: write

env:
LLVM_VERSION: "20"

jobs:
gpu-test:
if: >-
(github.event_name == 'pull_request' && github.event.label.name == 'gpu-test' &&
github.actor == github.repository_owner && github.triggering_actor == github.repository_owner &&
github.event.pull_request.head.repo.full_name == github.repository) ||
(github.event_name == 'workflow_run' && github.event.workflow_run.event == 'push' &&
github.event.workflow_run.conclusion == 'success')
concurrency:
group: gpu-ci
cancel-in-progress: false
runs-on: ubuntu-24.04
timeout-minutes: 45

steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.sha }}

- name: Install LLVM ${{ env.LLVM_VERSION }} and MLIR
run: |
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
sudo add-apt-repository -y "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-${LLVM_VERSION} main"
sudo apt-get update
sudo apt-get install -y \
clang-${LLVM_VERSION} \
llvm-${LLVM_VERSION}-dev \
libmlir-${LLVM_VERSION}-dev \
mlir-${LLVM_VERSION}-tools

- uses: astral-sh/setup-uv@v4

- name: Install Python dependencies
run: uv sync

- name: Configure
run: |
cmake -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=clang-${LLVM_VERSION} \
-DCMAKE_CXX_COMPILER=clang++-${LLVM_VERSION} \
-DMLIR_DIR=/usr/lib/llvm-${LLVM_VERSION}/lib/cmake/mlir \
-DLLVM_DIR=/usr/lib/llvm-${LLVM_VERSION}/lib/cmake/llvm

- name: Build
run: cmake --build build

- name: Run GPU tests on Vast.ai
env:
VASTAI_API_KEY: ${{ secrets.VASTAI_API_KEY }}
run: |
if [ -z "$VASTAI_API_KEY" ]; then
echo "VASTAI_API_KEY repository secret is not configured" >&2
exit 1
fi
uv run pytest -v -m gpu

- name: Remove GPU test trigger label
if: always() && github.event_name == 'pull_request'
env:
GH_TOKEN: ${{ github.token }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
gh api --method DELETE \
"repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/labels/gpu-test"
Loading