# `EXLA.Client`
[🔗](https://github.com/elixir-nx/nx/blob/v0.11.0/exla/lib/exla/client.ex#L1)

Functions for managing `EXLA.Client`.

See `EXLA` module docs for a general introduction.

# `default_name`

Returns the name of the default client.

# `fetch!`

Fetches a client with the given `name` from configuration.

# `from_outfeed`

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

# `get_memory_statistics`

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}}

# `get_supported_platforms`

Returns a map of supported platforms with device information.

# `reset_peak_memory`

Resets the peak memory counter for a client.

## Examples

    iex> client = EXLA.Client.fetch!(:host)
    iex> EXLA.Client.reset_peak_memory(client)
    :ok

# `to_infeed`

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`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
