The device on which the batch resides (or will reside, in case of lazy evaluation).
(self)
| 507 | |
| 508 | @property |
| 509 | def device(self) -> Device: |
| 510 | """ |
| 511 | The device on which the batch resides (or will reside, in case of lazy evaluation). |
| 512 | """ |
| 513 | if self._device is None: |
| 514 | if self._invocation_result is not None: |
| 515 | self._device = self._invocation_result.device |
| 516 | elif self._tensors: |
| 517 | self._device = self._tensors[0].device |
| 518 | else: |
| 519 | raise ValueError("Cannot establish the number of dimensions of an empty Batch") |
| 520 | return self._device |
| 521 | |
| 522 | @property |
| 523 | def layout(self) -> str | None: |
no outgoing calls
no test coverage detected