cuMAC-CP Tests#
Basic cuMAC-CP Standalone Test#
This section describes how to run the TestMAC + cuMAC-CP standalone test.
Configuration Files#
cumac_cp.yaml#
Configure cell number and CPU core assignments for cuMAC-CP:
# CPU core shared by all low-priority threads
low_priority_core: 19
recv_thread_config:
name: cumac_cp_recv
cpu_affinity: 25
sched_priority: 95
# cuMAC task worker cores
worker_cores: [31, 32, 33, 34, 35, 36, 37, 38]
# Total cell number
cell_num: 8
test_cumac_config.yaml#
Configure cuMAC settings and CPU cores for testMAC:
recv_thread_config:
name: cumac_recv
cpu_affinity: 43
sched_priority: 95
sched_thread_config:
name: cumac_sched
cpu_affinity: 39
sched_priority: 96
builder_thread_config:
name: cumac_builder
cpu_affinity: 39
sched_priority: 95
# Worker thread cores, can be used for both outgoing message building and incoming message handling
worker_cores: [26, 27, 28, 29]
# Run test_mac + cumac_cp only without depending on L1
cumac_cp_standalone: 1
test_mac_config.yaml#
Enable cuMAC-CP test configuration:
# Set to yaml file like test_cumac_config.yaml to enable cuMAC-CP test
test_cumac_config_file: test_cumac_config.yaml
Test Execution#
Generate Test Vectors#
Configure proper parameters per requirements. Below is an example test for 8 cells.
cd $cuBB_SDK
sed -i 's/#define numCellConst[ ]*.*/#define numCellConst 8/g' cuMAC/examples/parameters.h
sed -i 's/#define gpuDeviceIdx[ ]*.*/#define gpuDeviceIdx 0/g' cuMAC/examples/parameters.h
sed -i 's/#define cpuGpuPerfGapSumRConst[ ]*.*/#define cpuGpuPerfGapSumRConst 0.03/g' cuMAC/examples/parameters.h
sed -i 's/#define cpuGpuPerfGapPerUeConst[ ]*.*/#define cpuGpuPerfGapPerUeConst 0.01/g' cuMAC/examples/parameters.h
sed -i 's/#define gpuAllocTypeConst[ ]*.*/#define gpuAllocTypeConst 0/g' cuMAC/examples/parameters.h
sed -i 's/#define cpuAllocTypeConst[ ]*.*/#define cpuAllocTypeConst 0/g' cuMAC/examples/parameters.h
Generate per cell and per group TVs for cuMAC-CP:
mkdir $cuBB_SDK/testVectors/cumac
cd $cuBB_SDK/testVectors/cumac
sudo $cuBB_SDK/build/cuMAC/examples/multiCellSchedulerUeSelection/multiCellSchedulerUeSelection -t 3
Run the Tests#
Execute the tests in the following order:
# 1. Run cumac_cp
sudo $cuBB_SDK/build/cuMAC-CP/cumac_cp
# 2. Run test_mac
sudo $cuBB_SDK/build/cuPHY-CP/testMAC/testMAC/test_mac F08 8C_60c
Expected Output#
cumac_cp Output#
Example console output:
16:11:36.999875 WRN 27518 0 25 [CUMCP.HANDLER] Cell 0 | CUMAC 2000 | ERR 0 | Slots 4000
16:11:36.999876 WRN 27518 0 25 [CUMCP.HANDLER] Cell 1 | CUMAC 2000 | ERR 0 | Slots 4000
16:11:36.999877 WRN 27518 0 25 [CUMCP.HANDLER] Cell 2 | CUMAC 2000 | ERR 0 | Slots 4000
16:11:36.999877 WRN 27518 0 25 [CUMCP.HANDLER] Cell 3 | CUMAC 2000 | ERR 0 | Slots 4000
16:11:36.999877 WRN 27518 0 25 [CUMCP.HANDLER] Cell 4 | CUMAC 2000 | ERR 0 | Slots 4000
16:11:36.999877 WRN 27518 0 25 [CUMCP.HANDLER] Cell 5 | CUMAC 2000 | ERR 0 | Slots 4000
16:11:36.999877 WRN 27518 0 25 [CUMCP.HANDLER] Cell 6 | CUMAC 2000 | ERR 0 | Slots 4000
16:11:36.999877 WRN 27518 0 25 [CUMCP.HANDLER] Cell 7 | CUMAC 2000 | ERR 0 | Slots 4000
test_mac Output#
Example console output:
16:11:37.000364 WRN 27533 0 39 [CUMAC.HANDLER] Cell 0 | CUMAC 2000 | ERR 0 | INV 0 | Slots 4000
16:11:37.000364 WRN 27533 0 39 [CUMAC.HANDLER] Cell 1 | CUMAC 2000 | ERR 0 | INV 0 | Slots 4000
16:11:37.000364 WRN 27533 0 39 [CUMAC.HANDLER] Cell 2 | CUMAC 2000 | ERR 0 | INV 0 | Slots 4000
16:11:37.000364 WRN 27533 0 39 [CUMAC.HANDLER] Cell 3 | CUMAC 2000 | ERR 0 | INV 0 | Slots 4000
16:11:37.000365 WRN 27533 0 39 [CUMAC.HANDLER] Cell 4 | CUMAC 2000 | ERR 0 | INV 0 | Slots 4000
16:11:37.000365 WRN 27533 0 39 [CUMAC.HANDLER] Cell 5 | CUMAC 2000 | ERR 0 | INV 0 | Slots 4000
16:11:37.000365 WRN 27533 0 39 [CUMAC.HANDLER] Cell 6 | CUMAC 2000 | ERR 0 | INV 0 | Slots 4000
16:11:37.000365 WRN 27533 0 39 [CUMAC.HANDLER] Cell 7 | CUMAC 2000 | ERR 0 | INV 0 | Slots 4000
cuMAC-CP + cuBB Test#
This section describes how to run the cuMAC-CP (cumac_cp) + cuBB (test_mac + cuphycontroller_scf + ru_emulator) test.
Refer to “Running cuBB End-to-End cuBB” section for cuBB test instructions.
For cuMAC-CP part, follow about cuMAC-CP standalone test instructions but have below differences:
Configure cumac_cp_standalone to 0#
# Run cumac_cp + cuBB (test_mac + cuphycontroller_scf + ru_emulator) tests
cumac_cp_standalone: 0
Enabled MPS#
Since cumac_cp and cuphycontroller_scf both use the same GPU, MPS need to be enabled for both of them.
Firstly start MPS server
# Export MPS variables
export CUDA_DEVICE_MAX_CONNECTIONS=8
export CUDA_MPS_PIPE_DIRECTORY=/var
export CUDA_MPS_LOG_DIRECTORY=/var
# Stop existing MPS
sudo -E echo quit | sudo -E nvidia-cuda-mps-control
# Start MPS
sudo -E nvidia-cuda-mps-control -d
sudo -E echo start_server -uid 0 | sudo -E nvidia-cuda-mps-control
Then export the MPS variables for cumac_cp and cuphycontroller_scf before running them.
# Export variables
export CUDA_DEVICE_MAX_CONNECTIONS=8
export CUDA_MPS_PIPE_DIRECTORY=/var
export CUDA_MPS_LOG_DIRECTORY=/var
Additional Configuration Options#
TestMAC Module Selection#
Configure task_bitmask in test_cumac_config.yaml to select cuMAC modules:
# CUMAC task bitmask:
# b0 - multiCellUeSelection
# b1 - multiCellScheduler
# b2 - multiCellLayerSel
# b3 - mcsSelectionLUT
task_bitmask: 0xF # Enable all modules
Note: These modules have sequential dependencies: subsequent module depends on the output of the previous modules. So the valid task_bitmask values are 0x1, 0x3, 0x7, 0xF.
task_bitmask: 0x1 # Enable multiCellUeSelection
task_bitmask: 0x3 # Enable multiCellUeSelection, multiCellScheduler
task_bitmask: 0x7 # Enable multiCellUeSelection, multiCellScheduler, multiCellLayerSel
task_bitmask: 0xF # Enable all the 4 modules
When INFO level logging is enabled, task bitmask and processing timing can be viewed in /tmp/cumac_cp.log.
Debug Options#
Buffer dumping can be enabled in cuMAC-CP via debug_option. Note that this will impact timing and performance, so use only during debugging.