EMLX.Backend (emlx v0.3.0)

Copy Markdown View Source

EMLX backend for Nx tensors, providing GPU acceleration via Apple's MLX.

For quantized inference, see EMLX.Quantization and EMLX.Quantization.Config.

Summary

Functions

Converts from an Nx tensor to an MLX array.

Converts an MLX array to an Nx tensor.

Converts an MLX array back to an Nx tensor with type and shape assertions.

Functions

from_nx(other_backend)

Converts from an Nx tensor to an MLX array.

to_nx(device_ref)

Converts an MLX array to an Nx tensor.

to_nx(device_ref, t)

Converts an MLX array back to an Nx tensor with type and shape assertions.

write_finite_f8(x)

write_non_finite(data, int)