Expand description
§hurray-core
Core types for the hurray tensor interchange format.
This crate provides the format types, tensor descriptor, buffer handle, and quantization descriptors. It has no I/O and no async dependencies — it is the foundation for all other hurray crates.
§Feature flags
| Feature | Effect |
|---|---|
serde | Derives serde::Serialize / serde::Deserialize for all public types |
Re-exports§
pub use buffer::validate_colocation;pub use buffer::BufferHandle;pub use buffer::DeviceTag;pub use buffer::MemoryClass;pub use buffer::PrivateMemoryClass;pub use buffer::PrivateTag;pub use buffer::SyncMode;pub use buffer::MIN_BUFFER_ALIGNMENT;pub use buffer::PAGE_ALIGNMENT;pub use composite::CompositeTensor;pub use composite::CompositeValidator;pub use descriptor::CompositeMemberDescriptor;pub use descriptor::DescriptorFlags;pub use descriptor::ExtensionTypeDescriptor;pub use descriptor::MemberRole;pub use descriptor::ShardDescriptor;pub use descriptor::Statistics;pub use descriptor::StatisticsMask;pub use descriptor::TensorDescriptor;pub use descriptor::DESCRIPTOR_VERSION_MAJOR;pub use descriptor::DESCRIPTOR_VERSION_MINOR;pub use descriptor::MAGIC;pub use element_type::ElementType;pub use error::Error;pub use error::Result;pub use layout::byte_address_from_element_offset;pub use layout::BlockPagedLayout;pub use layout::BlockTableIndexType;pub use layout::CombineOp;pub use layout::CompositeLayout;pub use layout::CompositionRule;pub use layout::CsfLayout;pub use layout::ElementAddress;pub use layout::KvRole;pub use layout::LayoutDescriptor;pub use quantization::validate_axis;pub use quantization::validate_buffer_placement;pub use quantization::Mxfp;pub use quantization::Nf4;pub use quantization::PerBlockAffine;pub use quantization::PerChannelAffine;pub use quantization::PerTensorAffine;pub use quantization::QuantizationDescriptor;pub use quantization::QuantizationSchemeTag;pub use quantization::MXFP_CANONICAL_BLOCK_SIZE;pub use quantization::MXFP_MAX_BLOCK_SIZE;pub use quantization::MXFP_MIN_BLOCK_SIZE;pub use quantization::NF4_LUT;pub use quantization::NF4_MIN_BLOCK_SIZE;pub use quantization::PER_BLOCK_AFFINE_MIN_BLOCK_SIZE;pub use shape::Shape;pub use shape::DYNAMIC;pub use shape::MAX_RANK;
Modules§
- buffer
- Buffer protocol types for the Hurray tensor format.
- composite
- Composite tensor: head + members, aggregated across whole
TensorDescriptors. - descriptor
- Tensor descriptor — binary encoding and decoding.
- element_
type - Element type system for the Hurray tensor format.
- error
- layout
- Layout descriptors for the Hurray tensor interchange format.
- quantization
- Quantization descriptor types for the Hurray tensor format.
- shape
- Tensor shape — rank and dimension sizes.
Functions§
- buffer_
size_ bytes - Returns the minimum buffer size in bytes required to store
element_countcontiguous elements of the given type.