Browse Source

fix codex warning in somas

pull/14529/head
laiyongqiang 4 years ago
parent
commit
ee16dbb933
3 changed files with 3 additions and 2 deletions
  1. +1
    -1
      mindspore/ccsrc/backend/optimizer/somas/somas.cc
  2. +0
    -1
      mindspore/ccsrc/backend/optimizer/somas/somas.h
  3. +2
    -0
      mindspore/ccsrc/backend/optimizer/somas/somas_solver_pre.h

+ 1
- 1
mindspore/ccsrc/backend/optimizer/somas/somas.cc View File

@@ -225,7 +225,7 @@ bool Somas::LoadSomasResult(const session::KernelGraph *graph, const string file
} catch (std::exception &e) {
MS_LOG(WARNING) << "Parse json file error: " << filename << ", sleep 500ms and retry again.";
somas_json_fs.close();
usleep(500000);
std::this_thread::sleep_for(std::chrono::milliseconds(500));
std::ifstream retry_tmp(filename);
if (!retry_tmp.is_open()) {
MS_LOG(INFO) << "Open json file: " << filename << " error, please check kernel_meta.";


+ 0
- 1
mindspore/ccsrc/backend/optimizer/somas/somas.h View File

@@ -56,7 +56,6 @@ class Somas {

static bool NodeSort(SomasNodePtr, SomasNodePtr);
std::vector<DynamicBitSet> reuse_matrix_;
std::vector<DynamicBitSet> tensor_relation;
void ConvertToProfilingNode(uint32_t graph_id);

private:


+ 2
- 0
mindspore/ccsrc/backend/optimizer/somas/somas_solver_pre.h View File

@@ -90,6 +90,8 @@ class DynamicBitSet {
Reset(0x0);
}

~DynamicBitSet() = default;

void SetBitTrue(size_t index, bool log = false) {
if (log) {
MS_LOG(INFO) << GetIndex(index) << " " << GetBitMask(index);


Loading…
Cancel
Save