Xilinx / Xilinx/XRT

500 ms kernel execution latency on ZynqMP

Open
#9,737 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
686
Forks
549
Avg merge
2d 4h
Merged PRs (30d)
70

Description

Hello, I have created a dummy kernel to see the XRT latency overhead. It just takes an argument as input but does not write back to memory. Basically:

void basic_kernel(int input_val) {
        int temp;
        temp = input_val + 1;
    }

In my host program I have the following code:

auto krnl = xrt::kernel(device, uuid, "basic_kernel");
xrt::run run(krnl);
run.set_arg(0, dummy_data);
auto t_start = std::chrono::steady_clock::now();
run.start();
run.wait();
auto t_end = std::chrono::steady_clock::now();
auto elapsed_ms = std::chrono::duration_cast<std::chrono::milliseconds>(t_end - t_start).count();

I run this in a loop, and I get ~500ms of elapsed time. I am using the following versions:

Version              : 2.16.0
Branch               : 2023.2
Hash                 : 2865a62b6a417dea523d2d5646154aa94a2cbc28
Hash Date            : 2023-10-06 21:08:57
ZOCL                 : 2.16.0, 2865a62b6a417dea523d2d5646154aa94a2cbc28

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.

Research direction

Start with the host timing snippet and the dummy basic_kernel described in the issue, then reproduce the looped run.start()/run.wait() measurement on the reported ZynqMP setup. Check the XRT 2.16.0 and 2023.2 versions cited and identify the source of the approximately 500 ms latency; the issue is complete when the cause and any applicable correction are established.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
embedded-iot, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.