forked from mindspore-Ecosystem/mindspore
!46342 [MS][LITE][parallel predict]bug fix
Merge pull request !46342 from yefeng/471-bug_fix_b330
This commit is contained in:
commit
b02dbda393
|
@ -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]};
|
||||
|
|
|
@ -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_;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue