I am running an application on Jetson xavier board, I get different computation time in each iteration(decreases) if I put the application in a loop, I have several kernels in the application including fft kernel whose timing also changes with every iteration.
Any idea why that is happening?
Please make sure you have locked the processor clocks.
Or the performance will vary due to the dynamic clock mode.
More, the first launch will take a little bit longer for GPU initialization.
How do I lock the processor clocks on remote jetson board?
You can use our default tool and script to maximize the device performance:
$ sudo nvpmodel -m 0 $ sudo jetson_clocks
I tried the commands you mentioned, now the timings are in control, Could you please explain what these commands do?
There is a table in the kernel of allowed clock ranges and whether to enable or disable cores. The
nvpmodel -m 0 uses the table which contains the maximum range of clocks and all cores (more or less). The
jetson_clocks command pegs the clocks to the maximum of that model. If you were using different models, then
jetson_clocks would still maximize performance within that model, but the model itself might limit to a lower performance profile.
If those commands helped, then it tends to imply that some sort of energy savings was limiting performance.