Skip to content
Open
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
65 changes: 65 additions & 0 deletions .github/workflows/gpu-sim.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: GPU Simulator

# Optional, non-required check. The hosted runners have no GPU, so build.yml
# only compiles the code. This builds it and runs the ctest suites (roundtrip,
# hostptr and fortran) on a simulated NVIDIA H100
# (https://github.com/pantheongpu/pantheonsim). A simulator cannot reproduce
# hardware-specific behavior or timing, so it complements real-GPU testing and
# does not replace it.

on:
workflow_dispatch:
pull_request:
branches: [ main ]
paths:
- "src/**"
- "include/**"
- "tests/**"
- "tools/**"
- "examples/**"
- "fortran/**"
- "CMakeLists.txt"
- ".github/workflows/gpu-sim.yml"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
tests:
name: Tests (CUDA 13.0 and simulated H100)
runs-on: ubuntu-24.04
timeout-minutes: 60

steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
with:
persist-credentials: false

- name: Install Fortran compiler
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends gfortran

- name: Set up the simulated GPU and CUDA toolkit
uses: pantheongpu/setup-pantheonsim@ca87fe3143b29166822b923d6050945c5179408c # v0.1.5
with:
gpu: nvidia/h100
cuda-toolkit: "13.0"

# 90-virtual embeds PTX only, which the simulator runs. The simulator
# needs a shared CUDA runtime.
- name: Configure
run: |
cmake -S . -B build \
-DCMAKE_CUDA_ARCHITECTURES=90-virtual \
-DCMAKE_CUDA_RUNTIME_LIBRARY=Shared

- name: Build
run: cmake --build build -j3

- name: Test
run: vgpu run ctest --test-dir build --output-on-failure