You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SYCL] Fix computation of the submit time based on host timestamps (#12104)
getCurrentDeviceTime uses the following formula to calculate device
time:
[base device timestamp] + ([current host timestamp] - [base host
timestamp]).
Host time stamps are queried using std::chrono. And base host timestamp
is updated in two cases:
1. The first call to getCurrentDeviceTime.
2. When refresh is needed.
Problem is that currently we remember base host timestamp at the wrong
moment: there is a large gap between the point when we query and
remember base host timestamp and the point when we get device timestamp
from plugin, so ([current host timestamp] - [base host timestamp])
includes execution time of things like getPlugin() which may be
significant, especially on the first call when plugins initialization
happen.
As a result we add incorrect difference to the base device time and
calculated submission time is incorrect, it is sometimes greater than
command_start time.
This patch fixes that problem by querying base host time properly after
piGetDeviceAndHostTimer call.
0 commit comments