Commit 10722d4
committed
SyclTimer.dt return object with named accessors
The object can unpack into a tuple, like before, but it prints
with annotation of what each number means, and provides names
getters.
with timer(q):
code
dur = timer.dt
print(dur) # outputs (host_dt=..., device_dt=...)
dur.host_dt # get host-timer delta
dur.device_dt # get device-timer delta
hdt, ddt = dur # unpack into a tuple1 parent 0a73764 commit 10722d4
2 files changed
+36
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
25 | 47 | | |
26 | 48 | | |
27 | 49 | | |
| |||
45 | 67 | | |
46 | 68 | | |
47 | 69 | | |
48 | | - | |
| 70 | + | |
49 | 71 | | |
50 | 72 | | |
51 | 73 | | |
| |||
101 | 123 | | |
102 | 124 | | |
103 | 125 | | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
108 | 131 | | |
109 | 132 | | |
110 | 133 | | |
| |||
113 | 136 | | |
114 | 137 | | |
115 | 138 | | |
116 | | - | |
| 139 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
206 | 211 | | |
207 | 212 | | |
208 | 213 | | |
| |||
0 commit comments