EMLX.Native (emlx v0.4.1)

Copy Markdown View Source

Shared utilities for the EMLX native compiler layer.

Summary

Functions

Maps an Nx.Type.t() to the corresponding MLX type atom understood by the C++ NIFs. Sub-byte integer types ({:u, 2}, {:u, 4}, {:s, 2}, {:s, 4}) are widened to the smallest MLX integer type that can hold them.

Functions

to_mlx_type(arg1)

Maps an Nx.Type.t() to the corresponding MLX type atom understood by the C++ NIFs. Sub-byte integer types ({:u, 2}, {:u, 4}, {:s, 2}, {:s, 4}) are widened to the smallest MLX integer type that can hold them.