Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zcu102 dfx platform (22.1 ver.) long kernel latency #33

Open
dj-park opened this issue Aug 13, 2023 · 1 comment
Open

zcu102 dfx platform (22.1 ver.) long kernel latency #33

dj-park opened this issue Aug 13, 2023 · 1 comment

Comments

@dj-park
Copy link

dj-park commented Aug 13, 2023

I built zcu102 dfx platform (22.1 version) and ran vadd example(https://github.com/Xilinx/Vitis-Tutorials/tree/2023.1/Getting_Started/Vitis).

I created a for loop in host code like below.

    struct timeval start, end;
    for(int k = 0; k < 3; k++){
        gettimeofday(&start, NULL);

        std::cout << "Execution of the kernel\n";
        auto run = krnl(boIn1, boIn2, boOut, DATA_SIZE); //DATA_SIZE=size
        run.wait();

        // Get the output;
        std::cout << "Get the output data from the device" << std::endl;
        boOut.sync(XCL_BO_SYNC_BO_FROM_DEVICE);
        gettimeofday(&end, NULL);
        // print time

        long long elapsed = (end.tv_sec - start.tv_sec) * 1000000LL + end.tv_usec - start.tv_usec;   
        printf("elapsed time: %lld us\n", elapsed);
    }

The measured latency is strangely,

elapsed time: 233 us
elapsed time: 505262 us
elapsed time: 511944 us

I ran it again, then it's

elapsed time: 515074 us
elapsed time: 511928 us
elapsed time: 511986 us

If I reboot, then the first kernel is normal, and the following kernels are all slow.
Does anyone have similar issue with the zcu102 dfx platform?
I checked the regular zcu102 platform, and this doesn't happen, meaning that this is dfx platform issue.

@imrickysu
Copy link
Collaborator

Hi @dj-park , sorry for not being able to help you promptly. Since this is not a tutorial reproducing issue, posting the question to the forums would be the most efficient way to get support. Could you check with https://forums.xilinx.com?

As for some general comments, generating timeline trace reports may help with understanding what's making the elapsed time this long, inside kernel, platform or from the software stack, etc..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants