-
-
Notifications
You must be signed in to change notification settings - Fork 1
125 lines (102 loc) · 3.62 KB
/
gpu-tests.yml
File metadata and controls
125 lines (102 loc) · 3.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: GPU Tests
on:
# Manual trigger for GPU tests
workflow_dispatch:
inputs:
backend:
description: 'GPU backend to test'
required: true
default: 'cuda'
type: choice
options:
- cuda
# Run on PRs with GPU label
pull_request:
types: [labeled]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
# CUDA GPU Tests - requires self-hosted runner with NVIDIA GPU
cuda-tests:
name: CUDA Tests
if: |
github.event_name == 'workflow_dispatch' &&
github.event.inputs.backend == 'cuda'
|| (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'gpu-test'))
runs-on: [self-hosted, gpu, cuda]
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Check CUDA availability
run: |
nvidia-smi
nvcc --version
- name: Cache cargo
uses: Swatinem/rust-cache@v2
with:
shared-key: "gpu-cuda"
- name: Run CUDA codegen tests
run: cargo test -p ringkernel-cuda-codegen --all-features
- name: Run CUDA backend tests
run: cargo test -p ringkernel-cuda --features cuda
- name: Run GPU execution verification tests
run: cargo test -p ringkernel-cuda --test gpu_execution_verify --features cuda
- name: Run WaveSim3D GPU benchmark
run: |
cargo run -p ringkernel-wavesim3d --bin wavesim3d-benchmark --release --features cuda-codegen -- --quick
continue-on-error: true
- name: Run TxMon GPU benchmark
run: |
cargo run -p ringkernel-txmon --bin txmon-benchmark --release --features cuda-codegen -- --quick
continue-on-error: true
# CPU Backend GPU Mock Tests - runs on all platforms
cpu-mock-tests:
name: CPU Mock GPU Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Run CPU backend tests (GPU mock)
run: cargo test -p ringkernel-cpu --all-features
- name: Run core tests with CPU backend
run: cargo test -p ringkernel-core --all-features
- name: Run ecosystem tests with CPU mock
run: cargo test -p ringkernel-ecosystem --features "persistent,actix,tower,axum,grpc"
# Performance baseline on CPU
benchmark-baseline:
name: Performance Baseline
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Run CPU benchmarks
run: cargo bench --package ringkernel -- --noplot --quick
continue-on-error: true
- name: Run WaveSim CPU benchmark
run: cargo run -p ringkernel-wavesim --example benchmark --release -- --quick
continue-on-error: true
# Summary report
summary:
name: Test Summary
needs: [cuda-tests, cpu-mock-tests]
if: always()
runs-on: ubuntu-latest
steps:
- name: Report Status
run: |
echo "## GPU Test Results" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Backend | Status |" >> $GITHUB_STEP_SUMMARY
echo "|---------|--------|" >> $GITHUB_STEP_SUMMARY
echo "| CUDA | ${{ needs.cuda-tests.result }} |" >> $GITHUB_STEP_SUMMARY
echo "| CPU Mock | ${{ needs.cpu-mock-tests.result }} |" >> $GITHUB_STEP_SUMMARY