pub trait LinearOps: Send + Sync {
// Required method
fn linear(&self, input: &TensorRef, weight: &TensorRef) -> Result<TensorRef>;
// Provided method
fn quantized_linear(
&self,
_input: &TensorRef,
_packed_weight: &TensorRef,
_scheme: &QuantScheme,
) -> Result<TensorRef> { ... }
}Expand description
Linear / matrix-multiply operations.
Required Methods§
Provided Methods§
Sourcefn quantized_linear(
&self,
_input: &TensorRef,
_packed_weight: &TensorRef,
_scheme: &QuantScheme,
) -> Result<TensorRef>
fn quantized_linear( &self, _input: &TensorRef, _packed_weight: &TensorRef, _scheme: &QuantScheme, ) -> Result<TensorRef>
Quantized linear projection.
packed_weight is backend-specific packed data (e.g. Q4_0 blocks).