Skip to content

Add Jmh benchmarks along with corresponding rust benchmarks #4377

Add Jmh benchmarks along with corresponding rust benchmarks

Add Jmh benchmarks along with corresponding rust benchmarks #4377

Workflow file for this run

name: CUDA
# Concurrency control:
# - PRs: new commits on a feature branch will cancel in-progress (outdated) runs.
# - Push to develop: runs queue sequentially, never cancelled.
# - `workflow_dispatch`: groups by branch and queues if run on develop.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/develop' }}
on:
push:
branches: [develop]
pull_request: { }
workflow_dispatch: { }
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
changes:
name: "Detect CUDA changes"
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
pull-requests: read
outputs:
run-cuda-san: ${{ github.event_name != 'pull_request' || steps.filter.outputs.cuda == 'true' }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4
id: filter
if: github.event_name == 'pull_request'
with:
filters: |
cuda:
- "vortex-cuda/**"
- "vortex-python/python/vortex/__init__.py"
- "vortex-python/pyproject.toml"
- "vortex-python/test/test_cuda.py"
- "vortex-python-cuda/**"
- "vortex-test/**"
- "pyproject.toml"
- "uv.lock"
- ".github/workflows/**"
cuda-build-lint:
needs: [changes]
if: >-
always() && github.repository == 'vortex-data/vortex' &&
needs.changes.outputs.run-cuda-san == 'true'
name: "CUDA build & lint"
timeout-minutes: 30
runs-on: runs-on=${{ github.run_id }}/runner=gpu/tag=cuda-build
steps:
- uses: runs-on/action@v2
with:
sccache: s3
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: ./.github/actions/check-rebuild
with:
command: >-
cargo build --profile ci --locked --all-features --all-targets
-p vortex-cuda -p vortex-cuda-ffi -p vortex-cub -p vortex-nvcomp
-p gpu-scan-cli -p vortex-test-e2e-cuda -p vortex-python-cuda
- name: Clippy CUDA crates
run: |
cargo clippy --profile ci --locked --all-features --all-targets \
-p vortex-cuda \
-p vortex-cuda-ffi \
-p vortex-cub \
-p vortex-nvcomp \
-p gpu-scan-cli \
-p vortex-test-e2e-cuda \
-p vortex-python-cuda \
-- -D warnings
cuda-test:
needs: [changes]
if: >-
always() && github.repository == 'vortex-data/vortex' &&
needs.changes.outputs.run-cuda-san == 'true'
name: "CUDA tests"
timeout-minutes: 30
runs-on: runs-on=${{ github.run_id }}/runner=gpu/tag=cuda-tests
steps:
- uses: runs-on/action@v2
with:
sccache: s3
- name: Display NVIDIA SMI details
run: |
nvidia-smi
nvidia-smi -L
nvidia-smi -q -d Memory
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install uv
uses: spiraldb/actions/.github/actions/setup-uv@a746510eafaa926484c354541cfc49b2ec06cc63 # 0.18.6
with:
sync: false
- name: Install nextest
uses: taiki-e/install-action@9e1e5806d4a4822de933115878265be9aaa786d9 # v2
with:
tool: nextest
- name: Rust Tests
env:
FLAT_LAYOUT_INLINE_ARRAY_NODE: true
run: |
cargo nextest run \
--cargo-profile ci \
--locked \
-p vortex-file \
-p vortex-cuda \
-p vortex-cuda-ffi \
-p vortex-cub \
-p vortex-nvcomp \
-p vortex-test-e2e-cuda \
-p vortex-python-cuda \
--all-features \
--no-fail-fast \
--target x86_64-unknown-linux-gnu \
--verbose
- name: Python CUDA extension checks
env:
MATURIN_PEP517_ARGS: "--profile ci"
run: |
# --all-packages installs the shared dev tooling (basedpyright) from the
# root `dev` group; --extra cuda adds the vortex-data-cuda extension.
uv run --all-packages --extra cuda basedpyright vortex-python vortex-python-cuda
uv run --all-packages --extra cuda pytest --benchmark-disable vortex-python/test/test_cuda.py vortex-python-cuda/test
cuda-test-sanitizer:
needs: [changes]
if: >-
always() && github.repository == 'vortex-data/vortex' &&
needs.changes.outputs.run-cuda-san == 'true'
name: "CUDA tests (${{ matrix.sanitizer }})"
timeout-minutes: 30
runs-on: runs-on=${{ github.run_id }}/runner=gpu/tag=cuda-test-sanitizer
strategy:
fail-fast: false
matrix:
include:
- sanitizer: memcheck
runner_flags: "--tool memcheck --leak-check=full --error-exitcode 1"
# TODO(joe): try to re-enable racecheck, it is hanging in CI.
# - sanitizer: racecheck
# runner_flags: "--tool racecheck --error-exitcode 1"
- sanitizer: synccheck
runner_flags: "--tool synccheck --error-exitcode 1"
- sanitizer: initcheck
runner_flags: "--tool initcheck --error-exitcode 1"
steps:
- uses: runs-on/action@v2
with:
sccache: s3
- name: Display NVIDIA SMI details
run: |
nvidia-smi
nvidia-smi -L
nvidia-smi -q -d Memory
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build tests
run: cargo test --profile ci --locked -p vortex-cuda --all-features --target x86_64-unknown-linux-gnu --no-run
- name: "CUDA - ${{ matrix.sanitizer }}"
env:
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER: "compute-sanitizer ${{ matrix.runner_flags }}"
run: cargo test --profile ci --locked -p vortex-cuda --all-features --target x86_64-unknown-linux-gnu
cuda-test-cudf:
needs: [changes]
if: >-
always() && github.repository == 'vortex-data/vortex' &&
needs.changes.outputs.run-cuda-san == 'true'
name: "CUDA tests (cudf)"
timeout-minutes: 30
runs-on: runs-on=${{ github.run_id }}/runner=gpu/tag=cuda-test-cudf
steps:
- uses: runs-on/action@v2
with:
sccache: s3
- name: Display NVIDIA SMI details
run: |
nvidia-smi
nvidia-smi -L
nvidia-smi -q -d Memory
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build cudf test library
run: cargo build --profile ci --locked -p vortex-test-e2e-cuda --target x86_64-unknown-linux-gnu
- name: Download and run cudf-test-harness
run: |
curl -fsSL https://github.com/vortex-data/cudf-test-harness/releases/latest/download/cudf-test-harness-x86_64.tar.gz | tar -xz
$GITHUB_WORKSPACE/target/x86_64-unknown-linux-gnu/ci/cudf_harness_runner \
./cudf-test-harness-x86_64/cudf-test-harness \
$GITHUB_WORKSPACE/target/x86_64-unknown-linux-gnu/ci/libvortex_test_e2e_cuda.so