feat: GPU Accelerated Channel Simulation Pipeline
feat: GPU Accelerated Channel Simulation Pipeline
This MR introduces a CUDA-based pipeline to offload the multipath_channel and add_noise channel simulation functions to the GPU. This enables large-scale, real-time physical layer simulations not possible on the CPU.
For full documentation, please see the file at openair1/SIMULATION/TOOLS/DOC/gpu_acceleration.md.
System & Compiler Requirements
An NVIDIA GPU with a compatible driver and the CUDA Toolkit installed.
This feature was developed and tested on the GH200 server using the GCC 12 toolchain. To ensure reproducibility, building with GCC 12 is highly recommended.
Build Instructions
The primary flag to enable this feature is -DCUDA_ENABLE=ON. The following command shows a sample configuration used during development on the GH200 server:
./build_oai --phy_simulators --cmake-opt "\
-DCUDA_ENABLE=ON \
-DUSE_UNIFIED_MEMORY=ON \
-DUSE_ATS_MEMORY=OFF \
-DCMAKE_C_COMPILER=/usr/bin/gcc-12 \
-DCMAKE_CXX_COMPILER=/usr/bin/g++-12 \
-DENABLE_TESTS=ON"
Memory Model Configuration
The pipeline supports multiple CUDA memory management modes, which can be configured at compile time. ATS Memory (-DUSE_ATS_MEMORY=ON) is enabled by default. To use another memory model, you must first disable ATS.
For a detailed explanation of these models, please refer to Section 3 of the gpu_acceleration.md report.
Runtime Usage
Run the simulator with the --cuda flag:
sudo ./nr_dlsim <your_config> --cuda
sudo ./nr_ulsim <your_config> --cuda
Run the performance benchmark to test different workloads:
./openair1/PHY/TOOLS/tests/test_channel_scalability -c 1024 -t 4 -r 4 -m batch