Throughput and Latency reports from RTL sim

Open
#663 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python

Research direction

Start in src/builder/build_dataflow_steps.py at step_measure_rtlsim_performance and inspect throughput_test_rtlsim. Reproduce the report with rtlsim_batch_size greater than one, then verify that latency_cycles represents a single input while cycles represents throughput for a filled batch. Update or add coverage for both reported values.

Written by the indexing model from the issue text.

Description

bug

Hello, everyone!

It may not be a real issue, but I would like to call attention to this anyways.
Currently, the performance report is generated with a single call to throughput_test_rtlsim. However, for batch sizes greater than one, the latency_cycles will be wrong, as I understand (because latency_cycles gets assigned from cycles).

In step_measure_rtlsim_performance inside src/builder/build_dataflow_steps.py, we have:

rtlsim_bs = int(cfg.rtlsim_batch_size) # which defaults to 1
rtlsim_perf_dict = throughput_test_rtlsim(rtlsim_model, rtlsim_bs)
rtlsim_latency = rtlsim_perf_dict["cycles"]
rtlsim_perf_dict["latency_cycles"] = rtlsim_latency

where, I believe, it should be something like:

rtlsim_bs = len(rtlsim_model.graph.node)
rtl_single_run = throughput_test_rtlsim(rtlsim_model,1)
rtlsim_perf_dict = throughput_test_rtlsim(rtlsim_model, rtlsim_bs) # or even, just saving the cycle in which the first output is produced - not requiring calling throughput_test_rtlsim twice
rtlsim_perf_dict["latency_cycles"] = rtl_single_run["cycles"]

So, in the end, we have "latency_cycles" giving the number of cycles for a single input (i.e., latency) and "cycles" giving the number of cycles for processing a batch large enough to assess the throughput with the pipeline filled.

Thanks,

Dominant language
Python
Stars
1.1k
Forks
308
Avg merge
3d 9h
Merged PRs (30d)
14

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Xilinx/finn

All issues in Xilinx/finn

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.