Skip to content

Commit ff690e9

Browse files
gpu ci run
1 parent 99979db commit ff690e9

3 files changed

Lines changed: 44 additions & 44 deletions

File tree

.github/workflows/gpu-benchmark.yml

Lines changed: 29 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -3,47 +3,34 @@ name: GPU Benchmark
33
on:
44
workflow_dispatch:
55
inputs:
6-
suite:
7-
description: GPU benchmark suite to run
8-
required: true
9-
default: quick
10-
type: choice
11-
options:
12-
- quick
13-
- full
14-
- full-synthetic
15-
- gather
16-
- scatter
17-
- spmv
18-
- spmv-coo
19-
- spmm
20-
- spmm-coo
21-
- spsv
22-
- spsm
23-
- alpha-spmm-alg1
24-
- spmm-opt-alg2
25-
- spgemm
26-
- sddmm
6+
ops:
7+
description: >-
8+
Comma-separated operator ids to benchmark (keys of OP_TEST_CONFIGS in
9+
run_flagsparse_pytest.py). Leave empty to run all configured
10+
operators from conf/operators.yaml.
11+
required: false
12+
type: string
2713
matrix_dir:
28-
description: MatrixMarket file or directory used by mtx-backed suites
14+
description: MatrixMarket file or directory passed to mtx-backed operators
2915
required: true
3016
default: tests/data
3117
type: string
3218
warmup:
33-
description: Warmup iterations for suites that support it
19+
description: Warmup iterations for operators that support it
3420
required: true
3521
default: "5"
3622
type: string
3723
iters:
38-
description: Timed iterations for suites that support it
24+
description: Timed iterations for operators that support it
3925
required: true
4026
default: "20"
4127
type: string
42-
use_cusparse:
43-
description: Include cuSPARSE baselines when available on the runner
44-
required: true
45-
default: false
46-
type: boolean
28+
benchmark_args:
29+
description: >-
30+
Extra args appended to every performance invocation (e.g.
31+
"--no-cusparse" or "--with-cusparse" for operators that support it).
32+
required: false
33+
type: string
4734

4835
jobs:
4936
benchmark:
@@ -84,19 +71,24 @@ jobs:
8471
- name: Validate installed wheel import
8572
run: python tools/ci/check_installed_wheel.py --expected-version 1.0.0
8673

87-
- name: Run selected GPU benchmark suite
74+
- name: Run GPU performance benchmarks
8875
shell: bash
8976
run: |
9077
args=(
91-
--suite "${{ inputs.suite }}"
92-
--matrix-dir "${{ inputs.matrix_dir }}"
93-
--warmup "${{ inputs.warmup }}"
94-
--iters "${{ inputs.iters }}"
78+
run_flagsparse_performance.py
79+
--benchmark-input "${{ inputs.matrix_dir }}"
80+
--benchmark-warmup "${{ inputs.warmup }}"
81+
--benchmark-iters "${{ inputs.iters }}"
82+
--gpus 0
83+
--results-dir benchmark_results
9584
)
96-
if [ "${{ inputs.use_cusparse }}" = "true" ]; then
97-
args+=(--with-cusparse)
85+
if [ -n "${{ inputs.ops }}" ]; then
86+
args+=(--ops "${{ inputs.ops }}")
87+
fi
88+
if [ -n "${{ inputs.benchmark_args }}" ]; then
89+
args+=(--benchmark-args "${{ inputs.benchmark_args }}")
9890
fi
99-
python tools/ci/run_gpu_benchmark.py "${args[@]}"
91+
python "${args[@]}"
10092
10193
- name: Upload benchmark artifacts
10294
if: always()

.github/workflows/gpu-ci.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ on:
1111
options:
1212
- quick
1313
- normal
14-
marker:
15-
description: Optional pytest marker expression
14+
ops:
15+
description: >-
16+
Comma-separated operator ids to run (keys of OP_TEST_CONFIGS in
17+
run_flagsparse_pytest.py). Leave empty to run all configured
18+
operators from conf/operators.yaml.
1619
required: false
1720
type: string
1821

@@ -58,11 +61,16 @@ jobs:
5861
- name: Run GPU accuracy tests
5962
shell: bash
6063
run: |
61-
args=(tests/pytest --mode "${{ inputs.mode }}" -q)
62-
if [ -n "${{ inputs.marker }}" ]; then
63-
args+=(-m "${{ inputs.marker }}")
64+
args=(
65+
run_flagsparse_accuracy.py
66+
--mode "${{ inputs.mode }}"
67+
--gpus 0
68+
--results-dir pytest_results
69+
)
70+
if [ -n "${{ inputs.ops }}" ]; then
71+
args+=(--ops "${{ inputs.ops }}")
6472
fi
65-
pytest "${args[@]}"
73+
python "${args[@]}"
6674
6775
- name: Upload GPU CI artifacts
6876
if: always()

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ gpu-env-check:
6868
$(PYTHON) tools/ci/check_gpu_environment.py --require-cuda
6969

7070
gpu-benchmark: gpu-env-check
71-
$(PYTHON) tools/ci/run_gpu_benchmark.py --suite quick
71+
$(PYTHON) run_flagsparse_performance.py --ops gather,scatter,spmv_csr,spmm_csr --results-dir benchmark_results
7272

7373
release-check: ci-deps compile format-check lint lint-src pre-commit-check build install-wheel validate-wheel test-ci
7474
$(PYTHON) -m twine check $(DIST_DIR)/*.whl $(DIST_DIR)/*.tar.gz

0 commit comments

Comments
 (0)