View Source EXLA.Client (EXLA v0.4.1)

Functions for managing EXLA.Client.

See EXLA module docs for a general introduction.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Copies buffer to device with given device ID.

Returns the name of the default client.

Fetches a client with the given name from configuration.

Sends buffer from device outfeed to the given process tagged by ref.

Returns a map of supported platforms with device information.

Sends data_and_shapes to device infeed.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

copy_buffer_to_device(client, device_buffer, device_id)

View Source

Copies buffer to device with given device ID.

Returns the name of the default client.

Fetches a client with the given name from configuration.

Link to this function

from_outfeed(client, device_id, shapes, pid, ref)

View Source

Sends buffer from device outfeed to the given process tagged by ref.

Note: XLA does not support tuple outfeed shapes. Passing one will simply block the operation indefinitely. Instead, convert the tuple into multiple outfeed operations.

Link to this function

get_supported_platforms()

View Source

Returns a map of supported platforms with device information.

Link to this function

to_infeed(client, device_id, data_and_shapes)

View Source

Sends data_and_shapes to device infeed.

data_and_shapes must be a list of two element tuples where the first element is a binary or a flat list of binaries and the second element is a EXLA.Shape.

Note: XLA does not support tuple infeed shapes when running on host. Passing one will simply block the operation indefinitely. Instead, convert the tuple into multiple infeed operations.