Channel estimate log extraction inside cuBB

Hi! We’ve been trying to extract channel estimates inside cuBB. Are there any logs or functions for this task?

Hi @snkim94 ,

As you can see in the public document of the diagram of the PUSCH pipeline, channel estimation is implemented as a CUDA kernel of the CUDA Graph PUSCH pipeline.
By default, the CUDA codes of Aerial do not output logs. If you want to check the estimated value, you can add some codes to show it and recompile the whole package. You can find many commented printf statements for debugging in the CUDA source code files. It can help you with how you can add. Please note that this may impact performance.

Also, you can use the 5GModel MATLAB simulator to check the algorithm. It has the same algorithms implemented in cuPHY, and it is much more user-friendly to see estimated values.

Thank you.
Nori

Thank you very much for the reply!

Can you also specify which file should we look for the commented lines?

Hi @snkim94 ,

You can run a cuPHY stand-alone test as explained in our release documentation in Section “Running the cuPHY Examples”.

You can run the PUSCH pipeline with the command cuPHY/build/examples/pusch_rx_multi_pipe/cuphy_ex_pusch_rx_multi_pipe -i ~/<tv_name>.h5. If you define an additional argument for an output file such as -o debug_sample_dump.h5, the test will write some important PHY layer configuration and data samples at different stages into this file.

The channel estimation output will be saved in the data structure Hest0. The following shows only part of the data in sample output:

h5ls debug_sample_dump.h5
CfoEst0                  Dataset {1, 14}
DataEq0                  Dataset {13, 3276, 2}
DataRx0                  Dataset {4, 14, 3276}
EqCoeff0                 Dataset {1, 273, 2, 12, 4}
G_csi1                   Dataset {1}
G_csi2                   Dataset {1}
G_harq                   Dataset {1}
G_harq_rvd               Dataset {1}
G_schAndCsi2             Dataset {1}
HEst0                    Dataset {1, 3276, 2, 4}
LLR0                     Dataset {13, 3276, 2, 8}
LwInv0                   Dataset {273, 4, 4}
N_slot_frame             Dataset {1}
N_symb_slot              Dataset {1}
NoiseVarPostEq           Dataset {1}
NoiseVarPreEqPerUe       Dataset {1}
Ree0                     Dataset {1, 273, 2, 12}

Let us know if any additional help is needed.

Thank you,
Balkan

This is great! Thank you so much for the detailed explanations. We will definitely try these code. One last question is that similar to the channel estimates, if we want to extract the I/Q samples of UL SRS measurements, which files should we look for?

Hi @snkim94,

Yes, you can use the same command to trigger debug output for the srs pipeline example.

The following command will output debug data into debug_sample_dump_srs.h5.

./cuPHY/examples/srs_rx_pipeline/cuphy_ex_srs_rx_pipeline.cpp -i Rel_24_1_tvs_srs/TVnr_8002_SRS_gNB_CUPHY_s0p0.h5  -o debug_sample_dump_srs.h5

The data file has the following information:

h5ls debug_sample_dump_srs.h5
Toffset                  Dataset {1}
Tsrs                     Dataset {1}
bandwidthIdx             Dataset {1}
cellIdx                  Dataset {1}
chEst0                   Dataset {1, 4, 136}
chEstBuffIdx             Dataset {1}
chEstToL20               Dataset {1, 4, 2}
combOffset               Dataset {1}
combSize                 Dataset {1}
configIdx                Dataset {1}
cyclicShift              Dataset {1}
dataRx0                  Dataset {4, 1, 3276}
frameNum                 Dataset {1}
frequencyHopping         Dataset {1}
frequencyPosition        Dataset {1}
frequencyShift           Dataset {1}
groupOrSequenceHopping   Dataset {1}
mu                       Dataset {1}
nAntPorts                Dataset {1}
nRepetitions             Dataset {1}
nRxAntSrs                Dataset {1}
nSrsSym                  Dataset {1}
nSyms                    Dataset {1}
prgSize                  Dataset {1}
resourceType             Dataset {1}
sequenceId               Dataset {1}
slotNum                  Dataset {1}
srsAntPortToUeAntMap0    Dataset {1}
srsAntPortToUeAntMap1    Dataset {1}
srsAntPortToUeAntMap2    Dataset {1}
srsAntPortToUeAntMap3    Dataset {1}
srsStartSym              Dataset {1}
startSym                 Dataset {1}
toEstMicroSec            Dataset {1}
usage                    Dataset {1}
widebandCsCorrNotUse     Dataset {1}
widebandCsCorrRatioDb    Dataset {1}
widebandCsCorrUse        Dataset {1}
widebandNoiseEnergy      Dataset {1}
widebandSignalEnergy     Dataset {1}
widebandSnr              Dataset {1}

Please note that these tests (cuphy_ex_*_rx_pipeline) run only specific channels. Therefore, they are not cuBB tests.

Thank you,
Balkan

Thank you! These codes work also work for cuBB 23-4?

@snkim94 Yes, they also work for 23-4. Please let us know if you have any issues.

Thank you.

Hi, we are trying the codes from “Using Aerial Python mcore Module” in 24-1 documents to generate the test vector.

cd ${cuBB_SDK}/5GModel/aerial_mcore
source scripts/setup.sh
./scripts/gen_e2e_ota_tvs.sh
ls -lh GPU_test_input/
cp GPU_test_input/* ${cuBB_SDK}/testVectors/

But we faced error saying “X does not support locale C.UTF-8” and the docker stoped.

aerial@winslab-arc-gnb2:/opt/nvidia/cuBB/testVectors$ cd ${cuBB_SDK}/5GModel/aerial_mcore
aerial@winslab-arc-gnb2:/opt/nvidia/cuBB/5GModel/aerial_mcore$ source scripts/setup.sh
[Aerial Python]aerial@winslab-arc-gnb2:/opt/nvidia/cuBB/5GModel/aerial_mcore$ ./scripts/gen_e2e_ota_tvs.sh
/opt/nvidia/cuBB/5GModel/aerial_mcore/scripts/gen_e2e_ota_tvs.sh starting…
/opt/nvidia/cuBB/5GModel/aerial_mcore/examples /opt/nvidia/cuBB/5GModel/aerial_mcore
Warning: X does not support locale C.UTF-8

Also, when we try to use the test vector in /opt/nvidia/cuBB/testVectors/cuPhyChEstCoeffs.h5, it doesn’t work

Hi @snkim94,

cuPhyChEstCoeffs.h5 

is not a test vector. It is a data structure that contains filter coefficients.

What is the OS you are running the aerial_mcore to generate the TVs?

Thanks.

We are running the codes inside the cuBB 23-4 container.

I see the same message “Warning: X does not support locale C.UTF-8” but this is just a warning message. It should not stop the container.

Can you try the following steps to generate the test vectors?


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/

Thank you.

We have tried these codes and waited 4~5 hours but there were no results after receiving the following outputs:

Run genCfgTemplate …
Test runSim for DL …
Read config from cfg_template_DL.yaml

Thank you

You should see the following prints as soon as the script starts.

Run genCfgTemplate ...
Test runSim for DL ...
Read config from cfg_template_DL.yaml

Channel: ssb pdcch pdsch csirs prach pucch pusch srs
----------------------------------------------------
Alloc:    1    1     1     1     0     0     0    0

==> PASS

Test runSim for UL ...
Read config from cfg_template_UL.yaml

Channel: ssb pdcch pdsch csirs prach pucch pusch srs
----------------------------------------------------
Alloc:    0    0     0     0     1     1     1    1

UE # 0: PUSCH TB detected
RO # 0: 1 Prmb detected
UE # 0: PUCCH UCI detected
==> PASS
.....

Generating full set of test vectors can take a few hours.

Can you please check your system configuration to see if you have at least 64 GB memory and 300 GB of disk space?

Thank you.

I have been getting this version mismatch issue while running ch_est example with cuPhyEstCoeffs.h5 configuration:

[Aerial Python]aerial@winslab-arc-gnb1:/opt/nvidia/cuBB/build/cuPHY/examples/ch_est$  ./cuphy_ex_ch_est -i ../../../../testVectors/cuPhyChEstCoeffs.h5 
./cuphy_ex_ch_est: /usr/local/MATLAB/MATLAB_Runtime/R2023a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by ./cuphy_ex_ch_est)
./cuphy_ex_ch_est: /usr/local/MATLAB/MATLAB_Runtime/R2023a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /opt/nvidia/cuBB/build/cuPHY/src/cuphy/libcuphy.so)
./cuphy_ex_ch_est: /usr/local/MATLAB/MATLAB_Runtime/R2023a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /opt/nvidia/cuBB/build/cuPHY/nvlog/libnvlog.so)
./cuphy_ex_ch_est: /usr/local/MATLAB/MATLAB_Runtime/R2023a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /opt/nvidia/cuBB/build/cuPHY/external/fmtlog_flat/libfmtlog-shared.so)
./cuphy_ex_ch_est: /usr/local/MATLAB/MATLAB_Runtime/R2023a/bin/glnxa64/libcurl.so.4: no version information available (required by /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.103)
[Aerial Python]aerial@winslab-arc-gnb1:/opt/nvidia/cuBB/build/cuPHY/examples/ch_est$  strings /usr/local/MATLAB/MATLAB_Runtime/R2023a/sys/os/glnxa64/libstdc++.so.6 | grep GLIB    
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_3.4.24
GLIBCXX_3.4.25
GLIBCXX_3.4.26
GLIBCXX_3.4.27
GLIBCXX_3.4.28

What could be the possible way forward?

Hi @subhams

cuPhyChEstCoeffs.h5 is not a test vector but is a data structure that contains filter coefficients. It is used for cuBB level test.
The command “cuphy_ex_ch_est ~/<tv_name>.h5” is used for channel-est-kernel unit test based on a pre-generated test vector, e.g., TVnr_7201_PUSCH_gNB_CUPHY_s0p0.h5. Please refer to our release documentation for the steps of generating test Vectors.
Instead of running channel-est kernel unit test by using “cuphy_ex_ch_est ~/<tv_name>.h5”, running cuPHY channel pipeline test is recommended. As recommended above by @bkecicioglu, "you can run a cuPHY stand-alone test as explained in our release documentation in Section ‘Running the cuPHY Examples’. you can run the PUSCH pipeline with the command cuPHY/build/examples/pusch_rx_multi_pipe/cuphy_ex_pusch_rx_multi_pipe -i ~/<tv_name>.h5. By adding an additional argument for an output file such as -o debug_sample_dump.h5, the test will write some important PHY layer configuration and data samples at different stages into this file. The channel estimation output will be saved in the data structure Hest0. "

Thanks!