生成 TV 和启动模式文件#
自 cuBB 22-2.2 版本起,测试向量不再包含在发行包中。在运行 cuPHY 示例或 cuBB 端到端测试之前,您必须生成 TV 文件。
注意
ARM 不支持 TV 生成,因为 Matlab Compiler SDK 尚不支持它。
使用 Aerial Python mcore 模块#
使用 Aerial Python mcore
模块生成 TV 文件不需要 Matlab 许可证。cuBB 容器已安装 aerial_mcore
。
要生成端到端测试所需的测试向量,请按照以下步骤操作
在 Aerial 容器内运行以下命令。它会在不到一分钟的时间内完成。
cd ${cuBB_SDK}/5GModel/aerial_mcore/examples source ../scripts/setup.sh ../scripts/gen_e2e_ota_tvs.sh ls -lh GPU_test_input/ cp GPU_test_input/* ${cuBB_SDK}/testVectors/
以下是上述命令的示例输出
aerial@c_aerial_aerial:/opt/nvidia/cuBB/5GModel/aerial_mcore$ source ./scripts/setup.sh [Aerial Python]aerial@c_aerial_aerial:/opt/nvidia/cuBB/5GModel/aerial_mcore$ ./scripts/gen_e2e_ota_tvs.sh Finished genCuPhyChEstCoeffs Elapsed time: 1.166473150253296 seconds [Aerial Python]aerial@c_aerial_aerial:/opt/nvidia/cuBB/5GModel/aerial_mcore$ ls -lh ../GPU_test_input/ -rw-rw-r-- 1 aerial aerial 90K Oct 17 2023 ../cuPhyChEstCoeffs.h5
注意
cuPhyChEstCoeffs.h5
文件可以在 x86 和 ARM 容器的/opt/nvidia/cuBB/testVectors
目录中找到。将输出复制到
testVectors
文件夹。
要生成所有 TV 文件,包括 E2E 测试不需要的文件,请按照以下步骤操作
在 Aerial 容器内运行以下命令。
cd ${cuBB_SDK}/5GModel/aerial_mcore/examples source ../scripts/setup.sh export REGRESSION_MODE=1 time python3 ./example_5GModel_regression.py allChannels echo $? ls -alF GPU_test_input/ du -h GPU_test_input/
注意
在开发套件上使用内核命令行中当前的 isocpus 参数设置,TV 生成可能需要几个小时。主机必须至少有 64GB 内存和 430GB 可用磁盘空间。必须启用超线程。
查看上述命令的输出;下面显示了一个示例。“实际”时间在 24 核 x86 主机上不到一小时。
echo $?
命令显示进程的退出代码,应为 0,而非零退出代码表示失败。Channel Compliance_Test Error Test_Vector Error Performance_Test Fail ------------------------------------------------------------------------------ SSB 37 0 42 0 0 0 PDCCH 71 0 80 0 0 0 PDSCH 274 0 286 0 0 0 CSIRS 86 0 87 0 0 0 DLMIX 0 0 1049 0 0 0 PRACH 60 0 60 0 48 0 PUCCH 469 0 469 0 96 0 PUSCH 388 0 398 0 41 0 SRS 125 0 125 0 0 0 ULMIX 0 0 576 0 0 0 BFW 58 0 58 0 0 0 ------------------------------------------------------------------------------ Total 1568 0 3230 0 185 0 Total time for runRegression is 2147 seconds Parallel pool using the 'local' profile is shutting down. real 36m51.931s user 585m1.704s sys 10m28.322s
要使用 cubb_scripts
为每个测试用例生成启动模式,请按照以下步骤操作
运行以下命令
cd $cuBB_SDK cd cubb_scripts python3 auto_lp.py -i ../5GModel/aerial_mcore/examples/GPU_test_input -t launch_pattern_nrSim.yaml
将启动模式和 TV 文件复制到
testVectors
仓库cd $cuBB_SDK cp ./5GModel/aerial_mcore/examples/GPU_test_input/*h5 ./testVectors/. cp ./5GModel/aerial_mcore/examples/GPU_test_input/launch_pattern* ./testVectors/multi-cell/.`
使用 Matlab#
要使用 Matlab 生成 TV 文件
在 Matlab 中运行以下命令
cd('nr_matlab'); startup; [nTC, errCnt] = runRegression({'TestVector'}, {'allChannels'}, 'compact', [0, 1] );
所有 cuPHY TV 都在
nr_matlab/GPU_test_input
下生成和存储。使用 cubb_scripts 为每个测试用例生成启动模式
cd $cuBB_SDK cd cubb_scripts python3 auto_lp.py -i ../5GModel/nr_matlab/GPU_test_input -t launch_pattern_nrSim.yaml
将启动模式和 TV 文件复制到 testVectors 仓库。
cd $cuBB_SDK
cp ./5GModel/nr_matlab/GPU_test_input/TVnr_* ./testVectors/.
cp ./5GModel/nr_matlab/GPU_test_input/launch_pattern* ./testVectors/multi-cell/.