提交 c19a6ee4 编写于 作者: X xiaojun.lin

MS-648 add ut v3


Former-commit-id: f9127c08e1bf0d2244fbed8113a003e52d781df4
上级 157d2211
......@@ -16,6 +16,7 @@
// under the License.
#include <memory>
#include <string>
#include "knowhere/index/vector_index/IndexGPUIVF.h"
#include "knowhere/index/vector_index/IndexGPUIVFPQ.h"
......@@ -116,4 +117,4 @@ class TestGpuIndexBase : public ::testing::Test {
TearDown() override {
knowhere::FaissGpuResourceMgr::GetInstance().Free();
}
};
\ No newline at end of file
};
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you 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
//
// Created by link on 2019/10/17.
// 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.
#include <gtest/gtest.h>
#include "unittest/Helper.h"
......
......@@ -28,7 +28,7 @@ using ::testing::Values;
using ::testing::Combine;
class KnowhereHybrid
: public DataGenBase, public ::testing::Test {
: public DataGenBase, public ::testing::Test {
protected:
void SetUp() override {
knowhere::FaissGpuResourceMgr::GetInstance().InitDevice(DEVICEID, PINMEM, TEMPMEM, RESNUM);
......@@ -38,7 +38,6 @@ class KnowhereHybrid
nq = 100;
k = 100;
GenData(dim, nb, nq, xb, xq, ids, k, gt_ids, gt_dis);
}
void TearDown() override {
......@@ -130,4 +129,5 @@ TEST_F(KnowhereHybrid, test_interface) {
}
}
}
#endif
......@@ -86,5 +86,4 @@ DataGenBase::AssertResult(const std::vector<int64_t>& ids, const std::vector<flo
<< ", match: " << match
<< ", total: " << nq * k
<< std::endl;
}
......@@ -70,13 +70,6 @@ class DataGenBase {
std::vector<float> gt_dis;
};
namespace {
namespace ms = milvus::engine;
namespace kw = knowhere;
} // namespace
class ParamGenerator {
public:
static ParamGenerator& GetInstance() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册