Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gpu tests on self-hosted runner #1301

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
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
48 changes: 48 additions & 0 deletions .github/workflows/gpu_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: gpu-tests
on:
push:
branches:
- main
pull_request:
branches:
- '*'
workflow_dispatch:
schedule:
- cron: '0 16 * * SUN'

jobs:
gpu:
name: GPU Tests on self-hosted machine
runs-on: ['self-hosted']
strategy:
fail-fast: false
timeout-minutes: 180
defaults:
run:
shell: bash -l {0}
env:
OMP_NUM_THREADS: 1
OPENBLAS_NUM_THREADS: 1
MKL_NUM_THREADS: 1
VECLIB_MAXIMUM_THREADS: 1
NUMEXPR_NUM_THREADS: 1
PYDEVD_DISABLE_FILE_VALIDATION: 1
AGENT_TOOLSDIRECTORY: /opt/hostedtoolcache
CONDA: /home/philippjfr/miniconda3/
steps:
- uses: actions/checkout@v3
with:
fetch-depth: "100"
- uses: conda-incubator/setup-miniconda@v2
with:
auto-activate-base: true
activate-environment: ""
- name: Install environment
run: |
conda create -n datashader-gh-gpu -c conda-forge -c nvidia -c rapidsai -c pyviz python=3.10 cudf cupy numba dask spatialpandas xarray param pyct pillow toolz pytest geodatasets fastparquet pyarrow pytest-benchmark pyctdev
conda activate datashader-gh-gpu
pip install -e . --no-deps --no-build-isolation
- name: doit test_unit_gpu
run: |
conda activate datashader-gh-gpu
doit test_unit_gpu
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@
'scikit-image',
'spatialpandas',
],
'gpu': [
'cudf',
'cupy'
],
'examples': examples,
'examples_extra': examples + [
'networkx',
Expand Down
8 changes: 7 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

[tox]
# python version test group extra envs extra commands
envlist = {py39,py310,py311}-{lint,unit,unit_nojit,unit_deploy,examples,all,examples_extra}-{default}-{dev,pkg}
envlist = {py39,py310,py311}-{lint,unit,unit_nojit,unit_gpu,unit_deploy,examples,all,examples_extra}-{default}-{dev,pkg}
build = wheel

[_lint]
Expand All @@ -19,6 +19,11 @@ description = Run unit tests
deps = .[tests]
commands = pytest datashader --cov=./datashader --cov-append

[_unit_gpu]
description = Run unit tests including GPU
deps = .[tests,gpu]
commands = pytest datashader

[_unit_deploy]
description = Run unit tests without coverage
deps = .[tests]
Expand Down Expand Up @@ -57,6 +62,7 @@ changedir = {envtmpdir}
commands = pkg: {[_pkg]commands}
unit: {[_unit]commands}
unit_nojit: {[_unit_nojit]commands}
unit_gpu: {[_unit_gpu]commands}
unit_deploy: {[_unit_deploy]commands}
lint: {[_lint]commands}
examples: {[_examples]commands}
Expand Down
Loading