fix: fix metric batch (#245)

This commit is contained in:
rayx 2026-03-19 13:39:10 +08:00 committed by GitHub
parent bb167a836c
commit d4ffbf06af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -99,7 +99,7 @@ class QuantizedIntegerMetric : public IndexMetric {
auto turbo_ret = turbo::get_distance_func(
turbo::MetricType::kSquaredEuclidean, turbo::DataType::kInt8,
turbo::QuantizeType::kDefault);
if (turbo_ret) {
if (turbo_ret && m == 1 && n == 1) {
return turbo_ret;
}
return DistanceMatrixCompute<SquaredEuclidean, int8_t>(m, n);