mod affine_grouped;
mod affine_grouped_weight_reuse;
mod grouped_layout;
mod op_registration;
mod planner_evidence;
mod quantized_spec;
mod unpack_on_demand;
pub use affine_grouped::{linear_4bit_affine_grouped, linear_4bit_affine_grouped_batched};
pub use planner_evidence::linear_4bit_affine_grouped_planner_evidence;
pub use quantized_spec::{
linear_4bit_affine_grouped_batched_typed, linear_4bit_affine_grouped_typed,
};
pub use unpack_on_demand::linear_4bit;
use vyre_foundation::ir::DataType;
pub const LINEAR_4BIT_AFFINE_GROUPED_OUTPUT_DRIFT_ABS_TOLERANCE: f32 = 1.0e-4;
#[derive(Debug, Clone, PartialEq)]
pub struct QuantizedLinear4BitPlannerEvidence {
pub in_dim: u32,
pub out_dim: u32,
pub group_size: u32,
pub group_count: u32,
pub packed_weight_bytes: u64,
pub dequantized_weight_bytes: u64,
pub sidecar_bytes: u64,
pub bias_bytes: u64,
pub output_bytes: u64,
pub dequant_bytes_elided: u64,
pub matmul_m: u32,
pub matmul_k: u32,
pub matmul_n: u32,
pub matmul_tile: u32,
pub matmul_selected_path: &'static str,
pub matmul_candidate_path: Option<&'static str>,
pub matmul_fallback_reason: Option<&'static str>,
pub tensor_core_eligible: bool,
pub output_drift_abs_tolerance: f32,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct QuantizedLinear4BitSpec {
pub in_dim: u32,
pub out_dim: u32,
pub weight_type: DataType,
}