Commit bf613dd5 authored by JinHai-CN's avatar JinHai-CN
Browse files

Merge remote-tracking branch 'upstream/0.5.0' into 0.5.0


Former-commit-id: 7bf3c6f7184901722a71a40c81e4dfd1bfd9d888
parents 030dd7e4 0d8d6c08
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -26,7 +26,10 @@ Please mark all change in change log and use the ticket from JIRA.
- MS-653 - When config check fail, Milvus close without message
- MS-654 - Describe index timeout when building index
- MS-658 - Fix SQ8 Hybrid can't search
- #9 Change default gpu_cache_capacity to 4
- \#9 Change default gpu_cache_capacity to 4
- \#20 - C++ sdk example get grpc error 
- \#23 - Add unittest to improve code coverage
- \#31 - make clang-format failed after run build.sh -l

## Improvement
- MS-552 - Add and change the easylogging library
+4 −5
Original line number Diff line number Diff line
@@ -91,6 +91,10 @@ fi

cd ${BUILD_OUTPUT_DIR}

# remove make cache since build.sh -l use default variables
# force update the variables each time
make rebuild_cache

CMAKE_CMD="cmake \
-DBUILD_UNIT_TEST=${BUILD_UNITTEST} \
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX}
@@ -115,7 +119,6 @@ if [[ ${RUN_CPPLINT} == "ON" ]]; then
    make lint
    if [ $? -ne 0 ]; then
        echo "ERROR! cpplint check failed"
        rm -f CMakeCache.txt
        exit 1
    fi
    echo "cpplint check passed!"
@@ -124,7 +127,6 @@ if [[ ${RUN_CPPLINT} == "ON" ]]; then
    make check-clang-format
    if [ $? -ne 0 ]; then
        echo "ERROR! clang-format check failed"
        rm -f CMakeCache.txt
        exit 1
    fi
    echo "clang-format check passed!"
@@ -133,12 +135,9 @@ if [[ ${RUN_CPPLINT} == "ON" ]]; then
#    make check-clang-tidy
#    if [ $? -ne 0 ]; then
#        echo "ERROR! clang-tidy check failed"
#        rm -f CMakeCache.txt
#        exit 1
#    fi
#    echo "clang-tidy check passed!"

    rm -f CMakeCache.txt
else
    # compile and build
    make -j 4 || exit 1
+2 −0
Original line number Diff line number Diff line
@@ -397,6 +397,7 @@ ExecutionEngineImpl::BuildIndex(const std::string& location, EngineType engine_t
Status
ExecutionEngineImpl::Search(int64_t n, const float* data, int64_t k, int64_t nprobe, float* distances, int64_t* labels,
                            bool hybrid) {
#if 0
    if (index_type_ == EngineType::FAISS_IVFSQ8H) {
        if (!hybrid) {
            const std::string key = location_ + ".quantizer";
@@ -449,6 +450,7 @@ ExecutionEngineImpl::Search(int64_t n, const float* data, int64_t k, int64_t npr
            }
        }
    }
#endif

    if (index_ == nullptr) {
        ENGINE_LOG_ERROR << "ExecutionEngineImpl: index is null, failed to search";
+2 −0
Original line number Diff line number Diff line
@@ -189,6 +189,8 @@ IVFSQHybrid::LoadData(const knowhere::QuantizerPtr& q, const Config& conf) {
        if (quantizer_conf->mode != 2) {
            KNOWHERE_THROW_MSG("mode only support 2 in this func");
        }
    } else {
        KNOWHERE_THROW_MSG("conf error");
    }
    //    if (quantizer_conf->gpu_id != gpu_id_) {
    //        KNOWHERE_THROW_MSG("quantizer and data must on the same gpu card");
+2 −2
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ FaissGpuResourceMgr::InitResource() {

        mutex_cache_.emplace(device_id, std::make_unique<std::mutex>());

        // std::cout << "Device Id: " << device_id << std::endl;
        // std::cout << "Device Id: " << DEVICEID << std::endl;
        auto& device_param = device.second;
        auto& bq = idle_map_[device_id];

@@ -119,7 +119,7 @@ void
FaissGpuResourceMgr::Dump() {
    for (auto& item : idle_map_) {
        auto& bq = item.second;
        std::cout << "device_id: " << item.first << ", resource count:" << bq.Size();
        std::cout << "DEVICEID: " << item.first << ", resource count:" << bq.Size();
    }
}

Loading