Agora-wireless / Agora

Other
53 stars 34 forks source link

Incorrect number of task for deferred frames are reported #409

Open cstandy opened 1 year ago

cstandy commented 1 year ago

When the frames are deferred, the reported number of tasks per frame varies across frames. However, these values should be deterministic as the frame schedule is read from the config file.

For example, the number of FFT tasks should be 6, and the number of CSI tasks should be 1 per frame. However, as shown in the following log, they can vary from 5 to 7 and from 0 to 2.

[03:871228][I] Main [frame 38 + 0.08 ms]: Received all packets
[03:871233][I] Main [frame 25 + 13.89 ms]: Completed LDPC decoding (6 UL symbols)
[03:871249][I] Frame 25 Summary: FFT (7 tasks): 0.0318743 ms (~0.00173177 + 0.00632798 + 0.0222963 ms), CSI (2 tasks): 0.0343131 ms (~0.000739433 + 0.00291301 + 0.0302805 ms), Beamweights (96 tasks): 0.0690048 ms (~0.00200703 + 0.00226996 + 0.0620029 ms), Demul (4608 tasks): 0.753804 ms (~0.00689778 + 0.580726 + 0.0385909 ms), Decode (6 tasks): 0.174773 ms (~0.00685075 + 0.16253 + 0 ms), Total: 1.063769 ms
[03:871249][I]    +++ Scheduling deferred frame 27 : 26 
[03:871258][I] Main [frame 26 + 12.90 ms]: FFT-ed all pilots
[03:871260][I] Frame 26 Pilot Signal SNR (dB) Range at BS Antennas: User 0: [26.5,26.5] 
[03:871359][I] Main [frame 26 + 13.00 ms]: Completed ZF beamweight calc
[03:871366][I] Frame 26 Beamweight matrix inverse condition number range:     [0.00,1.00], Mean: 0.12
[03:872185][I] Main [frame 39 + 5969623923.67 ms]: Received all pilots
[03:872187][I]    +++ Deferring encoding of frame 39
[03:872187][I] Main [frame 39 + 1.04 ms since last frame]: Received first packet. Remaining packets in prev frame: 0
[03:872294][I] Main [frame 39 + 0.11 ms]: Received all packets
[03:872301][I] Main [frame 26 + 13.94 ms]: Completed demodulation
[03:872303][I] Frame 26, Scheduled User(s): 
          0
  EVM    0.3934
  SNR    24.0520

[03:872325][I] Main [frame 26 + 13.96 ms]: Completed LDPC decoding (6 UL symbols)
[03:872335][I] Frame 26 Summary: FFT (5 tasks): 0.020041 ms (~0.0011743 + 0.00362392 + 0.014316 ms), Beamweights (96 tasks): 0.0586951 ms (~0.00178343 + 0.00212655 + 0.0525391 ms), Demul (4608 tasks): 0.731139 ms (~0.00691937 + 0.559803 + 0.0362114 ms), Decode (6 tasks): 0.171647 ms (~0.00367866 + 0.162604 + 0 ms), Total: 0.981523 ms
[03:872341][I]    +++ Scheduling deferred frame 28 : 27 
[03:873207][I] Main [frame 40 + 5969623924.69 ms]: Received all pilots
[03:873209][I]    +++ Deferring encoding of frame 40
[03:873210][I] Main [frame 40 + 1.02 ms since last frame]: Received first packet. Remaining packets in prev frame: 0
[03:873231][I] Main [frame 27 + 13.81 ms]: FFT-ed all pilots
[03:873233][I] Frame 27 Pilot Signal SNR (dB) Range at BS Antennas: User 0: [26.5,26.5] 
[03:873319][I] Main [frame 40 + 0.11 ms]: Received all packets
[03:873352][I] Main [frame 27 + 13.94 ms]: Completed ZF beamweight calc
[03:873357][I] Frame 27 Beamweight matrix inverse condition number range:     [0.00,1.00], Mean: 0.12
[03:874242][I] Main [frame 27 + 14.82 ms]: Completed demodulation
[03:874246][I] Frame 27, Scheduled User(s): 
          0
  EVM    0.3934
  SNR    24.0520

Example full logs: 2023-07-19_16-35-36.log 2023-07-19_16-35-02.log

Example regular log with no deferred frames: 2023-07-25_18-21-23.log

cstandy commented 1 year ago

After running more configurations, I found the number of tasks for Beamweights, Demul, and Decode is stable. FFT and CSI can vary. Also, this is not only with deferred frames but it is more obvious when the deferred frames happen.