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

Improve gpu-ci workflow #18

Merged
merged 2 commits into from
Jan 12, 2024
Merged
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
17 changes: 12 additions & 5 deletions .github/workflows/gpu-ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
# Sets env vars based on GPU platform
# Prerequisites
# - Self-hosted Nvidia GPU runner with `gpu-ci` tag in caller repo
# - Self-hosted Nvidia GPU runner with CUDA enabled
# - Runner attached in caller repo with `gpu-ci` label
# - `cuda` and `opencl` Cargo features
# - `nextest.toml` `ci` profile and `Cargo.toml` `dev-ci` profile
name: GPU CI Tests

on:
# We expect dependents to call this on `merge_group` and conditionally run with
# if: github.event_name != 'pull_request' || github.event.action == 'enqueued'
workflow_call:
inputs:
# comma-separated list of features to run in addition to `cuda`/`opencl`
features:
required: false
default: ""
type: string
samuelburnham marked this conversation as resolved.
Show resolved Hide resolved

jobs:
cuda:
Expand All @@ -28,7 +35,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: CUDA tests
run: |
cargo nextest run --profile ci --cargo-profile dev-ci --features cuda
cargo nextest run --profile ci --cargo-profile dev-ci --features "cuda,${{ inputs.features }}"

opencl:
name: Rust tests on OpenCL
Expand All @@ -49,4 +56,4 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: OpenCL tests
run: |
cargo nextest run --profile ci --cargo-profile dev-ci --features cuda,opencl
cargo nextest run --profile ci --cargo-profile dev-ci --features "cuda,opencl,${{ inputs.features }}"