From 16825077355ac611af659728f8feb64034964bf7 Mon Sep 17 00:00:00 2001 From: Jaroslava Fiedlerova Date: Mon, 30 Mar 2026 20:19:31 +0000 Subject: [PATCH] CI: Add CUDA-enabled unit tests for running on GH - remove test_multipath and test_noise from ChanelSim tests of RAN-Channel-Simulation pipeline - will be executed together with the other CUDA-enabled unit tests --- .../docker/Dockerfile.channelsim.ubuntu | 2 +- .../docker/Dockerfile.unittest.cuda.ubuntu | 25 +++++++++++++++++++ .../container_build_run_gh_tests.xml | 23 +++++++++++++++++ openair1/SIMULATION/tests/CMakeLists.txt | 2 -- 4 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 ci-scripts/docker/Dockerfile.unittest.cuda.ubuntu create mode 100644 ci-scripts/xml_files/container_build_run_gh_tests.xml diff --git a/ci-scripts/docker/Dockerfile.channelsim.ubuntu b/ci-scripts/docker/Dockerfile.channelsim.ubuntu index 5e2032b123..73904c5fcb 100644 --- a/ci-scripts/docker/Dockerfile.channelsim.ubuntu +++ b/ci-scripts/docker/Dockerfile.channelsim.ubuntu @@ -31,4 +31,4 @@ RUN cmake -GNinja -DENABLE_PHYSIM_TESTS=ON -DENABLE_TESTS=ON \ -DUSE_ATS_MEMORY=OFF \ -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/oai-ran/cmake_targets/ran_build/build \ .. && \ - ninja test_channel_scalability test_multipath test_noise + ninja test_channel_scalability diff --git a/ci-scripts/docker/Dockerfile.unittest.cuda.ubuntu b/ci-scripts/docker/Dockerfile.unittest.cuda.ubuntu new file mode 100644 index 0000000000..d58e8887e2 --- /dev/null +++ b/ci-scripts/docker/Dockerfile.unittest.cuda.ubuntu @@ -0,0 +1,25 @@ +# SPDX-License-Identifier: MIT + +FROM nvidia/cuda:12.9.1-devel-ubuntu22.04 AS cuda-image +FROM ran-base:develop AS ran-tests + +COPY --from=cuda-image /usr/local/cuda/ /usr/local/cuda/ + +# Set the LD_LIBRARY_PATH to ensure the system can find the copied libraries. +# This is crucial for applications that use CUDA. +ENV LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/targets/sbsa-linux/lib +ENV PATH=/usr/local/cuda/bin:$PATH +ENV C_INCLUDE_PATH=/usr/local/cuda/include + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \ + DEBIAN_FRONTEND=noninteractive apt-get install --yes \ + libgtest-dev \ + libyaml-cpp-dev + +RUN rm -Rf /oai-ran +WORKDIR /oai-ran +COPY . . + +WORKDIR /oai-ran/build +RUN cmake -GNinja -DENABLE_TESTS=ON -DCUDA_ENABLE=ON .. && ninja tests diff --git a/ci-scripts/xml_files/container_build_run_gh_tests.xml b/ci-scripts/xml_files/container_build_run_gh_tests.xml new file mode 100644 index 0000000000..f994c5d4f9 --- /dev/null +++ b/ci-scripts/xml_files/container_build_run_gh_tests.xml @@ -0,0 +1,23 @@ + + + + build-run-test-gh-tab + Build and Run Unit Tests with CUDA + wrench + + + Create_Workspace + Create new Workspace + localhost + + + + Build_Run_Tests + Build and Run UnitTests + docker/Dockerfile.unittest.cuda.ubuntu + --gpus all + -L cuda + localhost + + + diff --git a/openair1/SIMULATION/tests/CMakeLists.txt b/openair1/SIMULATION/tests/CMakeLists.txt index bf342e448f..1537a5aeef 100644 --- a/openair1/SIMULATION/tests/CMakeLists.txt +++ b/openair1/SIMULATION/tests/CMakeLists.txt @@ -439,8 +439,6 @@ endif() #################################################################################### if (CUDA_ENABLE) -add_physim_test(cuda.5g.channelsim.test_multipath "unitary test designed specifically to validate the multipath_channel_cuda" test_multipath) -add_physim_test(cuda.5g.channelsim.test_noise "unitary test that focuses on a single component: the add_noise_cuda function" test_noise) # --- Test Suite 1: 61440 samples, 2/4/8/32 TX - 2/4/8/32 RX --- add_physim_test(cuda.5g.channelsim.test_channel_scalability.test1 "16 channels 61440 samples 2T2R Batch" test_channel_scalability -c 16 -t 2 -r 2 -s 61440 -l 32 -m batch -n 12)