diff --git a/internal/core/src/config/ConfigKnowhere.cpp b/internal/core/src/config/ConfigKnowhere.cpp index 6974997c8b..b069edeb2e 100644 --- a/internal/core/src/config/ConfigKnowhere.cpp +++ b/internal/core/src/config/ConfigKnowhere.cpp @@ -77,13 +77,6 @@ KnowhereSetSimdType(const char* value) { } } -void -KnowhereInitGPU(const int32_t gpu_id, const int32_t res_num) { -#ifdef MILVUS_GPU_VERSION - knowhere::KnowhereConfig::InitGPUResource(gpu_id, res_num); -#endif -} - void KnowhereInitThreadPool(const uint32_t num_threads) { knowhere::ThreadPool::InitGlobalThreadPool(num_threads); diff --git a/internal/core/src/config/ConfigKnowhere.h b/internal/core/src/config/ConfigKnowhere.h index c5c906222b..1a45646ea6 100644 --- a/internal/core/src/config/ConfigKnowhere.h +++ b/internal/core/src/config/ConfigKnowhere.h @@ -25,9 +25,6 @@ KnowhereInitImpl(const char*); std::string KnowhereSetSimdType(const char*); -void -KnowhereInitGPU(const int32_t, const int32_t); - void KnowhereInitThreadPool(const uint32_t); diff --git a/internal/core/src/indexbuilder/init_c.cpp b/internal/core/src/indexbuilder/init_c.cpp index 7753005aed..0ed371dc47 100644 --- a/internal/core/src/indexbuilder/init_c.cpp +++ b/internal/core/src/indexbuilder/init_c.cpp @@ -27,8 +27,3 @@ IndexBuilderSetSimdType(const char* value) { ret[real_type.length()] = 0; return ret; } - -void -IndexBuilderInitGPU(const int32_t gpu_id, const int32_t res_num) { - milvus::config::KnowhereInitGPU(gpu_id, res_num); -} diff --git a/internal/core/src/indexbuilder/init_c.h b/internal/core/src/indexbuilder/init_c.h index e66699f803..b22f1ca04f 100644 --- a/internal/core/src/indexbuilder/init_c.h +++ b/internal/core/src/indexbuilder/init_c.h @@ -22,9 +22,6 @@ IndexBuilderInit(const char*); char* IndexBuilderSetSimdType(const char*); -void -IndexBuilderInitGPU(const int32_t, const int32_t); - #ifdef __cplusplus }; #endif diff --git a/internal/core/src/segcore/segcore_init_c.cpp b/internal/core/src/segcore/segcore_init_c.cpp index c3eed68eea..b79c247bb5 100644 --- a/internal/core/src/segcore/segcore_init_c.cpp +++ b/internal/core/src/segcore/segcore_init_c.cpp @@ -58,9 +58,4 @@ SegcoreSetSimdType(const char* value) { return ret; } -extern "C" void -SegcoreInitGPU(const int32_t gpu_id, const int32_t res_num) { - milvus::config::KnowhereInitGPU(gpu_id, res_num); -} - } // namespace milvus::segcore diff --git a/internal/core/src/segcore/segcore_init_c.h b/internal/core/src/segcore/segcore_init_c.h index 79a6a2a5d8..b16daf8a0c 100644 --- a/internal/core/src/segcore/segcore_init_c.h +++ b/internal/core/src/segcore/segcore_init_c.h @@ -31,9 +31,6 @@ SegcoreSetNprobe(const int64_t); char* SegcoreSetSimdType(const char*); -void -SegcoreInitGPU(const int32_t, const int32_t); - void SegcoreSetThreadPoolNum(const uint32_t num_threads); diff --git a/internal/indexnode/indexnode.go b/internal/indexnode/indexnode.go index ce55ca1b4a..8d0b98fa3c 100644 --- a/internal/indexnode/indexnode.go +++ b/internal/indexnode/indexnode.go @@ -156,11 +156,6 @@ func (i *IndexNode) initKnowhere() { cCPUNum := C.int(hardware.GetCPUNum()) C.InitCpuNum(cCPUNum) - // init GPU resource - cGpuId := C.int32_t(0) - cResNum := C.int32_t(1) - C.IndexBuilderInitGPU(cGpuId, cResNum) - initcore.InitLocalStorageConfig(Params) } diff --git a/internal/querynode/query_node.go b/internal/querynode/query_node.go index a0a6ada8a8..16f8bfc831 100644 --- a/internal/querynode/query_node.go +++ b/internal/querynode/query_node.go @@ -288,11 +288,6 @@ func (node *QueryNode) InitSegcore() { cCPUNum := C.int(hardware.GetCPUNum()) C.InitCpuNum(cCPUNum) - // init GPU resource - cGpuId := C.int32_t(0) - cResNum := C.int32_t(1) - C.SegcoreInitGPU(cGpuId, cResNum) - initcore.InitLocalStorageConfig(Params) mmapDirPath := paramtable.Get().QueryNodeCfg.MmapDirPath.GetValue() diff --git a/internal/util/indexparamcheck/conf_adapter_mgr.go b/internal/util/indexparamcheck/conf_adapter_mgr.go index c415d5ba02..04d85d9e02 100644 --- a/internal/util/indexparamcheck/conf_adapter_mgr.go +++ b/internal/util/indexparamcheck/conf_adapter_mgr.go @@ -46,10 +46,6 @@ func (mgr *ConfAdapterMgrImpl) GetAdapter(indexType string) (ConfAdapter, error) } func (mgr *ConfAdapterMgrImpl) registerConfAdapter() { - mgr.adapters[IndexFaissGPUIDMap] = newBaseConfAdapter() - mgr.adapters[IndexFaissGPUIvfFlat] = newIVFConfAdapter() - mgr.adapters[IndexFaissGPUIvfPQ] = newIVFPQConfAdapter() - mgr.adapters[IndexFaissGPUIvfSQ8] = newIVFSQConfAdapter() mgr.adapters[IndexRaftIvfFlat] = newIVFConfAdapter() mgr.adapters[IndexRaftIvfPQ] = newIVFPQConfAdapter() mgr.adapters[IndexFaissIDMap] = newBaseConfAdapter() diff --git a/internal/util/indexparamcheck/index_type.go b/internal/util/indexparamcheck/index_type.go index a4c747541a..94ae19ac2c 100644 --- a/internal/util/indexparamcheck/index_type.go +++ b/internal/util/indexparamcheck/index_type.go @@ -16,10 +16,6 @@ type IndexType = string // IndexType definitions const ( - IndexFaissGPUIDMap IndexType = "GPU_FLAT" // no index is built. - IndexFaissGPUIvfFlat IndexType = "GPU_IVF_FLAT" - IndexFaissGPUIvfPQ IndexType = "GPU_IVF_PQ" - IndexFaissGPUIvfSQ8 IndexType = "GPU_IVF_SQ8" IndexRaftIvfFlat IndexType = "RAFT_IVF_FLAT" IndexRaftIvfPQ IndexType = "RAFT_IVF_PQ" IndexFaissIDMap IndexType = "FLAT" // no index is built. diff --git a/tests/python_client/common/common_type.py b/tests/python_client/common/common_type.py index a35de3bf59..e1b9131f8a 100644 --- a/tests/python_client/common/common_type.py +++ b/tests/python_client/common/common_type.py @@ -183,11 +183,10 @@ get_wrong_format_dict = [ """ Specially defined list """ all_index_types = ["FLAT", "IVF_FLAT", "IVF_SQ8", "IVF_PQ", "HNSW", "ANNOY", "DISKANN", "BIN_FLAT", "BIN_IVF_FLAT", - "GPU_FLAT", "GPU_IVF_FLAT", "GPU_IVF_PQ", "GPU_IVF_SQ8", "RAFT_IVF_FLAT", "RAFT_IVF_PQ"] + "RAFT_IVF_FLAT", "RAFT_IVF_PQ"] default_index_params = [{"nlist": 128}, {"nlist": 128}, {"nlist": 128}, {"nlist": 128, "m": 16, "nbits": 8}, {"M": 48, "efConstruction": 500}, {"n_trees": 50}, {}, {"nlist": 128}, {"nlist": 128}, - {}, {"nlist": 128}, {"nlist": 128, "m": 16, "nbits": 8}, {"nlist": 128}, {"nlist": 128}, {"nlist": 128, "m": 16, "nbits": 8}] Handler_type = ["GRPC", "HTTP"] diff --git a/tests/python_client/testcases/test_search.py b/tests/python_client/testcases/test_search.py index 61b6155fc4..c041b0f720 100644 --- a/tests/python_client/testcases/test_search.py +++ b/tests/python_client/testcases/test_search.py @@ -1798,8 +1798,8 @@ class TestCollectionSearch(TestcaseBase): @pytest.mark.tags(CaseLabel.GPU) @pytest.mark.parametrize("index, params", - zip(ct.all_index_types[9:14], - ct.default_index_params[9:14])) + zip(ct.all_index_types[9:10], + ct.default_index_params[9:10])) def test_search_after_different_index_with_params_gpu(self, dim, index, params, auto_id, _async): """ target: test search after different index @@ -1877,8 +1877,8 @@ class TestCollectionSearch(TestcaseBase): @pytest.mark.tags(CaseLabel.GPU) @pytest.mark.parametrize("index, params", - zip(ct.all_index_types[9:14], - ct.default_index_params[9:14])) + zip(ct.all_index_types[9:10], + ct.default_index_params[9:10])) def test_search_after_different_index_with_min_dim_gpu(self, index, params, auto_id, _async): """ target: test search after different index with min dim @@ -1958,8 +1958,8 @@ class TestCollectionSearch(TestcaseBase): @pytest.mark.tags(CaseLabel.GPU) @pytest.mark.parametrize("index, params", - zip(ct.all_index_types[9:14], - ct.default_index_params[9:14])) + zip(ct.all_index_types[9:10], + ct.default_index_params[9:10])) def test_search_after_index_different_metric_type_gpu(self, dim, index, params, auto_id, _async): """ target: test search with different metric type