mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-03 09:22:30 +08:00
issue: https://github.com/milvus-io/milvus/issues/29230 this pr do these things: 1. add gpu brute force; 2. limit gpu index only support l2 / ip; Signed-off-by: cqy123456 <qianya.cheng@zilliz.com>
24 lines
631 B
Go
24 lines
631 B
Go
package indexparamcheck
|
|
|
|
import "fmt"
|
|
|
|
// raftIVFChecker checks if a RAFT_IVF_Flat index can be built.
|
|
type raftIVFFlatChecker struct {
|
|
ivfBaseChecker
|
|
}
|
|
|
|
// CheckTrain checks if ivf-flat index can be built with the specific index parameters.
|
|
func (c *raftIVFFlatChecker) CheckTrain(params map[string]string) error {
|
|
if err := c.ivfBaseChecker.CheckTrain(params); err != nil {
|
|
return err
|
|
}
|
|
if !CheckStrByValues(params, Metric, RaftMetrics) {
|
|
return fmt.Errorf("metric type not found or not supported, supported: %v", RaftMetrics)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func newRaftIVFFlatChecker() IndexChecker {
|
|
return &raftIVFFlatChecker{}
|
|
}
|