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] Fast launch of kernels that have no dependencies (#4188)
This patch aims to reduce the time for the specific case when the kernel doesn't
have any dependencies. If the kernel doesn't use accessors, then the vector
MRequirements is empty. If the kernel doesn't depend on other events, then the
vector MEvents is empty. In most cases this is the kernel that uses USM memory
only, for such cases, the patch is intended.
Since the vectors MRequirements and MEvents are empty for ExecCGCommand,
ExecCGCommand of such kernel doesn't affect the command graph and is not added
as a node. Since this command doesn't depend on the graph in any way, it can be
safely executed independently, without going through the mechanism of placing it
into the queue, which in this case is meaningless. Thus, the command can be
executed instantly.
This significantly saves time that could be wasted in: a lot of extra checks
trying to add a command to the graph using 1 write-mutex to the graph, many
extra checks in queuing process using 1 read-mutex and 1 write-mutex. Here
printGraphAsDot is useless because the graph isn't changed and this is used only
to support the old behavior, and this can be removed if desired.
0 commit comments