Skip to main content

Crate burn_std

Crate burn_std 

Source
Expand description

§Burn Standard Library

This library contains core types and utilities shared across Burn, including shapes, indexing, and data types.

Re-exports§

pub use tensor::*;
pub use data::*;
pub use distribution::*;
pub use element::*;
pub use runtime_kind::*;
pub use ops::*;

Modules§

arenastd
A circular, allocation-free arena for reusable memory blocks.
backtrace
Backtrace module to build error reports.
benchmark
Module for benchmark timings
bytesserde
Utilities module to manipulate bytes.
config
Burn runtime configurations.
data
Tensor data representation and helpers.
device
Device module.
device_handle
Device handle module.
distributed
Distributed configurations.
distribution
Random value distributions. Random value distributions used to initialize and populate tensor data.
element
Traits for tensor element types and conversions. Traits and helpers for working with element types and conversions.
errors
Common Errors.
format
Format utilities.
future
Future utils with a compatible API for native, non-std and wasm environments.
id
Id module contains types for unique identifiers.
ops
Configuration types for tensor operations (conv, pool, interpolate, pad, etc). Configuration types for tensor operations.
pool
A dynamically-growing pool that leases exclusive, reusable single-cell items. A dynamically-growing pool of single-cell items handed out as exclusive, non-cloneable handles.
profile
Module for profiling any executable part
quant
Quantization primitives required outside of cubecl-quant
rand
Rand module contains types for random number generation for non-std environments and for std environments.
reader
Useful when you need to read async data without having to decorate each function with async notation.
runtime_kind
Runtime kind of the host program (async / sync / no-std). Runtime kind of the host program.
stream_id
Stream id related utilities.
stub
Stub module contains types for stubs for non-std environments and for std environments.
tensor
Tensor utilities.

Macros§

make_element
Macro to implement the element trait for a type.
obfuscate
Generate a type-erased, inline wrapper for a single value.
s
Slice argument constructor for tensor indexing.

Structs§

AccessPolicy
What an access is allowed to do to satisfy a read/write of a Bytes.
Bytes
A buffer similar to Box<[u8]> that supports custom memory alignment and allows trailing uninitialized bytes.
CommunicationId
An ID unique to any unordered combination of devices, used by collective / communication primitives (distributed training etc.).
DeviceHandle
TODO: Docs
DeviceSettings
Settings controlling the default data types for a specific device.
Reader
Configures a read of a Bytes.
SharedAllocationController
Allocation controller that shares a view into another Bytes behind an Arc.
SharedBytesAllocationController
Allocation controller backed by bytes::Bytes for zero-copy access.
StrideRecord
Common Errors. Collected shape/stride record.
Writer
Configures a mutable access of a Bytes.
bf16
A 16-bit floating point type implementing the bfloat16 format.
e2m3
A 6-bit floating point type with 2 exponent bits and 3 mantissa bits.
e3m2
A 6-bit floating point type with 3 exponent bits and 2 mantissa bits.
f16
A 16-bit floating point type implementing the IEEE 754-2008 standard binary16 a.k.a “half” format.
flex32
A floating point type with relaxed precision, minimum f16, max f32.
tf32
A 19-bit floating point type implementing the tfloat32 format.

Enums§

AccessError
Error returned when accessing a Bytes.
AllocationError
Errors that may occur during memory allocation operations.
AllocationProperty
The kind of allocation behind the Bytes type.
BoundsError
Common Errors. Access Bounds Error.
DeviceError
Errors returned by device-related operations.
ExecutionError
An error that can happen when syncing a device.
ExpressionError
Common Errors. Common Expression Error.
IndexKind
Common Errors. Describes the kind of an index.
SplitError
Error when splitting an allocation.
SplitPolicy
Controls how Bytes::split behaves when the allocation can’t be split in place.
StrideError
Common Errors. Error describing striding issues.
ViewError
Error when taking a view into an allocation.

Traits§

AllocationController
Defines how an Allocation can be controlled.