tfjs
tfjs copied to clipboard
[webgpu] Resolve timestamp when read
In the profile mode, timestamp will be resolved per op, the gpu burden is relatively heavy. This PR introduced a lightweight way to get timestamp, resolve timestamp when read. This feature is guarded behind flag TRACING.
In addition to the resolve method difference, the time returned in profile mode is gpu execution time (milliseconds). The time returned by TRACING is the start time and end time of gpu execution (nanoseconds).
For e2e, add tracing=true into the url will turn on tracing. For user application, set flag TRACING to true before model predict.
To see the logs from the Cloud Build CI, please join either our discussion or announcement mailing list.