!46342 [MS][LITE][parallel predict]bug fix

Merge pull request !46342 from yefeng/471-bug_fix_b330
This commit is contained in:
i-robot 2022-12-02 02:36:50 +00:00 committed by Gitee
commit b02dbda393
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 3 additions and 5 deletions

View File

@ -129,9 +129,7 @@ Status ResourceManager::DistinguishPhysicalAndLogical(std::vector<int> *physical
for (size_t i = 0; i < processor_ids.size(); i++) {
physical_core_ids_.push_back(processor_ids[i]);
}
return kSuccess;
}
if (core_ids.size() == physical_ids.size() && physical_ids.size() == processor_ids.size()) {
} else if (core_ids.size() == physical_ids.size() && physical_ids.size() == processor_ids.size()) {
for (size_t i = 0; i < processor_ids.size(); i++) {
if (ids.find(physical_ids[i]) == ids.end()) {
std::vector<int> core_id_list = {core_ids[i]};

View File

@ -43,8 +43,8 @@ class ResourceManager {
int core_num_ = 0;
bool can_use_all_resource_ = true;
std::vector<int> cpu_cores_;
std::vector<int> physical_core_ids_;
std::vector<int> logical_core_ids_;
std::vector<int> physical_core_ids_ = {};
std::vector<int> logical_core_ids_ = {};
std::vector<std::vector<int>> numa_physical_core_ids_;
std::vector<std::vector<int>> numa_logical_core_ids_;
};