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 for the first four modules#
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
Generate Test Vectors for the pfmSort module#
Configure proper parameters per requirements. Below is an example test for 8 cells.
cd $cuBB_SDK
sed -i 's/NUM_CELL:[ ]*.*/NUM_CELL: 8/g' cuMAC/examples/pfmSort/config.yaml
Generate TV for pfmSort:
cd $cuBB_SDK/testVectors/cumac
sudo $cuBB_SDK/build/cuMAC/examples/pfmSort/pfmSortTest -t 2
Run the Tests#
Configurations#
Below is an example to enable all modules for 8 cells.
Configure cell number in cuMAC-CP config file.
# cuMAC-CP/config/cumac_cp.yaml
cell_num: 8 # Set to the number of cells
Configure cell number in testMAC and configure task_bitmask in testMAC config file to select the cuMAC modules.
# cuPHY-CP/testMAC/testMAC/test_cumac_config.yaml
cumac_cell_num: 8 # Set to the number of cells
# CUMAC task bitmask:
# b0 - multiCellUeSelection;
# b1 - multiCellScheduler;
# b2 - multiCellLayerSel;
# b3 - mcsSelectionLUT;
# b4 - pfmSort;
task_bitmask: 0x1F # Enable all modules
Note
Since the first four modules have sequential dependencies, the valid task_bitmask values are:
0x1, 0x3, 0x7, 0xF, 0x11, 0x13, 0x17, 0x1F
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 for all modules enabled:
13:46:55.000020 CON 31866 0 [CUMAC.HANDLER] Cell 0 | CUMAC 2000 | UE_SEL 2000 | PRB_ALLOC 2000 | LAYER_SEL 2000 | MCS_SEL 2000 | PFM_SORT 2000 | ERR 0 | INV 0 | Slots 4000
13:46:55.000021 CON 31866 0 [CUMAC.HANDLER] Cell 1 | CUMAC 2000 | UE_SEL 2000 | PRB_ALLOC 2000 | LAYER_SEL 2000 | MCS_SEL 2000 | PFM_SORT 2000 | ERR 0 | INV 0 | Slots 4000
13:46:55.000022 CON 31866 0 [CUMAC.HANDLER] Cell 2 | CUMAC 2000 | UE_SEL 2000 | PRB_ALLOC 2000 | LAYER_SEL 2000 | MCS_SEL 2000 | PFM_SORT 2000 | ERR 0 | INV 0 | Slots 4000
13:46:55.000023 CON 31866 0 [CUMAC.HANDLER] Cell 3 | CUMAC 2000 | UE_SEL 2000 | PRB_ALLOC 2000 | LAYER_SEL 2000 | MCS_SEL 2000 | PFM_SORT 2000 | ERR 0 | INV 0 | Slots 4000
13:46:55.000023 CON 31866 0 [CUMAC.HANDLER] Cell 4 | CUMAC 2000 | UE_SEL 2000 | PRB_ALLOC 2000 | LAYER_SEL 2000 | MCS_SEL 2000 | PFM_SORT 2000 | ERR 0 | INV 0 | Slots 4000
13:46:55.000024 CON 31866 0 [CUMAC.HANDLER] Cell 5 | CUMAC 2000 | UE_SEL 2000 | PRB_ALLOC 2000 | LAYER_SEL 2000 | MCS_SEL 2000 | PFM_SORT 2000 | ERR 0 | INV 0 | Slots 4000
13:46:55.000025 CON 31866 0 [CUMAC.HANDLER] Cell 6 | CUMAC 2000 | UE_SEL 2000 | PRB_ALLOC 2000 | LAYER_SEL 2000 | MCS_SEL 2000 | PFM_SORT 2000 | ERR 0 | INV 0 | Slots 4000
13:46:55.000025 CON 31866 0 [CUMAC.HANDLER] Cell 7 | CUMAC 2000 | UE_SEL 2000 | PRB_ALLOC 2000 | LAYER_SEL 2000 | MCS_SEL 2000 | PFM_SORT 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 the Running cuBB End-to-End 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
Enable MPS#
Since cumac_cp and cuphycontroller_scf both use the same GPU, MPS need to be enabled for both of them.
First, start the 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#
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.