(self, args: tuple[Any, ...])
| 102 | return self._stream |
| 103 | |
| 104 | def _sync_if_cuda(self, args: tuple[Any, ...]) -> None: |
| 105 | if not torch.cuda.is_available(): |
| 106 | return |
| 107 | device = self._resolve_device(args) |
| 108 | if device.type != "cuda": |
| 109 | return |
| 110 | torch.cuda.synchronize(device) |
| 111 | |
| 112 | def submit(self, decode_fn: Callable[..., torch.Tensor], *args: Any, **kwargs: Any) -> None: |
| 113 | self._num_submitted += 1 |
no test coverage detected