|
|
|
@@ -1401,7 +1401,7 @@ std::string Somas::GetSplitName(const std::string &scope_name) const { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
std::string Somas::SomasInfo(bool calc_hash) { |
|
|
|
std::string Somas::SomasInfo(bool calc_hash) const { |
|
|
|
std::ostringstream oss; |
|
|
|
if (!calc_hash) { |
|
|
|
DumpParameters(oss); |
|
|
|
@@ -1516,7 +1516,7 @@ void Somas::DumpParameters(std::ostringstream &oss) const { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void Somas::DumpSomasInfoIR(const string filename) { |
|
|
|
void Somas::DumpSomasInfoIR(const string filename) const { |
|
|
|
if (filename.size() > PATH_MAX) { |
|
|
|
MS_LOG(ERROR) << "File path " << filename << " is too long."; |
|
|
|
return; |
|
|
|
@@ -1539,7 +1539,7 @@ void Somas::DumpSomasInfoIR(const string filename) { |
|
|
|
ofs.close(); |
|
|
|
} |
|
|
|
|
|
|
|
std::string Somas::Offline() { |
|
|
|
std::string Somas::Offline() const { |
|
|
|
std::ostringstream oss; |
|
|
|
|
|
|
|
for (auto tensor : tensors_list_) { |
|
|
|
@@ -1583,7 +1583,7 @@ std::string Somas::Offline() { |
|
|
|
return oss.str(); |
|
|
|
} |
|
|
|
|
|
|
|
void Somas::DumpOfflineIR(const string filename) { |
|
|
|
void Somas::DumpOfflineIR(const string filename) const { |
|
|
|
MS_LOG(INFO) << "Printing somas-log-from-graph log: " << filename; |
|
|
|
if (filename.size() > PATH_MAX) { |
|
|
|
MS_LOG(ERROR) << "File path " << filename << " is too long."; |
|
|
|
@@ -1608,7 +1608,7 @@ void Somas::DumpOfflineIR(const string filename) { |
|
|
|
ofs.close(); |
|
|
|
} |
|
|
|
|
|
|
|
std::string Somas::SomasMemory() { |
|
|
|
std::string Somas::SomasMemory() const { |
|
|
|
std::ostringstream oss; |
|
|
|
|
|
|
|
std::map<size_t, size_t> mem_map; |
|
|
|
@@ -1675,7 +1675,7 @@ std::string Somas::SomasMemory() { |
|
|
|
return oss.str(); |
|
|
|
} |
|
|
|
|
|
|
|
void Somas::DumpSomasMemoryIR(const string filename) { |
|
|
|
void Somas::DumpSomasMemoryIR(const string filename) const { |
|
|
|
if (filename.size() > PATH_MAX) { |
|
|
|
MS_LOG(ERROR) << "File path " << filename << " is too long."; |
|
|
|
return; |
|
|
|
|