#![forbid(unsafe_code)]
#![deny(missing_docs)]
#![allow(
clippy::too_many_arguments,
clippy::needless_range_loop,
clippy::double_must_use,
clippy::items_after_test_module,
clippy::assertions_on_constants,
clippy::overly_complex_bool_expr,
clippy::filter_map_bool_then
)]
#![allow(clippy::module_inception)]
#[allow(dead_code)]
pub(crate) fn invalid_program(
op_id: &'static str,
message: impl Into<String>,
) -> vyre_foundation::ir::Program {
let message = message.into();
vyre_foundation::ir::Program::wrapped(
Vec::new(),
[1, 1, 1],
vec![region::wrap_anonymous(
op_id,
vec![vyre_foundation::ir::Node::trap(
vyre_foundation::ir::Expr::u32(0),
message,
)],
)],
)
}
pub mod region;
pub mod range_ordering;
pub mod tensor_ref;
pub use tensor_ref::{check_dtype, check_shape, check_unique_names, TensorRef, TensorRefError};
pub mod builder;
#[cfg(feature = "math-linalg")]
pub(crate) mod linear_algebra_substrate;
mod substrate_catalog;
pub use builder::{check_tensors, BuildOptions};
pub mod buffer_names;
pub mod descriptor;
pub use descriptor::{BufferDescriptor, ProgramDescriptor};
pub mod operation_catalog;
#[cfg(any(
feature = "math-linalg",
feature = "math-scan",
feature = "math-broadcast",
feature = "math-algebra",
feature = "math-succinct"
))]
pub mod math;
#[cfg(feature = "logical")]
pub mod logical;
#[cfg(any(
feature = "nn-activation",
feature = "nn-linear",
feature = "nn-norm",
feature = "nn-attention"
))]
pub mod nn;
#[cfg(any(
feature = "matching-substring",
feature = "matching-dfa",
feature = "matching-nfa"
))]
pub mod scan;
#[cfg(feature = "decode")]
pub mod decode;
#[cfg(feature = "hash")]
pub mod hash;
pub mod text;
pub mod representation;
pub mod parsing;
pub mod graph;
#[cfg(feature = "security")]
pub mod security;
#[cfg(feature = "visual")]
pub mod visual;
#[cfg(any(
feature = "math-linalg",
feature = "math-scan",
feature = "math-broadcast"
))]
pub(crate) use math::elementwise::{f32_elementwise_mul, F32MulRhs};
#[cfg(feature = "nn-linear-4bit")]
pub(crate) use math::linalg::{
plan_matmul_kernel, F32MatmulMode, MatmulFallbackReason, MatmulKernelCapabilities,
MatmulKernelPath, MatmulKernelPlan, MatrixShape,
};
#[cfg(feature = "rule")]
pub mod rule;
#[cfg(feature = "intern")]
pub mod intern;
pub mod contracts;
pub mod signatures;
pub use signatures::{
BOOL_OUTPUTS, BYTES_TO_BYTES_INPUTS, BYTES_TO_BYTES_OUTPUTS, BYTES_TO_U32_OUTPUTS,
F32_F32_F32_INPUTS, F32_F32_INPUTS, F32_INPUTS, F32_OUTPUTS, I32_OUTPUTS, U32_INPUTS,
U32_OUTPUTS, U32_U32_INPUTS,
};
pub(crate) mod fixture_bytes;
pub(crate) mod test_migration;
pub mod prelude {
pub use vyre_foundation::ir::model::expr::GeneratorRef;
pub use vyre_foundation::ir::{BufferAccess, BufferDecl, DataType, Expr, Node, Program};
pub use crate::builder::{check_tensors, BuildOptions};
pub use crate::tensor_ref::{
check_dtype, check_shape, check_unique_names, TensorRef, TensorRefError,
};
pub use crate::region::{wrap, wrap_anonymous, wrap_child};
#[cfg(feature = "decode")]
pub use crate::decode::{base64_decode, hex_decode, inflate, ziftsieve_gpu};
#[cfg(feature = "crypto-blake3")]
pub use crate::hash::blake3_compress;
#[cfg(feature = "logical")]
pub use crate::logical::{nand, nor};
#[cfg(feature = "math-algebra")]
pub use crate::math::algebra::{
bool_semiring_matmul, lattice_join, lattice_meet, semiring_min_plus_mul, sketch_mix,
try_bool_semiring_matmul, try_lattice_join, try_lattice_meet, try_semiring_min_plus_mul,
try_sketch_mix,
};
#[cfg(feature = "math-broadcast")]
pub use crate::math::broadcast::broadcast;
#[cfg(feature = "math-linalg")]
pub use crate::math::linalg::{dot, matmul, matmul_tiled, Matmul, MatmulTiled};
#[cfg(feature = "math-scan")]
pub use crate::math::scan::scan_prefix_sum;
#[cfg(feature = "math-succinct")]
pub use crate::math::succinct::{
rank1_query, rank1_superblocks, try_rank1_query, try_rank1_superblocks,
};
#[cfg(feature = "nn-activation")]
pub use crate::nn::activation::relu;
#[cfg(feature = "nn-attention")]
pub use crate::nn::attention::{attention, softmax, Attention, Softmax};
#[cfg(feature = "nn-linear")]
pub use crate::nn::linear::linear;
#[cfg(feature = "nn-norm")]
pub use crate::nn::norm::{layer_norm, LayerNorm};
#[cfg(feature = "matching-dfa")]
pub use crate::scan::aho_corasick;
#[cfg(feature = "matching-substring")]
pub use crate::scan::substring_search;
}