mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2026-11-27 17:43:18 +00:00
124 lines
4.8 KiB
YAML
124 lines
4.8 KiB
YAML
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
# SPDX-FileCopyrightText: 2026 Saqib Khan <saqibkhan@utexas.edu>
|
|
name: CUDA on simulated H100
|
|
|
|
# The hosted runners have no GPU, so the other workflows never build with
|
|
# ENABLE_CUDA=ON. This builds gnss-sdr and run_tests with the CUDA blocks and
|
|
# runs the CUDA unit tests 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.
|
|
|
|
# A cache saved by a pull request run is only visible to that pull request. The
|
|
# runs on pushes to next save the simulator build and the ccache where every
|
|
# pull request targeting next can restore them.
|
|
# Pull requests run this job only if they touch the CUDA code. A change
|
|
# elsewhere that breaks the CUDA build is caught by the run on next.
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- next
|
|
paths:
|
|
- "src/**"
|
|
- "tests/**"
|
|
- "cmake/**"
|
|
- "CMakeLists.txt"
|
|
- ".github/workflows/gpu-sim.yml"
|
|
pull_request:
|
|
paths:
|
|
# CUDA sources, the GPU tracking block and their tests
|
|
- "**/*cuda*"
|
|
- "**/*gpu*"
|
|
- "**/*.cu"
|
|
# Code with CUDA-specific branches
|
|
- "src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.*"
|
|
- "src/algorithms/acquisition/libs/acq_conf.*"
|
|
- "src/algorithms/signal_source/gnuradio_blocks/evk1029_source.*"
|
|
# Where the CUDA sources are added to the build
|
|
- "src/algorithms/acquisition/libs/CMakeLists.txt"
|
|
- "src/algorithms/tracking/libs/CMakeLists.txt"
|
|
- "src/algorithms/signal_source/libs/CMakeLists.txt"
|
|
- ".github/workflows/gpu-sim.yml"
|
|
|
|
# Runs on next are left to finish, so that they save their caches
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
cuda-sim:
|
|
name: CUDA 13.0 on simulated H100
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 120
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
persist-credentials: false
|
|
|
|
# library-path false: the build links the toolkit's cuFFT as usual, and
|
|
# the tests run under `vgpu run`, which supplies the simulator's libraries
|
|
- name: Set up the simulated H100 and CUDA toolkit
|
|
uses: pantheongpu/setup-pantheonsim@v0.1.10
|
|
with:
|
|
gpu: nvidia/h100
|
|
cuda-toolkit: "13.0"
|
|
library-path: "false"
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y --no-install-recommends ninja-build ccache \
|
|
libunwind-dev libboost-dev libboost-date-time-dev libboost-system-dev \
|
|
libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev \
|
|
libboost-serialization-dev liblog4cpp5-dev gnuradio-dev gr-osmosdr \
|
|
libpugixml-dev libpcap-dev libblas-dev liblapack-dev libarmadillo-dev \
|
|
libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev libmatio-dev \
|
|
googletest protobuf-compiler libprotobuf-dev python3-mako liborc-0.4-dev
|
|
|
|
- name: Restore ccache
|
|
uses: actions/cache@v6
|
|
with:
|
|
path: ~/.cache/ccache
|
|
key: ccache-gpu-sim-${{ github.sha }}
|
|
restore-keys: |
|
|
ccache-gpu-sim-
|
|
|
|
# The simulator runs PTX (90-virtual) and needs the shared CUDA runtime.
|
|
# The setup action exports a CMAKE_TOOLCHAIN_FILE that only selects that
|
|
# runtime, which is done here explicitly: it is unset because GNSS-SDR
|
|
# takes a toolchain file as a sign of cross-compilation.
|
|
# ENABLE_EVK1029 adds cuda_ddc_engine.cu to the build.
|
|
- name: Configure
|
|
run: |
|
|
unset CMAKE_TOOLCHAIN_FILE
|
|
cmake -S . -B build -GNinja \
|
|
-DENABLE_CUDA=ON \
|
|
-DENABLE_EVK1029=ON \
|
|
-DCMAKE_CUDA_COMPILER=/usr/local/cuda-13.0/bin/nvcc \
|
|
-DCUDAToolkit_ROOT=/usr/local/cuda-13.0 \
|
|
-DCMAKE_CUDA_ARCHITECTURES=90-virtual \
|
|
-DCMAKE_CUDA_RUNTIME_LIBRARY=Shared \
|
|
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
|
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
|
-DCMAKE_CUDA_COMPILER_LAUNCHER=ccache
|
|
|
|
- name: Build gnss-sdr and run_tests
|
|
run: |
|
|
unset CMAKE_TOOLCHAIN_FILE
|
|
ccache -z
|
|
cmake --build build -j3 --target gnss-sdr run_tests
|
|
ccache -s
|
|
|
|
- name: CUDA acquisition engine tests
|
|
run: vgpu run --gpu nvidia/h100 ./install/run_tests --gtest_filter='CudaPcpsEngineTest.*'
|
|
|
|
- name: CUDA PCPS acquisition block tests
|
|
run: vgpu run --gpu nvidia/h100 ./install/run_tests --gtest_filter='GpsL1CaPcpsAcquisitionCudaTest.*'
|
|
|
|
- name: CUDA multicorrelator test
|
|
run: vgpu run --gpu nvidia/h100 ./install/run_tests --gtest_filter='GpuMulticorrelatorTest.*'
|