Transfers the given value into the XLA infeed queue. XLA's infeed queue is a single queue that feeds the "XLA virtual machine" with a totally ordered stream of values. This is dequeued from XLA computations via the Infeed() operation. Args: value: the value that the caller would like t
(value, device=None)
| 442 | |
| 443 | |
| 444 | def transfer_to_infeed(value, device=None): |
| 445 | """Transfers the given value into the XLA infeed queue. |
| 446 | |
| 447 | XLA's infeed queue is a single queue that feeds the "XLA virtual machine" with |
| 448 | a totally ordered stream of values. This is dequeued from XLA computations via |
| 449 | the Infeed() operation. |
| 450 | |
| 451 | Args: |
| 452 | value: the value that the caller would like to enqueue into the XLA infeed |
| 453 | queue |
| 454 | device: the device to infeed the value to. Each device has a |
| 455 | distinct infeed queue. |
| 456 | """ |
| 457 | # TODO(phawkins): support non-default backends. |
| 458 | backend = get_local_backend() |
| 459 | device = device or backend.local_devices()[0] |
| 460 | device.TransferToInfeed(value) |
| 461 | |
| 462 | |
| 463 | def transfer_from_outfeed(shape, device=None): |
nothing calls this directly
no test coverage detected