!47998 fix the operator param empty when dump operator info to file

Merge pull request !47998 from maoyaomin/mym_debugger_kernel_dumper
This commit is contained in:
i-robot 2023-01-19 07:04:14 +00:00 committed by Gitee
commit 34fa36b9f8
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 4 additions and 0 deletions

View File

@ -694,6 +694,10 @@ AscendDeviceAddress::~AscendDeviceAddress() {
*/
bool AscendDeviceAddress::DumpMemToFile(const std::string &filepath, const std::string &host_fmt,
const ShapeVector &host_shape, TypeId host_type, bool trans_flag) const {
if (size_ == 0) {
MS_LOG(INFO) << "the operator in filepath: " << filepath << ", size_ = 0";
return true;
}
bool ret = false;
if (filepath.empty()) {
MS_LOG(ERROR) << "Dump file path is null!";