CI: Add physim tests with CUDA channel simulation
This commit is contained in:
@@ -0,0 +1,52 @@
|
|||||||
|
#/*
|
||||||
|
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||||
|
# * contributor license agreements. See the NOTICE file distributed with
|
||||||
|
# * this work for additional information regarding copyright ownership.
|
||||||
|
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||||
|
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||||
|
# * except in compliance with the License.
|
||||||
|
# * You may obtain a copy of the License at
|
||||||
|
# *
|
||||||
|
# * http://www.openairinterface.org/?page_id=698
|
||||||
|
# *
|
||||||
|
# * Unless required by applicable law or agreed to in writing, software
|
||||||
|
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# * See the License for the specific language governing permissions and
|
||||||
|
# * limitations under the License.
|
||||||
|
# *-------------------------------------------------------------------------------
|
||||||
|
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||||
|
# * contact@openairinterface.org
|
||||||
|
# */
|
||||||
|
#---------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Dockerfile for the Open-Air-Interface BUILD service
|
||||||
|
# Valid for Ubuntu 24.04
|
||||||
|
#
|
||||||
|
#---------------------------------------------------------------------
|
||||||
|
FROM nvidia/cuda:12.9.1-devel-ubuntu22.04 AS cuda-image
|
||||||
|
FROM ran-base:develop AS ran-tests
|
||||||
|
|
||||||
|
RUN rm -Rf /oai-ran
|
||||||
|
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
|
||||||
|
|
||||||
|
WORKDIR /oai-ran
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
WORKDIR /oai-ran/build
|
||||||
|
RUN cmake -GNinja -DENABLE_PHYSIM_TESTS=ON -DENABLE_TESTS=ON \
|
||||||
|
-DSANITIZE_UNDEFINED=OFF -DSANITIZE_ADDRESS=OFF \
|
||||||
|
-DCMAKE_C_FLAGS=-Werror -DCMAKE_CXX_FLAGS=-Werror \
|
||||||
|
-DPHYSIM_CHECK_FILES="ThresholdsCuda.cmake" \
|
||||||
|
-DCUDA_ENABLE=ON \
|
||||||
|
-DUSE_UNIFIED_MEMORY=ON \
|
||||||
|
-DUSE_ATS_MEMORY=OFF \
|
||||||
|
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/oai-ran/cmake_targets/ran_build/build \
|
||||||
|
.. && \
|
||||||
|
ninja nr_ulsim nr_dlsim
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
function die() { echo $@; exit 1; }
|
||||||
|
[ $# -ge 1 ] || die "usage: $0 <directory> [ctest-options]"
|
||||||
|
|
||||||
|
IMAGE=ran-physimtests:ci-temp
|
||||||
|
CONTAINER=ran-physimtests
|
||||||
|
function cleanup-docker() {
|
||||||
|
docker stop ${CONTAINER}
|
||||||
|
docker rm ${CONTAINER}
|
||||||
|
docker rmi ${IMAGE}
|
||||||
|
docker volume prune --force
|
||||||
|
}
|
||||||
|
trap cleanup-docker EXIT
|
||||||
|
|
||||||
|
set -x
|
||||||
|
DIR=$1
|
||||||
|
RESULT_DIR=${DIR}/
|
||||||
|
shift
|
||||||
|
CTEST_OPT=$@
|
||||||
|
|
||||||
|
# build physims
|
||||||
|
docker build --progress=plain --tag ${IMAGE} --file ${DIR}/ci-scripts/docker/Dockerfile.physim.cuda.ubuntu ${DIR} &>> ${RESULT_DIR}/physim_log.txt
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "build of physims failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# get a JSON description of all tests to run
|
||||||
|
docker run -a STDOUT --workdir /oai-ran/build/ --env LD_LIBRARY_PATH=/oai-ran/build/ --rm --name ${CONTAINER} ${IMAGE} ctest ${CTEST_OPT} --show-only=json-v1 &> ${RESULT_DIR}/desc-tests.json
|
||||||
|
JSON_RES=$?
|
||||||
|
|
||||||
|
# run the actual tests: we don't suppy --rm as we have to copy the files
|
||||||
|
# similar to unit tests, we can't mount the file where we write physims-5g-run.xml to
|
||||||
|
# as it would write a file as root, but this script is run as a normal user
|
||||||
|
docker run -a STDOUT --gpus all --workdir /oai-ran/build/ --env LD_LIBRARY_PATH=/oai-ran/build/ --name ${CONTAINER} ${IMAGE} ctest ${CTEST_OPT} --output-junit results-run.xml --test-output-size-passed 100000 --test-output-size-failed 100000 &>> ${RESULT_DIR}/physim_log.txt
|
||||||
|
RUN_RES=$?
|
||||||
|
docker cp ${CONTAINER}:/oai-ran/build/results-run.xml ${RESULT_DIR}/
|
||||||
|
docker cp ${CONTAINER}:/oai-ran/build/Testing/Temporary/LastTestsFailed.log ${RESULT_DIR}/
|
||||||
|
docker cp ${CONTAINER}:/oai-ran/build/Testing/Temporary/LastTest.log ${RESULT_DIR}/
|
||||||
|
|
||||||
|
# if both were successful, return 0
|
||||||
|
# TODO not sure
|
||||||
|
#[[ $JSON_RES -eq 0 && $RUN_RES -eq 0 ]] && exit 0
|
||||||
|
|
||||||
|
exit 0
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
<!--
|
||||||
|
|
||||||
|
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The OpenAirInterface Software Alliance licenses this file to You under
|
||||||
|
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||||
|
except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.openairinterface.org/?page_id=698
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||||
|
contact@openairinterface.org
|
||||||
|
|
||||||
|
-->
|
||||||
|
<testCaseList>
|
||||||
|
<htmlTabRef>physim-tab</htmlTabRef>
|
||||||
|
<htmlTabName>PhySim</htmlTabName>
|
||||||
|
<htmlTabIcon>wrench</htmlTabIcon>
|
||||||
|
|
||||||
|
<testCase>
|
||||||
|
<class>Create_Workspace</class>
|
||||||
|
<desc>Create new Workspace</desc>
|
||||||
|
<node>localhost</node>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase>
|
||||||
|
<class>Build_Deploy_PhySim</class>
|
||||||
|
<desc>Build and Deploy Physims with CUDA Channel Simulation</desc>
|
||||||
|
<script>scripts/docker-build-and-deploy-physims-cuda.sh</script>
|
||||||
|
<node>localhost</node>
|
||||||
|
<ctest-opt>-R cuda.5g.physims</ctest-opt>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
</testCaseList>
|
||||||
|
|
||||||
@@ -485,6 +485,22 @@ add_physim_test(cuda.5g.channelsim.test_channel_scalability.test55 "16 channels
|
|||||||
add_physim_test(cuda.5g.channelsim.test_channel_scalability.test56 "16 channels 61440 samples long channel 2T8R Stream" test_channel_scalability -c 16 -t 2 -r 8 -s 61440 -l 128 -m stream -n 12)
|
add_physim_test(cuda.5g.channelsim.test_channel_scalability.test56 "16 channels 61440 samples long channel 2T8R Stream" test_channel_scalability -c 16 -t 2 -r 8 -s 61440 -l 128 -m stream -n 12)
|
||||||
add_physim_test(cuda.5g.channelsim.test_channel_scalability.test57 "16 channels 61440 samples long channel 2T8R Serial" test_channel_scalability -c 16 -t 2 -r 8 -s 61440 -l 128 -m serial -n 12)
|
add_physim_test(cuda.5g.channelsim.test_channel_scalability.test57 "16 channels 61440 samples long channel 2T8R Serial" test_channel_scalability -c 16 -t 2 -r 8 -s 61440 -l 128 -m serial -n 12)
|
||||||
|
|
||||||
|
add_physim_test(cuda.5g.physims.nr_dlsim.test1 "SNR = 30, MCS = 25, 106 PRBs, 1 layer, TDL-A channel, GPU channel simulation" nr_dlsim -n500 -s30 -S30.2 -e25 -b106 -R273 -X 8,9,10,11,12 -P -g A -t 85 -f cuda)
|
||||||
|
add_physim_test(cuda.5g.physims.nr_dlsim.test2 "SNR = 30, MCS = 25, 106 PRBs, 2 layers, TDL-A channel, GPU channel simulation" nr_dlsim -n500 -s30 -S30.2 -e25 -b106 -R273 -X 8,9,10,11,12 -P -g A -t 49 -f cuda -x2 -z2 -y2)
|
||||||
|
add_physim_test(cuda.5g.physims.nr_dlsim.test3 "SNR = 30, MCS = 25, 106 PRBs, 2 layers, 4 antennas, TDL-A channel, GPU channel simulation" nr_dlsim -n500 -s30 -S30.2 -e25 -b106 -R273 -X 8,9,10,11,12 -P -g A -t 95 -f cuda -x2 -z4 -y4)
|
||||||
|
add_physim_test(cuda.5g.physims.nr_dlsim.test4 "SNR = 30, MCS = 25, 273 PRBs, 2 layers, TDL-A channel, GPU channel simulation" nr_dlsim -n500 -s30 -S30.2 -e25 -b273 -R273 -X 8,9,10,11,12 -P -g A -t 32 -f cuda -x2 -z2 -y2)
|
||||||
|
add_physim_test(cuda.5g.physims.nr_dlsim.test5 "SNR = 30, MCS = 25, 273 PRBs, 2 layers, 4 antennas, TDL-A channel, GPU channel simulation" nr_dlsim -n500 -s30 -S30.2 -e25 -b273 -R273 -X 8,9,10,11,12 -P -g A -t 93 -f cuda -x2 -z4 -y4)
|
||||||
|
add_physim_test(cuda.5g.physims.nr_dlsim.test6 "SNR = 30, MCS = 25, 106 PRBs, 2 layers, TDL-B channel, GPU channel simulation" nr_dlsim -n500 -s30 -S30.2 -e25 -b106 -R273 -X 8,9,10,11,12 -P -g B -t 43 -f cuda -x2 -z2 -y2)
|
||||||
|
add_physim_test(cuda.5g.physims.nr_dlsim.test7 "SNR = 30, MCS = 25, 106 PRBs, 2 layers, 4 antennas, TDL-B channel, GPU channel simulation" nr_dlsim -n500 -s30 -S30.2 -e25 -b106 -R273 -X 8,9,10,11,12 -P -g B -t 95 -f cuda -x2 -z4 -y4)
|
||||||
|
add_physim_test(cuda.5g.physims.nr_dlsim.test8 "SNR = 30, MCS = 25, 273 PRBs, 2 layers, TDL-B channel, GPU channel simulation" nr_dlsim -n500 -s30 -S30.2 -e25 -b273 -R273 -X 8,9,10,11,12 -P -g B -t 32 -f cuda -x2 -z2 -y2)
|
||||||
|
add_physim_test(cuda.5g.physims.nr_dlsim.test9 "SNR = 30, MCS = 25, 273 PRBs, 2 layers, 4 antennas, TDL-B channel, GPU channel simulation" nr_dlsim -n500 -s30 -S30.2 -e25 -b273 -R273 -X 8,9,10,11,12 -P -g B -t 94 -f cuda -x2 -z4 -y4)
|
||||||
|
|
||||||
|
add_physim_test(cuda.5g.physims.nr_ulsim.test1 "SNR = 30, MCS = 25, 106 PRBs, 1 layer, TDL-A channel, GPU channel simulation" nr_ulsim -n500 -s30 -S30 -m25 -r106 -R106 -C10 -P -g A -t 84 -f cuda)
|
||||||
|
add_physim_test(cuda.5g.physims.nr_ulsim.test2 "SNR = 30, MCS = 25, 106 PRBs, 2 layers, TDL-A channel, GPU channel simulation" nr_ulsim -n500 -s30 -S30 -m25 -r106 -R106 -C10 -P -g A -t 90 -f cuda -W2 -z2 -y2)
|
||||||
|
add_physim_test(cuda.5g.physims.nr_ulsim.test3 "SNR = 30, MCS = 25, 273 PRBs, 2 layers, TDL-A channel, GPU channel simulation" nr_ulsim -n500 -s30 -S30 -m25 -r273 -R273 -C10 -P -g A -t 83 -f cuda -W2 -z2 -y2)
|
||||||
|
add_physim_test(cuda.5g.physims.nr_ulsim.test4 "SNR = 30, MCS = 25, 106 PRBs, 2 layers, TDL-B channel, GPU channel simulation" nr_ulsim -n500 -s30 -S30 -m25 -r106 -R106 -C10 -P -g B -t 78 -f cuda -W2 -z2 -y2)
|
||||||
|
add_physim_test(cuda.5g.physims.nr_ulsim.test5 "SNR = 30, MCS = 25, 273 PRBs, 2 layers, TDL-B channel, GPU channel simulation" nr_ulsim -n500 -s30 -S30 -m25 -r273 -R273 -C10 -P -g B -t 63 -f cuda -W2 -z2 -y2)
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(PHYSIM_CHECK_FILES)
|
if(PHYSIM_CHECK_FILES)
|
||||||
|
|||||||
Reference in New Issue
Block a user