Skip to content

Commit 7e9887a

Browse files
Zethsonscverse-bot
andauthored
GPU CI (#21)
Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> Co-authored-by: scverse-bot <108668866+scverse-bot@users.noreply.github.com>
1 parent 13c4281 commit 7e9887a

File tree

10 files changed

+117
-3
lines changed

10 files changed

+117
-3
lines changed

.cirun.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
runners:
2+
- name: aws-gpu-runner
3+
cloud: aws
4+
instance_type: g4dn.xlarge
5+
machine_image: ami-067a4ba2816407ee9
6+
region: eu-north-1
7+
preemptible:
8+
- true
9+
- false
10+
labels:
11+
- cirun-aws-gpu

.github/workflows/test-gpu.yaml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: GPU-CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
types:
8+
- labeled
9+
- opened
10+
- synchronize
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
check:
18+
name: "Triage: Check if GPU tests are allowed to run"
19+
if: (!contains(github.event.pull_request.labels.*.name, 'skip-gpu-ci'))
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: flying-sheep/check@v1
23+
with:
24+
success: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'run-gpu-ci') }}
25+
test:
26+
name: GPU Tests
27+
needs: check
28+
runs-on: "cirun-aws-gpu--${{ github.run_id }}"
29+
timeout-minutes: 30
30+
31+
defaults:
32+
run:
33+
shell: bash -el {0}
34+
steps:
35+
- uses: actions/checkout@v5
36+
with:
37+
fetch-depth: 0
38+
39+
- name: Nvidia SMI sanity check
40+
run: nvidia-smi
41+
42+
- name: Install Python
43+
uses: actions/setup-python@v5
44+
with:
45+
python-version: "3.13"
46+
47+
- name: Install uv
48+
uses: astral-sh/setup-uv@v7
49+
with:
50+
cache-dependency-glob: pyproject.toml
51+
52+
- name: Install fknni
53+
run: uv pip install --system -e ".[test]"
54+
- name: Pip list
55+
run: pip list
56+
57+
- name: Run test
58+
run: pytest -m gpu
59+
60+
- name: Remove 'run-gpu-ci' Label
61+
if: always()
62+
uses: actions-ecosystem/action-remove-labels@v1
63+
with:
64+
labels: "run-gpu-ci"
65+
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
filter: blob:none
3232
fetch-depth: 0
3333
- name: Install uv
34-
uses: astral-sh/setup-uv@v5
34+
uses: astral-sh/setup-uv@v7
3535
- name: Get test environments
3636
id: get-envs
3737
run: |

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ and this project adheres to [Semantic Versioning][].
88
[keep a changelog]: https://keepachangelog.com/en/1.0.0/
99
[semantic versioning]: https://semver.org/spec/v2.0.0.html
1010

11+
## [1.3.0]
12+
13+
- Add GPU CI ([#15](https://github.com/zethson/fknni/pull/15)) @zethson
14+
- Add support for 3D imputation ([#14](https://github.com/zethson/fknni/pull/14)) @zethson
15+
- Require Python 3.12+ ([#13](https://github.com/zethson/fknni/pull/14)) @zethson
16+
1117
## [1.2.0]
1218

1319
- Iterative imputation for very sparse datasets

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Please refer to the [documentation][link-docs]. In particular, the
2222

2323
## Installation
2424

25-
You need to have Python 3.10 or newer installed on your system.
25+
You need to have Python 3.12 or newer installed on your system.
2626
If you don't have Python installed, we recommend installing [Mambaforge](https://github.com/conda-forge/miniforge#mambaforge).
2727

2828
Install the latest release of `fknni` from [PyPI](https://pypi.org/project/fknni):

ci/environment.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: fknni
2+
channels:
3+
- rapidsai
4+
- nvidia
5+
- conda-forge
6+
dependencies:
7+
- rapids=25.10
8+
- python=3.13
9+
- cuda-version=12.9
10+
- cudnn

pyproject.toml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,24 @@ optional-dependencies.doc = [
4545
"sphinxcontrib-bibtex>=1",
4646
"sphinxext-opengraph",
4747
]
48+
optional-dependencies.rapids12 = [
49+
"cudf-cu12>=25.10",
50+
"cugraph-cu12>=25.10",
51+
"cuml-cu12>=25.10",
52+
"cupy-cuda12x",
53+
"cuvs-cu12>=25.10",
54+
]
55+
optional-dependencies.rapids13 = [
56+
"cudf-cu13>=25.10",
57+
"cugraph-cu13>=25.10",
58+
"cuml-cu13>=25.10",
59+
"cupy-cuda13x",
60+
"cuvs-cu13>=25.10",
61+
]
4862
optional-dependencies.test = [
4963
"coverage",
5064
"pytest",
5165
]
52-
5366
urls.Documentation = "https://fknni.readthedocs.io/"
5467
urls.Homepage = "https://github.com/zethson/fknni"
5568
urls.Source = "https://github.com/zethson/fknni"
@@ -130,6 +143,9 @@ xfail_strict = true
130143
addopts = [
131144
"--import-mode=importlib", # allow using test files with same name
132145
]
146+
markers = [
147+
"gpu: mark test to run on GPU",
148+
]
133149

134150
[tool.coverage.run]
135151
source = [ "fknni" ]
File renamed without changes.

tests/gpu/test_gpu.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import pytest
2+
3+
4+
@pytest.mark.gpu
5+
def test_gpu():
6+
assert 1 + 1 == 2

0 commit comments

Comments
 (0)