Vitis-Tutorials
Vitis-Tutorials copied to clipboard
zcu102 dfx platform (22.1 ver.) long kernel latency
This question was posted in https://github.com/Xilinx/Vitis_Embedded_Platform_Source/issues/33, but no one seems to respond the open issues there. So I am reposting the issue here.
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.
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..