Loading CHANGELOG.md +1 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ Please mark all change in change log and use the ticket from JIRA. - \#118 - Using shared_ptr instead of weak_ptr to avoid performance loss - \#122 - Add unique id for Job - \#130 - Set task state MOVED after resource copy it completed - \#149 - Improve large query optimizer pass ## Task Loading core/src/db/engine/ExecutionEngineImpl.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -258,7 +258,7 @@ Status ExecutionEngineImpl::CopyToGpu(uint64_t device_id, bool hybrid) { if (hybrid) { const std::string key = location_ + ".quantizer"; std::vector<uint64_t> gpus = scheduler::get_gpu_pool(); std::vector<uint64_t> gpus{device_id}; const int64_t NOT_FOUND = -1; int64_t device_id = NOT_FOUND; Loading core/src/scheduler/optimizer/LargeSQ8HPass.cpp +12 −10 Original line number Diff line number Diff line Loading @@ -55,16 +55,18 @@ LargeSQ8HPass::Run(const TaskPtr& task) { } std::vector<uint64_t> gpus = scheduler::get_gpu_pool(); std::vector<int64_t> all_free_mem; for (auto& gpu : gpus) { auto cache = cache::GpuCacheMgr::GetInstance(gpu); auto free_mem = cache->CacheCapacity() - cache->CacheUsage(); all_free_mem.push_back(free_mem); } auto max_e = std::max_element(all_free_mem.begin(), all_free_mem.end()); auto best_index = std::distance(all_free_mem.begin(), max_e); auto best_device_id = gpus[best_index]; // std::vector<int64_t> all_free_mem; // for (auto& gpu : gpus) { // auto cache = cache::GpuCacheMgr::GetInstance(gpu); // auto free_mem = cache->CacheCapacity() - cache->CacheUsage(); // all_free_mem.push_back(free_mem); // } // // auto max_e = std::max_element(all_free_mem.begin(), all_free_mem.end()); // auto best_index = std::distance(all_free_mem.begin(), max_e); // auto best_device_id = gpus[best_index]; auto best_device_id = count_ % gpus.size(); count_++; ResourcePtr res_ptr = ResMgrInst::GetInstance()->GetResource(ResourceType::GPU, best_device_id); if (not res_ptr) { Loading core/src/scheduler/optimizer/LargeSQ8HPass.h +1 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ class LargeSQ8HPass : public Pass { private: int32_t threshold_ = std::numeric_limits<int32_t>::max(); int64_t count_ = 0; }; using LargeSQ8HPassPtr = std::shared_ptr<LargeSQ8HPass>; Loading Loading
CHANGELOG.md +1 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ Please mark all change in change log and use the ticket from JIRA. - \#118 - Using shared_ptr instead of weak_ptr to avoid performance loss - \#122 - Add unique id for Job - \#130 - Set task state MOVED after resource copy it completed - \#149 - Improve large query optimizer pass ## Task Loading
core/src/db/engine/ExecutionEngineImpl.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -258,7 +258,7 @@ Status ExecutionEngineImpl::CopyToGpu(uint64_t device_id, bool hybrid) { if (hybrid) { const std::string key = location_ + ".quantizer"; std::vector<uint64_t> gpus = scheduler::get_gpu_pool(); std::vector<uint64_t> gpus{device_id}; const int64_t NOT_FOUND = -1; int64_t device_id = NOT_FOUND; Loading
core/src/scheduler/optimizer/LargeSQ8HPass.cpp +12 −10 Original line number Diff line number Diff line Loading @@ -55,16 +55,18 @@ LargeSQ8HPass::Run(const TaskPtr& task) { } std::vector<uint64_t> gpus = scheduler::get_gpu_pool(); std::vector<int64_t> all_free_mem; for (auto& gpu : gpus) { auto cache = cache::GpuCacheMgr::GetInstance(gpu); auto free_mem = cache->CacheCapacity() - cache->CacheUsage(); all_free_mem.push_back(free_mem); } auto max_e = std::max_element(all_free_mem.begin(), all_free_mem.end()); auto best_index = std::distance(all_free_mem.begin(), max_e); auto best_device_id = gpus[best_index]; // std::vector<int64_t> all_free_mem; // for (auto& gpu : gpus) { // auto cache = cache::GpuCacheMgr::GetInstance(gpu); // auto free_mem = cache->CacheCapacity() - cache->CacheUsage(); // all_free_mem.push_back(free_mem); // } // // auto max_e = std::max_element(all_free_mem.begin(), all_free_mem.end()); // auto best_index = std::distance(all_free_mem.begin(), max_e); // auto best_device_id = gpus[best_index]; auto best_device_id = count_ % gpus.size(); count_++; ResourcePtr res_ptr = ResMgrInst::GetInstance()->GetResource(ResourceType::GPU, best_device_id); if (not res_ptr) { Loading
core/src/scheduler/optimizer/LargeSQ8HPass.h +1 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ class LargeSQ8HPass : public Pass { private: int32_t threshold_ = std::numeric_limits<int32_t>::max(); int64_t count_ = 0; }; using LargeSQ8HPassPtr = std::shared_ptr<LargeSQ8HPass>; Loading