Skip to main content

Crate xn

Crate xn 

Source

Re-exports§

pub use backend::Backend;
pub use backend::ThreadSafe;
pub use dtype::DType;
pub use dtype::DTypeQ;
pub use dtype::WithDType;
pub use dtype::WithDTypeF;
pub use error::Context;
pub use error::Error;
pub use error::Result;
pub use shape::D;
pub use shape::Dim;
pub use shape::Shape;
pub use tensor::Tensor;
pub use tensor::TypedTensor;
pub use tensor_view::TensorOrView;
pub use tensor_view::TensorView;
pub use utils::get_num_cpus;
pub use utils::get_num_threads;
pub use utils::set_num_threads;

Modules§

backend
convert
Implement conversion traits for tensors
cpu_backend
display
Pretty printing of tensors
dtype
error
inplace_ops
models
nn
ops
quantized
Code for GGML and GGUF files
safetensors
shape
The shape of a tensor is a tuple with the size of each of its dimensions.
streaming
tensor
tensor_view
threadpool
A persistent worker pool for fan-out inside a single operator.
utils

Macros§

bail

Structs§

CpuDevice
Runner
Unquantized

Constants§

CPU

Traits§

BackendQ
Module
ModuleT
WithQ

Functions§

run_with_device
with_avx
with_dotprod
with_f16c
with_kleidi_ai
Whether xn was built with KleidiAI’s kernels: the kai feature, on a target they support. They run only on a CPU with SME2, and not when XN_KAI is 0.
with_neon
with_simd128

Type Aliases§

CpuTensor