Expand description
Safe, low-level Rust bindings to MLX.
safemlx exposes MLX arrays, devices, streams, native operators, function
transforms, and accelerator/runtime facilities. It intentionally does not
define neural-network layers, models, optimizers, checkpoint policy, or
other framework abstractions; those belong to consumers such as
eredu-backend-mlx.
Operations are lazy and are scheduled on an explicit Stream. Call
Array::evaluated (or a function in transforms) to submit work before
accessing host data. Native MLX .npy and safetensors I/O is exposed on
Array; higher-level checkpoint formats are outside this crate.
Modules§
- distributed
- Distributed communication groups and operations.
- error
- Custom error types and handler for the c ffi
- fast
- Bindings to MLX fast operators and custom-kernel handles.
- fft
- Fast Fourier Transform (FFT) and its inverse (IFFT) for one, two, and
Ndimensions. - linalg
- Linear algebra operations.
- macros
- Macros for safemlx.
- memory
- MLX allocator memory statistics.
- metal
- Metal backend configuration.
- ops
- Operations
- random
- Collection of functions related to random number generation
- system
- Safe process and operating-system resource observations used by runtimes.
- transforms
- Function transforms
- utils
- Utility functions and types.
Macros§
- abs
- Macro generated for the function
crate::ops::abs. See the function documentation for more details. - acos
- Macro generated for the function
crate::ops::acos. See the function documentation for more details. - acosh
- Macro generated for the function
crate::ops::acosh. See the function documentation for more details. - add
- Macro generated for the function
crate::ops::add. See the function documentation for more details. - addmm
- Macro generated for the function
crate::ops::addmm. See the function documentation for more details. - all
- Macro generated for the function
crate::ops::all. See the function documentation for more details. - all_
axes - Macro generated for the function
crate::ops::all_axes. See the function documentation for more details. - all_
axis - Macro generated for the function
crate::ops::all_axis. See the function documentation for more details. - all_
close - Macro generated for the function
crate::ops::all_close. See the function documentation for more details. - any
- Macro generated for the function
crate::ops::any. See the function documentation for more details. - any_
axes - Macro generated for the function
crate::ops::any_axes. See the function documentation for more details. - any_
axis - Macro generated for the function
crate::ops::any_axis. See the function documentation for more details. - arange
- Macro generated for the function
crate::ops::arange. See the function documentation for more details. - argmax
- Macro generated for the function
crate::ops::indexing::argmax. See the function documentation for more details. - argmax_
axis - Macro generated for the function
crate::ops::indexing::argmax_axis. See the function documentation for more details. - argmin
- Macro generated for the function
crate::ops::indexing::argmin. See the function documentation for more details. - argmin_
axis - Macro generated for the function
crate::ops::indexing::argmin_axis. See the function documentation for more details. - argpartition
- Macro generated for the function
crate::ops::argpartition. See the function documentation for more details. - argpartition_
axis - Macro generated for the function
crate::ops::argpartition_axis. See the function documentation for more details. - argsort
- Macro generated for the function
crate::ops::argsort. See the function documentation for more details. - argsort_
axis - Macro generated for the function
crate::ops::argsort_axis. See the function documentation for more details. - array
- A helper macro to create an array with up to 3 dimensions.
- array_
eq - Macro generated for the function
crate::ops::array_eq. See the function documentation for more details. - as_
strided - Macro generated for the function
crate::ops::as_strided. See the function documentation for more details. - asin
- Macro generated for the function
crate::ops::asin. See the function documentation for more details. - asinh
- Macro generated for the function
crate::ops::asinh. See the function documentation for more details. - assert_
array_ eq - Asserts that two arrays are equal.
- at_
least_ 1d - Macro generated for the function
crate::ops::at_least_1d. See the function documentation for more details. - at_
least_ 2d - Macro generated for the function
crate::ops::at_least_2d. See the function documentation for more details. - at_
least_ 3d - Macro generated for the function
crate::ops::at_least_3d. See the function documentation for more details. - atan
- Macro generated for the function
crate::ops::atan. See the function documentation for more details. - atan2
- Macro generated for the function
crate::ops::atan2. See the function documentation for more details. - atanh
- Macro generated for the function
crate::ops::atanh. See the function documentation for more details. - bernoulli
- Macro generated for the function
crate::random::bernoulli. See the function documentation for more details. - block_
masked_ mm - Macro generated for the function
crate::ops::block_masked_mm. See the function documentation for more details. - broadcast_
arrays - Macro generated for the function
crate::ops::broadcast_arrays. See the function documentation for more details. - broadcast_
to - Macro generated for the function
crate::ops::broadcast_to. See the function documentation for more details. - categorical
- Macro generated for the function
crate::random::categorical. See the function documentation for more details. - ceil
- Macro generated for the function
crate::ops::ceil. See the function documentation for more details. - cholesky
- Macro generated for the function
crate::linalg::cholesky. See the function documentation for more details. - cholesky_
inv - Macro generated for the function
crate::linalg::cholesky_inv. See the function documentation for more details. - clip
- Macro generated for the function
crate::ops::clip. See the function documentation for more details. - concatenate
- Macro generated for the function
crate::ops::concatenate. See the function documentation for more details. - concatenate_
axis - Macro generated for the function
crate::ops::concatenate_axis. See the function documentation for more details. - contiguous
- Macro generated for the function
crate::ops::contiguous. See the function documentation for more details. - conv1d
- Macro generated for the function
crate::ops::conv1d. See the function documentation for more details. - conv2d
- Macro generated for the function
crate::ops::conv2d. See the function documentation for more details. - conv3d
- Macro generated for the function
crate::ops::conv3d. See the function documentation for more details. - conv_
general - Macro generated for the function
crate::ops::conv_general. See the function documentation for more details. - conv_
transpose1d - Macro generated for the function
crate::ops::conv_transpose1d. See the function documentation for more details. - conv_
transpose2d - Macro generated for the function
crate::ops::conv_transpose2d. See the function documentation for more details. - conv_
transpose3d - Macro generated for the function
crate::ops::conv_transpose3d. See the function documentation for more details. - copy
- Macro generated for the function
crate::ops::copy. See the function documentation for more details. - cos
- Macro generated for the function
crate::ops::cos. See the function documentation for more details. - cosh
- Macro generated for the function
crate::ops::cosh. See the function documentation for more details. - cross
- Macro generated for the function
crate::linalg::cross. See the function documentation for more details. - cummax
- Macro generated for the function
crate::ops::cummax. See the function documentation for more details. - cummin
- Macro generated for the function
crate::ops::cummin. See the function documentation for more details. - cumprod
- Macro generated for the function
crate::ops::cumprod. See the function documentation for more details. - cumsum
- Macro generated for the function
crate::ops::cumsum. See the function documentation for more details. - degrees
- Macro generated for the function
crate::ops::degrees. See the function documentation for more details. - dequantize
- Macro generated for the function
crate::ops::dequantize. See the function documentation for more details. - diag
- Macro generated for the function
crate::ops::diag. See the function documentation for more details. - diagonal
- Macro generated for the function
crate::ops::diagonal. See the function documentation for more details. - divide
- Macro generated for the function
crate::ops::divide. See the function documentation for more details. - divmod
- Macro generated for the function
crate::ops::divmod. See the function documentation for more details. - eig
- Macro generated for the function
crate::linalg::eig. See the function documentation for more details. - eigh
- Macro generated for the function
crate::linalg::eigh. See the function documentation for more details. - eigvals
- Macro generated for the function
crate::linalg::eigvals. See the function documentation for more details. - eigvalsh
- Macro generated for the function
crate::linalg::eigvalsh. See the function documentation for more details. - einsum
- Macro generated for the function
crate::ops::einsum. See the function documentation for more details. - eq
- Macro generated for the function
crate::ops::eq. See the function documentation for more details. - erf
- Macro generated for the function
crate::ops::erf. See the function documentation for more details. - erfinv
- Macro generated for the function
crate::ops::erfinv. See the function documentation for more details. - exp
- Macro generated for the function
crate::ops::exp. See the function documentation for more details. - expand_
dims - Macro generated for the function
crate::ops::expand_dims. See the function documentation for more details. - expand_
dims_ axes - Macro generated for the function
crate::ops::expand_dims_axes. See the function documentation for more details. - expm1
- Macro generated for the function
crate::ops::expm1. See the function documentation for more details. - eye
- Macro generated for the function
crate::ops::eye. See the function documentation for more details. - fft
- Macro generated for the function
crate::fft::fft. See the function documentation for more details. - fft2
- Macro generated for the function
crate::fft::fft2. See the function documentation for more details. - fftn
- Macro generated for the function
crate::fft::fftn. See the function documentation for more details. - fftshift
- Macro generated for the function
crate::fft::fftshift. See the function documentation for more details. - flatten
- Macro generated for the function
crate::ops::flatten. See the function documentation for more details. - floor
- Macro generated for the function
crate::ops::floor. See the function documentation for more details. - floor_
divide - Macro generated for the function
crate::ops::floor_divide. See the function documentation for more details. - from_
fp8 - Macro generated for the function
crate::ops::from_fp8. See the function documentation for more details. - full
- Macro generated for the function
crate::ops::full. See the function documentation for more details. - full_
like - Macro generated for the function
crate::ops::full_like. See the function documentation for more details. - gather_
mm - Macro generated for the function
crate::ops::gather_mm. See the function documentation for more details. - gather_
qmm - Macro generated for the function
crate::ops::gather_qmm. See the function documentation for more details. - gather_
single - Macro generated for the function
crate::ops::indexing::gather_single. See the function documentation for more details. - ge
- Macro generated for the function
crate::ops::ge. See the function documentation for more details. - gt
- Macro generated for the function
crate::ops::gt. See the function documentation for more details. - gumbel
- Macro generated for the function
crate::random::gumbel. See the function documentation for more details. - identity
- Macro generated for the function
crate::ops::identity. See the function documentation for more details. - ifft
- Macro generated for the function
crate::fft::ifft. See the function documentation for more details. - ifft2
- Macro generated for the function
crate::fft::ifft2. See the function documentation for more details. - ifftn
- Macro generated for the function
crate::fft::ifftn. See the function documentation for more details. - ifftshift
- Macro generated for the function
crate::fft::ifftshift. See the function documentation for more details. - imag
- Macro generated for the function
crate::ops::imag. See the function documentation for more details. - inner
- Macro generated for the function
crate::ops::inner. See the function documentation for more details. - inv
- Macro generated for the function
crate::linalg::inv. See the function documentation for more details. - irfft
- Macro generated for the function
crate::fft::irfft. See the function documentation for more details. - irfft2
- Macro generated for the function
crate::fft::irfft2. See the function documentation for more details. - irfftn
- Macro generated for the function
crate::fft::irfftn. See the function documentation for more details. - is_
close - Macro generated for the function
crate::ops::is_close. See the function documentation for more details. - is_inf
- Macro generated for the function
crate::ops::is_inf. See the function documentation for more details. - is_nan
- Macro generated for the function
crate::ops::is_nan. See the function documentation for more details. - is_
neg_ inf - Macro generated for the function
crate::ops::is_neg_inf. See the function documentation for more details. - is_
pos_ inf - Macro generated for the function
crate::ops::is_pos_inf. See the function documentation for more details. - kron
- Macro generated for the function
crate::ops::kron. See the function documentation for more details. - layer_
norm - Macro generated for the function
crate::fast::layer_norm. See the function documentation for more details. - le
- Macro generated for the function
crate::ops::le. See the function documentation for more details. - linspace
- Macro generated for the function
crate::ops::linspace. See the function documentation for more details. - log
- Macro generated for the function
crate::ops::log. See the function documentation for more details. - log2
- Macro generated for the function
crate::ops::log2. See the function documentation for more details. - log1p
- Macro generated for the function
crate::ops::log1p. See the function documentation for more details. - log10
- Macro generated for the function
crate::ops::log10. See the function documentation for more details. - logaddexp
- Macro generated for the function
crate::ops::logaddexp. See the function documentation for more details. - logical_
and - Macro generated for the function
crate::ops::logical_and. See the function documentation for more details. - logical_
not - Macro generated for the function
crate::ops::logical_not. See the function documentation for more details. - logical_
or - Macro generated for the function
crate::ops::logical_or. See the function documentation for more details. - logsumexp
- Macro generated for the function
crate::ops::logsumexp. See the function documentation for more details. - logsumexp_
axes - Macro generated for the function
crate::ops::logsumexp_axes. See the function documentation for more details. - logsumexp_
axis - Macro generated for the function
crate::ops::logsumexp_axis. See the function documentation for more details. - lt
- Macro generated for the function
crate::ops::lt. See the function documentation for more details. - lu
- Macro generated for the function
crate::linalg::lu. See the function documentation for more details. - lu_
factor - Macro generated for the function
crate::linalg::lu_factor. See the function documentation for more details. - masked_
scatter - Macro generated for the function
crate::ops::indexing::masked_scatter. See the function documentation for more details. - matmul
- Macro generated for the function
crate::ops::matmul. See the function documentation for more details. - max
- Macro generated for the function
crate::ops::max. See the function documentation for more details. - max_
axes - Macro generated for the function
crate::ops::max_axes. See the function documentation for more details. - max_
axis - Macro generated for the function
crate::ops::max_axis. See the function documentation for more details. - maximum
- Macro generated for the function
crate::ops::maximum. See the function documentation for more details. - mean
- Macro generated for the function
crate::ops::mean. See the function documentation for more details. - mean_
axes - Macro generated for the function
crate::ops::mean_axes. See the function documentation for more details. - mean_
axis - Macro generated for the function
crate::ops::mean_axis. See the function documentation for more details. - median
- Macro generated for the function
crate::ops::median. See the function documentation for more details. - median_
axes - Macro generated for the function
crate::ops::median_axes. See the function documentation for more details. - median_
axis - Macro generated for the function
crate::ops::median_axis. See the function documentation for more details. - min
- Macro generated for the function
crate::ops::min. See the function documentation for more details. - min_
axes - Macro generated for the function
crate::ops::min_axes. See the function documentation for more details. - min_
axis - Macro generated for the function
crate::ops::min_axis. See the function documentation for more details. - minimum
- Macro generated for the function
crate::ops::minimum. See the function documentation for more details. - move_
axis - Macro generated for the function
crate::ops::move_axis. See the function documentation for more details. - multiply
- Macro generated for the function
crate::ops::multiply. See the function documentation for more details. - multivariate_
normal - Macro generated for the function
crate::random::multivariate_normal. See the function documentation for more details. - ne
- Macro generated for the function
crate::ops::ne. See the function documentation for more details. - negative
- Macro generated for the function
crate::ops::negative. See the function documentation for more details. - norm
- Macro generated for the function
crate::linalg::norm. See the function documentation for more details. - norm_l2
- Macro generated for the function
crate::linalg::norm_l2. See the function documentation for more details. - norm_
matrix - Macro generated for the function
crate::linalg::norm_matrix. See the function documentation for more details. - normal
- Macro generated for the function
crate::random::normal. See the function documentation for more details. - ones
- Macro generated for the function
crate::ops::ones. See the function documentation for more details. - ones_
dtype - Macro generated for the function
crate::ops::ones_dtype. See the function documentation for more details. - ones_
like - Macro generated for the function
crate::ops::ones_like. See the function documentation for more details. - outer
- Macro generated for the function
crate::ops::outer. See the function documentation for more details. - pad
- Macro generated for the function
crate::ops::pad. See the function documentation for more details. - partition
- Macro generated for the function
crate::ops::partition. See the function documentation for more details. - partition_
axis - Macro generated for the function
crate::ops::partition_axis. See the function documentation for more details. - pinv
- Macro generated for the function
crate::linalg::pinv. See the function documentation for more details. - power
- Macro generated for the function
crate::ops::power. See the function documentation for more details. - prod
- Macro generated for the function
crate::ops::prod. See the function documentation for more details. - prod_
axes - Macro generated for the function
crate::ops::prod_axes. See the function documentation for more details. - prod_
axis - Macro generated for the function
crate::ops::prod_axis. See the function documentation for more details. - put_
along_ axis - Macro generated for the function
crate::ops::indexing::put_along_axis. See the function documentation for more details. - qr
- Macro generated for the function
crate::linalg::qr. See the function documentation for more details. - quantize
- Macro generated for the function
crate::ops::quantize. See the function documentation for more details. - quantized_
matmul - Macro generated for the function
crate::ops::quantized_matmul. See the function documentation for more details. - radians
- Macro generated for the function
crate::ops::radians. See the function documentation for more details. - randint
- Macro generated for the function
crate::random::randint. See the function documentation for more details. - real
- Macro generated for the function
crate::ops::real. See the function documentation for more details. - reciprocal
- Macro generated for the function
crate::ops::reciprocal. See the function documentation for more details. - remainder
- Macro generated for the function
crate::ops::remainder. See the function documentation for more details. - repeat
- Macro generated for the function
crate::ops::repeat. See the function documentation for more details. - repeat_
axis - Macro generated for the function
crate::ops::repeat_axis. See the function documentation for more details. - reshape
- Macro generated for the function
crate::ops::reshape. See the function documentation for more details. - rfft
- Macro generated for the function
crate::fft::rfft. See the function documentation for more details. - rfft2
- Macro generated for the function
crate::fft::rfft2. See the function documentation for more details. - rfftn
- Macro generated for the function
crate::fft::rfftn. See the function documentation for more details. - rms_
norm - Macro generated for the function
crate::fast::rms_norm. See the function documentation for more details. - rope
- Macro generated for the function
crate::fast::rope. See the function documentation for more details. - rope_
dynamic - Macro generated for the function
crate::fast::rope_dynamic. See the function documentation for more details. - round
- Macro generated for the function
crate::ops::round. See the function documentation for more details. - rsqrt
- Macro generated for the function
crate::ops::rsqrt. See the function documentation for more details. - scaled_
dot_ product_ attention - Macro generated for the function
crate::fast::scaled_dot_product_attention. See the function documentation for more details. - scatter
- Macro generated for the function
crate::ops::indexing::scatter. See the function documentation for more details. - scatter_
add - Macro generated for the function
crate::ops::indexing::scatter_add. See the function documentation for more details. - scatter_
add_ nd - Macro generated for the function
crate::ops::indexing::scatter_add_nd. See the function documentation for more details. - scatter_
add_ single - Macro generated for the function
crate::ops::indexing::scatter_add_single. See the function documentation for more details. - scatter_
max_ single - Macro generated for the function
crate::ops::indexing::scatter_max_single. See the function documentation for more details. - scatter_
min_ single - Macro generated for the function
crate::ops::indexing::scatter_min_single. See the function documentation for more details. - scatter_
nd - Macro generated for the function
crate::ops::indexing::scatter_nd. See the function documentation for more details. - scatter_
prod_ single - Macro generated for the function
crate::ops::indexing::scatter_prod_single. See the function documentation for more details. - scatter_
single - Macro generated for the function
crate::ops::indexing::scatter_single. See the function documentation for more details. - segment_
sum - Macro generated for the function
crate::ops::segment_sum. See the function documentation for more details. - segmented_
mm - Macro generated for the function
crate::ops::segmented_mm. See the function documentation for more details. - sigmoid
- Macro generated for the function
crate::ops::sigmoid. See the function documentation for more details. - sign
- Macro generated for the function
crate::ops::sign. See the function documentation for more details. - sin
- Macro generated for the function
crate::ops::sin. See the function documentation for more details. - sinh
- Macro generated for the function
crate::ops::sinh. See the function documentation for more details. - softmax
- Macro generated for the function
crate::ops::softmax. See the function documentation for more details. - softmax_
axes - Macro generated for the function
crate::ops::softmax_axes. See the function documentation for more details. - softmax_
axis - Macro generated for the function
crate::ops::softmax_axis. See the function documentation for more details. - solve
- Macro generated for the function
crate::linalg::solve. See the function documentation for more details. - solve_
triangular - Macro generated for the function
crate::linalg::solve_triangular. See the function documentation for more details. - sort
- Macro generated for the function
crate::ops::sort. See the function documentation for more details. - sort_
axis - Macro generated for the function
crate::ops::sort_axis. See the function documentation for more details. - split
- Macro generated for the function
crate::ops::split. See the function documentation for more details. - split_
sections - Macro generated for the function
crate::ops::split_sections. See the function documentation for more details. - sqrt
- Macro generated for the function
crate::ops::sqrt. See the function documentation for more details. - square
- Macro generated for the function
crate::ops::square. See the function documentation for more details. - squeeze
- Macro generated for the function
crate::ops::squeeze. See the function documentation for more details. - squeeze_
axes - Macro generated for the function
crate::ops::squeeze_axes. See the function documentation for more details. - stack
- Macro generated for the function
crate::ops::stack. See the function documentation for more details. - stack_
axis - Macro generated for the function
crate::ops::stack_axis. See the function documentation for more details. - std
- Macro generated for the function
crate::ops::std. See the function documentation for more details. - std_
axes - Macro generated for the function
crate::ops::std_axes. See the function documentation for more details. - std_
axis - Macro generated for the function
crate::ops::std_axis. See the function documentation for more details. - subtract
- Macro generated for the function
crate::ops::subtract. See the function documentation for more details. - sum
- Macro generated for the function
crate::ops::sum. See the function documentation for more details. - sum_
axes - Macro generated for the function
crate::ops::sum_axes. See the function documentation for more details. - sum_
axis - Macro generated for the function
crate::ops::sum_axis. See the function documentation for more details. - svd
- Macro generated for the function
crate::linalg::svd. See the function documentation for more details. - swap_
axes - Macro generated for the function
crate::ops::swap_axes. See the function documentation for more details. - take
- Macro generated for the function
crate::ops::indexing::take. See the function documentation for more details. - take_
along_ axis - Macro generated for the function
crate::ops::indexing::take_along_axis. See the function documentation for more details. - take_
axis - Macro generated for the function
crate::ops::indexing::take_axis. See the function documentation for more details. - tan
- Macro generated for the function
crate::ops::tan. See the function documentation for more details. - tanh
- Macro generated for the function
crate::ops::tanh. See the function documentation for more details. - tensordot_
axes - Macro generated for the function
crate::ops::tensordot_axes. See the function documentation for more details. - tensordot_
axis - Macro generated for the function
crate::ops::tensordot_axis. See the function documentation for more details. - tile
- Macro generated for the function
crate::ops::tile. See the function documentation for more details. - to_fp8
- Macro generated for the function
crate::ops::to_fp8. See the function documentation for more details. - topk
- Macro generated for the function
crate::ops::indexing::topk. See the function documentation for more details. - topk_
axis - Macro generated for the function
crate::ops::indexing::topk_axis. See the function documentation for more details. - transpose
- Macro generated for the function
crate::ops::transpose. See the function documentation for more details. - transpose_
axes - Macro generated for the function
crate::ops::transpose_axes. See the function documentation for more details. - tri
- Macro generated for the function
crate::ops::tri. See the function documentation for more details. - tri_inv
- Macro generated for the function
crate::linalg::tri_inv. See the function documentation for more details. - tril
- Macro generated for the function
crate::ops::tril. See the function documentation for more details. - triu
- Macro generated for the function
crate::ops::triu. See the function documentation for more details. - truncated_
normal - Macro generated for the function
crate::random::truncated_normal. See the function documentation for more details. - unflatten
- Macro generated for the function
crate::ops::unflatten. See the function documentation for more details. - uniform
- Macro generated for the function
crate::random::uniform. See the function documentation for more details. - var
- Macro generated for the function
crate::ops::var. See the function documentation for more details. - var_
axes - Macro generated for the function
crate::ops::var_axes. See the function documentation for more details. - var_
axis - Macro generated for the function
crate::ops::var_axis. See the function documentation for more details. - zeros
- Macro generated for the function
crate::ops::zeros. See the function documentation for more details. - zeros_
dtype - Macro generated for the function
crate::ops::zeros_dtype. See the function documentation for more details. - zeros_
like - Macro generated for the function
crate::ops::zeros_like. See the function documentation for more details.
Structs§
- Array
- An n-dimensional array.
- Device
- Representation of a Device in MLX.
- Dtype
Iter - An iterator over the variants of Dtype
- Evaluated
Array - An evaluated array with materialized storage available for host reads.
- Event
- A single-shot completion event independent of the selected MLX device backend.
- Host
Transfer Buffer - An owned, typed, host-addressable transfer allocation.
- Host
Transfer Memory Stats - Process-wide physical allocations owned by host-transfer buffers of one kind.
- Immutable
Host Transfer Buffer - Immutable, shareable host-transfer storage.
- Pending
Device Transfer - A host-to-array transfer whose array cannot be accessed before completion.
- Pending
Host Transfer - An array-to-host transfer whose buffer cannot be accessed before completion.
- Stream
- A stream of evaluation attached to a particular device.
- Submitted
Device Transfer - A submitted immutable-host-to-device transfer.
- Timed
Evaluation - An asynchronously submitted evaluation with execution-timeline timestamps.
Enums§
- Device
Type - Type of device.
- Dtype
- Array element type
- Event
Backend - MLX device backend which owns an
Event. - Host
Transfer Policy - Requested semantics for an MLX host transfer allocation.
- Host
Transfer Storage Kind - Physical storage selected for a host transfer allocation.
Traits§
- Array
Element - A marker trait for array elements.
- From
Nested - A helper trait to construct
Arrayfrom nested arrays or slices. - From
Scalar - A helper trait to construct
Arrayfrom scalar values.
Functions§
- host_
transfer_ capacity_ upper_ bound - Returns a conservative physical capacity to reserve before allocation.
- host_
transfer_ memory_ stats - Returns native physical-allocation telemetry for one storage kind.
- reset_
host_ transfer_ peak_ memory - Resets one storage kind’s physical high-water marks to current occupancy.
- stop_
gradient - Stop gradients from being computed.
Type Aliases§
- complex64
- Type alias for
num_complex::Complex<f32>.