Skip to content

Commit 6fc8708

Browse files
fix: validate_index for veci8 & rm deprecated feature. (#451)
Signed-off-by: my-vegetable-has-exploded <wy1109468038@gmail.com>
1 parent 9766d43 commit 6fc8708

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ half = { version = "2.4.0", features = [
7575
"num-traits",
7676
"rand_distr",
7777
"serde",
78-
"use-intrinsics",
7978
] }
8079
libc = "0.2.153"
8180
log = "0.4.21"

crates/base/src/index.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,10 @@ pub struct IndexOptions {
127127

128128
impl IndexOptions {
129129
fn validate_index_options(options: &IndexOptions) -> Result<(), ValidationError> {
130-
if options.vector.v != VectorKind::SVecf32 && options.vector.v != VectorKind::BVecf32 {
130+
if options.vector.v != VectorKind::SVecf32
131+
&& options.vector.v != VectorKind::BVecf32
132+
&& options.vector.v != VectorKind::Veci8
133+
{
131134
return Ok(());
132135
}
133136
let is_trivial = match &options.indexing {
@@ -137,7 +140,7 @@ impl IndexOptions {
137140
};
138141
if !is_trivial {
139142
return Err(ValidationError::new(
140-
"Quantization is not supported for svector and bvector.",
143+
"Quantization is not supported for svector, bvector, and vecint8.",
141144
));
142145
}
143146
Ok(())

0 commit comments

Comments
 (0)