Skip to main content

dot_int8_query

Function dot_int8_query 

Source
pub fn dot_int8_query(
    query: &Int8Query,
    row: Int8Vec<'_>,
) -> Result<f32, QuantError>
Expand description

Estimates a dot product against one affine Int8 row.

If q_hat = query_scale * query_codes and v_hat = row_scale * row_codes + row_offset, expansion gives query_scale * (row_scale * dot(query_codes, row_codes) + row_offset * sum(query_codes)). The native task-03 i8 dot kernel supplies the only dimension-wide operation.

ยงErrors

Returns QuantError::CodeLength when the prepared query and stored row dimensions differ.