Add knowhere.yaml to support knowhere configuration (#7967)

Signed-off-by: yudong.cai <yudong.cai@zilliz.com>
This commit is contained in:
Cai Yudong 2021-09-18 10:37:51 +08:00 committed by GitHub
parent 06e8494c40
commit 83bf9c5efb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 6 deletions

View File

@ -0,0 +1,16 @@
# Copyright (C) 2019-2020 Zilliz. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under the License
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing permissions and limitations under the License.
knowhere:
# Default value: auto
# Valid values: [auto, avx512, avx2, sse]
# This configuration is only used by querynode and indexnode, it selects CPU instruction set for Searching and Index-building.
simdType: auto

View File

@ -28,4 +28,3 @@ queryNode:
segcore:
chunkRows: 32768
simdType: auto # auto, avx512, avx2, sse

View File

@ -85,8 +85,10 @@ func (p *ParamTable) InitAlias(alias string) {
func (p *ParamTable) Init() {
once.Do(func() {
p.BaseTable.Init()
err := p.LoadYaml("advanced/query_node.yaml")
if err != nil {
if err := p.LoadYaml("advanced/query_node.yaml"); err != nil {
panic(err)
}
if err := p.LoadYaml("advanced/knowhere.yaml"); err != nil {
panic(err)
}
@ -116,7 +118,7 @@ func (p *ParamTable) Init() {
p.initStatsChannelName()
p.initSegcoreChunkRows()
p.initSegcoreSimdType()
p.initKnowhereSimdType()
p.initLogCfg()
})
@ -265,8 +267,8 @@ func (p *ParamTable) initSegcoreChunkRows() {
p.ChunkRows = p.ParseInt64("queryNode.segcore.chunkRows")
}
func (p *ParamTable) initSegcoreSimdType() {
simdType, err := p.Load("queryNode.segcore.simdType")
func (p *ParamTable) initKnowhereSimdType() {
simdType, err := p.LoadWithDefault("knowhere.simdType", "auto")
if err != nil {
panic(err)
}