Checks if all work currently captured by event has completed. Returns: bool: Whether all work currently captured by event has completed. Examples: .. code-block:: pycon >>> # doctest: +REQUIRES(env:CUSTOM_DEVICE) >>
(self)
| 1211 | self.event_base.record(stream.stream_base) |
| 1212 | |
| 1213 | def query(self) -> bool: |
| 1214 | ''' |
| 1215 | |
| 1216 | Checks if all work currently captured by event has completed. |
| 1217 | |
| 1218 | Returns: |
| 1219 | bool: Whether all work currently captured by event has completed. |
| 1220 | |
| 1221 | Examples: |
| 1222 | .. code-block:: pycon |
| 1223 | |
| 1224 | >>> # doctest: +REQUIRES(env:CUSTOM_DEVICE) |
| 1225 | >>> import paddle |
| 1226 | |
| 1227 | >>> paddle.set_device('custom_cpu') |
| 1228 | >>> e = paddle.device.Event() |
| 1229 | >>> e.record() |
| 1230 | >>> e.query() |
| 1231 | |
| 1232 | ''' |
| 1233 | return self.event_base.query() |
| 1234 | |
| 1235 | def elapsed_time(self, end_event: Event) -> int: |
| 1236 | ''' |
no outgoing calls