mirror of https://github.com/milvus-io/milvus.git
Remove gpu mode param check (#23074)
Signed-off-by: Yudong Cai <yudong.cai@zilliz.com>pull/23103/head^2
parent
e2096965c7
commit
3febb5e45a
|
@ -87,10 +87,6 @@ const (
|
|||
|
||||
PQM = "PQM"
|
||||
NTREES = "n_trees"
|
||||
|
||||
IndexMode = "index_mode"
|
||||
CPUMode = "CPU"
|
||||
GPUMode = "GPU"
|
||||
)
|
||||
|
||||
// METRICS is a set of all metrics types supported for float vector.
|
||||
|
@ -177,11 +173,8 @@ func (adapter *IVFPQConfAdapter) checkPQParams(params map[string]string) bool {
|
|||
|
||||
// nbits can be set to default: 8
|
||||
nbitsStr, nbitsExist := params[NBITS]
|
||||
var nbits int
|
||||
if !nbitsExist {
|
||||
nbits = 8
|
||||
} else {
|
||||
nbits, err = strconv.Atoi(nbitsStr)
|
||||
if nbitsExist {
|
||||
_, err := strconv.Atoi(nbitsStr)
|
||||
if err != nil { // invalid nbits
|
||||
return false
|
||||
}
|
||||
|
@ -196,15 +189,6 @@ func (adapter *IVFPQConfAdapter) checkPQParams(params map[string]string) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
mode, ok := params[IndexMode]
|
||||
if !ok {
|
||||
mode = CPUMode
|
||||
}
|
||||
|
||||
if mode == GPUMode && !adapter.checkGPUPQParams(dimension, m, nbits) {
|
||||
return false
|
||||
}
|
||||
|
||||
return adapter.checkCPUPQParams(dimension, m)
|
||||
}
|
||||
|
||||
|
|
|
@ -134,7 +134,6 @@ func TestIVFPQConfAdapter_CheckTrain(t *testing.T) {
|
|||
invalidParamsIVF[IVFM] = "NAN"
|
||||
|
||||
invalidParamsM := copyParams(validParams)
|
||||
invalidParamsM[IndexMode] = GPUMode
|
||||
invalidParamsM[DIM] = strconv.Itoa(65536)
|
||||
|
||||
invalidParamsMzero := copyParams(validParams)
|
||||
|
|
Loading…
Reference in New Issue