Loading core/conf/server_cpu_config.template +2 −3 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ metric_config: port: 8080 # port prometheus uses to fetch metrics, must in range [1025, 65534] cache_config: cpu_cache_capacity: 16 # GB, CPU memory used for cache, must be a positive integer cpu_cache_threshold: 0.85 # percentage of data that will be kept when cache cleanup is triggered, must be in range (0.0, 1.0] cache_insert_data: false # whether to load inserted data into cache, must be a boolean Loading @@ -38,7 +37,7 @@ engine_config: gpu_search_threshold: 1000 # threshold beyond which the search computation is executed on GPUs only resource_config: search_resources: # define the device used for search computation search_resources: # define the devices used for search computation, must be in format: cpu or gpux - cpu index_build_device: # CPU used for building index index_build_resources: # define the devices used for index building, must be in format: cpu or gpux - cpu core/conf/server_gpu_config.template +1 −1 Original line number Diff line number Diff line Loading @@ -42,5 +42,5 @@ resource_config: search_resources: # define the devices used for search computation, must be in format: cpu or gpux - cpu - gpu0 index_build_device: # CPU / GPU used for building index, must be in format: cpu or gpux index_build_resources: # define the devices used for index building, must be in format: cpu or gpux - gpu0 core/src/db/engine/ExecutionEngineImpl.cpp +2 −6 Original line number Diff line number Diff line Loading @@ -355,6 +355,7 @@ ExecutionEngineImpl::CopyToGpu(uint64_t device_id, bool hybrid) { Status ExecutionEngineImpl::CopyToIndexFileToGpu(uint64_t device_id) { gpu_num_ = device_id; auto to_index_data = std::make_shared<ToIndexData>(PhysicalSize()); cache::DataObjPtr obj = std::static_pointer_cast<cache::DataObj>(to_index_data); milvus::cache::GpuCacheMgr::GetInstance(device_id)->InsertItem(location_, obj); Loading Loading @@ -577,12 +578,7 @@ ExecutionEngineImpl::GpuCache(uint64_t gpu_id) { // TODO(linxj): remove. Status ExecutionEngineImpl::Init() { server::Config& config = server::Config::GetInstance(); std::vector<int64_t> gpu_ids; Status s = config.GetResourceConfigIndexBuildDevice(gpu_ids); if (!s.ok()) { return s; } auto gpu_ids = scheduler::get_build_resources(); for (auto id : gpu_ids) { if (gpu_num_ == id) { return Status::OK(); Loading core/src/index/knowhere/knowhere/index/vector_index/IndexIVF.h +1 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ class IVF : public VectorIndex, public FaissBaseIndex { void set_index_model(IndexModelPtr model) override; void Add(const DatasetPtr& dataset, const Config& config) override; Loading core/src/scheduler/SchedInst.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -54,8 +54,7 @@ load_simple_config() { // get resources auto gpu_ids = get_gpu_pool(); std::vector<int64_t> build_gpu_ids; config.GetResourceConfigIndexBuildDevice(build_gpu_ids); auto build_gpu_ids = get_build_resources(); // create and connect ResMgrInst::GetInstance()->Add(ResourceFactory::Create("disk", "DISK", 0, true, false)); Loading Loading
core/conf/server_cpu_config.template +2 −3 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ metric_config: port: 8080 # port prometheus uses to fetch metrics, must in range [1025, 65534] cache_config: cpu_cache_capacity: 16 # GB, CPU memory used for cache, must be a positive integer cpu_cache_threshold: 0.85 # percentage of data that will be kept when cache cleanup is triggered, must be in range (0.0, 1.0] cache_insert_data: false # whether to load inserted data into cache, must be a boolean Loading @@ -38,7 +37,7 @@ engine_config: gpu_search_threshold: 1000 # threshold beyond which the search computation is executed on GPUs only resource_config: search_resources: # define the device used for search computation search_resources: # define the devices used for search computation, must be in format: cpu or gpux - cpu index_build_device: # CPU used for building index index_build_resources: # define the devices used for index building, must be in format: cpu or gpux - cpu
core/conf/server_gpu_config.template +1 −1 Original line number Diff line number Diff line Loading @@ -42,5 +42,5 @@ resource_config: search_resources: # define the devices used for search computation, must be in format: cpu or gpux - cpu - gpu0 index_build_device: # CPU / GPU used for building index, must be in format: cpu or gpux index_build_resources: # define the devices used for index building, must be in format: cpu or gpux - gpu0
core/src/db/engine/ExecutionEngineImpl.cpp +2 −6 Original line number Diff line number Diff line Loading @@ -355,6 +355,7 @@ ExecutionEngineImpl::CopyToGpu(uint64_t device_id, bool hybrid) { Status ExecutionEngineImpl::CopyToIndexFileToGpu(uint64_t device_id) { gpu_num_ = device_id; auto to_index_data = std::make_shared<ToIndexData>(PhysicalSize()); cache::DataObjPtr obj = std::static_pointer_cast<cache::DataObj>(to_index_data); milvus::cache::GpuCacheMgr::GetInstance(device_id)->InsertItem(location_, obj); Loading Loading @@ -577,12 +578,7 @@ ExecutionEngineImpl::GpuCache(uint64_t gpu_id) { // TODO(linxj): remove. Status ExecutionEngineImpl::Init() { server::Config& config = server::Config::GetInstance(); std::vector<int64_t> gpu_ids; Status s = config.GetResourceConfigIndexBuildDevice(gpu_ids); if (!s.ok()) { return s; } auto gpu_ids = scheduler::get_build_resources(); for (auto id : gpu_ids) { if (gpu_num_ == id) { return Status::OK(); Loading
core/src/index/knowhere/knowhere/index/vector_index/IndexIVF.h +1 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ class IVF : public VectorIndex, public FaissBaseIndex { void set_index_model(IndexModelPtr model) override; void Add(const DatasetPtr& dataset, const Config& config) override; Loading
core/src/scheduler/SchedInst.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -54,8 +54,7 @@ load_simple_config() { // get resources auto gpu_ids = get_gpu_pool(); std::vector<int64_t> build_gpu_ids; config.GetResourceConfigIndexBuildDevice(build_gpu_ids); auto build_gpu_ids = get_build_resources(); // create and connect ResMgrInst::GetInstance()->Add(ResourceFactory::Create("disk", "DISK", 0, true, false)); Loading