Skip to content

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

@dj-park

Description

@dj-park

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions