George Necula 342d62436f [host_callback] Add support for pjit of host_callback.
Currently, all XLA side-effect ops inside a sharded computation must have
explicit sharding. This includes the outfeed and infeed used by host_callback.

The implementation here uses AssignDevice sharding for both the outfeed and the
infeed. This means that before outfeed, the devices will do an all_gather and
the first device will make the outfeed. The host callback will receive a single
outfeed with the entire array, and is supposed to return the entire array. This
gets sent to the same device that issued to outfeed, which is responsible to
send the respective slices to the other participating devices.

PiperOrigin-RevId: 370711606
2021-04-27 10:30:13 -07:00
..
2021-04-13 09:43:24 -07:00
2021-04-13 09:43:24 -07:00
2021-04-23 08:49:13 -07:00
2021-04-03 14:11:36 -07:00
2021-04-13 09:43:24 -07:00
2021-03-23 18:56:01 -07:00
2021-04-13 09:43:24 -07:00