Commit 513ad3b8 authored by 余昆's avatar 余昆
Browse files

Support build index with multiple gpu

parent 49ec7e1a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ Please mark all change in change log and use the ticket from JIRA.
- \#12 - Pure CPU version for Milvus
- \#77 - Support table partition
- \#226 - Experimental shards middleware for Milvus
- \#346 - Support build index with multiple gpu

## Improvement
- \#275 - Rename C++ SDK IndexType
+2 −1
Original line number Diff line number Diff line
@@ -40,4 +40,5 @@ engine_config:
resource_config:
  search_resources:                 # define the device used for search computation
    - cpu
  index_build_device: cpu           # CPU used for building index
  index_build_device:               # CPU used for building index
    - cpu
+2 −1
Original line number Diff line number Diff line
@@ -42,4 +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: gpu0          # CPU / GPU used for building index, must be in format: cpu or gpux
  index_build_device:              # CPU / GPU used for building index, must be in format: cpu or gpux
    - gpu0
+9 −2
Original line number Diff line number Diff line
@@ -570,13 +570,20 @@ ExecutionEngineImpl::GpuCache(uint64_t gpu_id) {
Status
ExecutionEngineImpl::Init() {
    server::Config& config = server::Config::GetInstance();
    Status s = config.GetResourceConfigIndexBuildDevice(gpu_num_);
    std::vector<int64_t> gpu_ids;
    Status s = config.GetResourceConfigIndexBuildDevice(gpu_ids);
    if (!s.ok()) {
        return s;
    }

    for (auto id : gpu_ids) {
        if (gpu_num_ == id) {
            return Status::OK();
        }
    }

    std::string msg = "Invalid gpu_num";
    return Status(SERVER_INVALID_ARGUMENT, msg);
}

}  // namespace engine
}  // namespace milvus
+1 −1
Original line number Diff line number Diff line
@@ -104,7 +104,7 @@ JobMgr::build_task(const JobPtr& job) {

void
JobMgr::calculate_path(const TaskPtr& task) {
    if (task->type_ != TaskType::SearchTask) {
    if (task->type_ != TaskType::SearchTask && task->type_ != TaskType::BuildIndexTask) {
        return;
    }

Loading