Functions for managing EXLA.Client.
See EXLA module docs for a general introduction.
Summary
Functions
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 the memory statistics for a client.
Returns a map of supported platforms with device information.
Resets the peak memory counter for a client.
Sends data_and_typespecs to device infeed.
Functions
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 the memory statistics for a client.
Returns a map with the following keys:
:allocated- Currently allocated memory in bytes:peak- Peak memory usage in bytes:per_device- Map of device ID to allocated memory in bytes
Examples
client = EXLA.Client.fetch!(:host)
EXLA.Client.get_memory_statistics(client)
%{allocated: 0, peak: 0, per_device: %{0 => 0}}
Returns a map of supported platforms with device information.
Resets the peak memory counter for a client.
Examples
iex> client = EXLA.Client.fetch!(:host)
iex> EXLA.Client.reset_peak_memory(client)
:ok
Sends data_and_typespecs to device infeed.
data_and_typespecs is a list of values corresponding to a single
infeed operation. It must be a list of two element tuples where the
first element is a binary and the second element is a EXLA.Typespec.