Files
rustytorch/.gitea/workflows/gpu-tests.yml
T
2026-03-04 00:08:42 +00:00

75 lines
1.9 KiB
YAML

name: GPU Tests
on:
push:
branches: [ main ]
paths:
- 'crates/core/rtx-tensor/**'
- 'crates/core/rtx-kernel/**'
- 'crates/training/rtx-flash-attention/**'
- 'crates/production/rtx-inference/**'
pull_request:
branches: [ main ]
paths:
- 'crates/core/rtx-tensor/**'
- 'crates/core/rtx-kernel/**'
- 'crates/training/rtx-flash-attention/**'
- 'crates/production/rtx-inference/**'
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
# Check if GPU runner is available
check-gpu-availability:
name: Check GPU Availability
runs-on: ubuntu-latest
outputs:
has_gpu: ${{ steps.check.outputs.has_gpu }}
steps:
- name: Check for GPU runner
id: check
run: |
# This would check if a self-hosted GPU runner is available
echo "has_gpu=false" >> $GITEA_OUTPUT
echo "GPU runner not configured yet - tests will be skipped"
# CUDA tests (requires self-hosted runner with NVIDIA GPU)
cuda-tests:
name: CUDA Tests
needs: check-gpu-availability
if: needs.check-gpu-availability.outputs.has_gpu == 'true'
runs-on: [self-hosted, gpu, cuda]
strategy:
fail-fast: false
matrix:
cuda_version: ['11.8', '12.1']
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Check CUDA version
run: nvidia-smi && nvcc --version
- name: Run CUDA tests
run: cargo test --features cuda
env:
CUDA_VERSION: ${{ matrix.cuda_version }}
# Metal tests (requires macOS runner with Apple Silicon)
metal-tests:
name: Metal Tests
needs: check-gpu-availability
if: needs.check-gpu-availability.outputs.has_gpu == 'true'
runs-on: [self-hosted, macos, metal]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Run Metal tests
run: cargo test --features metal