Commit 0a858939 authored by 余昆's avatar 余昆
Browse files

Merge remote-tracking branch 'upstream/0.6.0' into 0.6.0-yk

parents caacf40e 2abbcad2
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ Please mark all change in change log and use the ticket from JIRA.
- \#340 - Test cases run failed on 0.6.0
- \#353 - Rename config.h.in to version.h.in
- \#374 - sdk_simple return empty result
- \#397 - sdk_simple return incorrect result

## Feature
- \#12 - Pure CPU version for Milvus
@@ -29,6 +30,7 @@ Please mark all change in change log and use the ticket from JIRA.
- \#310 - Add Q&A for 'protocol https not supported or disable in libcurl' issue
- \#322 - Add option to enable / disable prometheus
- \#358 - Add more information in build.sh and install.md
- \#255 - Add ivfsq8 test report detailed version

## Task

+3 −3
Original line number Diff line number Diff line
@@ -88,14 +88,14 @@ endif ()
include(ThirdPartyPackagesCore)

if (CMAKE_BUILD_TYPE STREQUAL "Release")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -fPIC -DELPP_THREAD_SAFE -fopenmp")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -fPIC -DELPP_THREAD_SAFE -fopenmp -mavx -mf16c -msse4 -mpopcnt")
    if (KNOWHERE_GPU_VERSION)
        set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -O3")
    endif ()
else ()
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -g -fPIC -DELPP_THREAD_SAFE -fopenmp")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -g -fPIC -DELPP_THREAD_SAFE -fopenmp -mavx -mf16c -msse4 -mpopcnt")
    if (KNOWHERE_GPU_VERSION)
        set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -O0 -g")
        set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -O3 -g")
    endif ()
endif ()

+14 −0
Original line number Diff line number Diff line
@@ -18,6 +18,8 @@
#pragma once

#include <memory>
#include <sstream>
#include "Log.h"

namespace knowhere {

@@ -50,6 +52,18 @@ struct Cfg {
    CheckValid() {
        return true;
    }

    void
    Dump() {
        KNOWHERE_LOG_DEBUG << DumpImpl().str();
    }

    virtual std::stringstream
    DumpImpl() {
        std::stringstream ss;
        ss << "dim: " << d << ", metric: " << int(metric_type) << ", gpuid: " << gpu_id << ", k: " << k;
        return ss;
    }
};
using Config = std::shared_ptr<Cfg>;

+22 −0
Original line number Diff line number Diff line
@@ -34,4 +34,26 @@ GetMetricType(METRICTYPE& type) {
    KNOWHERE_THROW_MSG("Metric type is invalid");
}

std::stringstream
IVFCfg::DumpImpl() {
    auto ss = Cfg::DumpImpl();
    ss << ", nlist: " << nlist << ", nprobe: " << nprobe;
    return ss;
}

std::stringstream
IVFSQCfg::DumpImpl() {
    auto ss = IVFCfg::DumpImpl();
    ss << ", nbits: " << nbits;
    return ss;
}

std::stringstream
NSGCfg::DumpImpl() {
    auto ss = IVFCfg::DumpImpl();
    ss << ", knng: " << knng << ", search_length: " << search_length << ", out_degree: " << out_degree
       << ", candidate: " << candidate_pool_size;
    return ss;
}

}  // namespace knowhere
+9 −0
Original line number Diff line number Diff line
@@ -53,6 +53,9 @@ struct IVFCfg : public Cfg {

    IVFCfg() = default;

    std::stringstream
    DumpImpl() override;

    bool
    CheckValid() override {
        return true;
@@ -69,6 +72,9 @@ struct IVFSQCfg : public IVFCfg {
        : IVFCfg(dim, k, gpu_id, nlist, nprobe, type), nbits(nbits) {
    }

    std::stringstream
    DumpImpl() override;

    IVFSQCfg() = default;

    bool
@@ -119,6 +125,9 @@ struct NSGCfg : public IVFCfg {

    NSGCfg() = default;

    std::stringstream
    DumpImpl() override;

    bool
    CheckValid() override {
        return true;
Loading