Repository navigation
Commit 57490e0
committed
GPU Metal: implement the device kernel timers
With --debug 1 and deviceTimers (the default), the kernel timers expect the
backend to report the kernel's GPU time, and Metal reported none, so all
kernel times read 0. Give the timed kernel a command buffer of its own and
report its GPUEndTime - GPUStartTime. The times are only set once the
completion is processed, so wait for it rather than for the stream's event.
pbpb30 on M1 Max: 1012 ms of kernel time per event, vs 1218 ms on the CPU.1 parent 6826099 commit 57490e0
1 file changed
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
32 | 37 | | |
33 | 38 | | |
34 | 39 | | |
| |||
57 | 62 | | |
58 | 63 | | |
59 | 64 | | |
| 65 | + | |
60 | 66 | | |
61 | 67 | | |
62 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
63 | 78 | | |
64 | 79 | | |
65 | 80 | | |
| |||
0 commit comments