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
I wrote code where the CPU repeatedly invokes the same compiled TPU kernel at a high frequency. Initially, I observed that the CPU invocation duration is significantly shorter than the TPU kernel execution time, indicating asynchronous behavior. However, after approximately 30 iterations, the CPU invocation duration increases and roughly equals the TPU kernel execution time, suggesting a shift to synchronous behavior.
The relevant code and corresponding trace are shown below:
This behavior leads me to suspect that there may be a command buffer limit or queue depth restriction for pending TPU operations, which eventually causes the CPU to block and wait for TPU execution to catch up.
Could Someone Explain This Behavior?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I wrote code where the CPU repeatedly invokes the same compiled TPU kernel at a high frequency. Initially, I observed that the CPU invocation duration is significantly shorter than the TPU kernel execution time, indicating asynchronous behavior. However, after approximately 30 iterations, the CPU invocation duration increases and roughly equals the TPU kernel execution time, suggesting a shift to synchronous behavior.
The relevant code and corresponding trace are shown below:
This behavior leads me to suspect that there may be a command buffer limit or queue depth restriction for pending TPU operations, which eventually causes the CPU to block and wait for TPU execution to catch up.
Could Someone Explain This Behavior?
Thanks,
Jingtian
Beta Was this translation helpful? Give feedback.
All reactions