!22983 modify adapter format type

Merge pull request !22983 from changzherui/mod_adapter_format
This commit is contained in:
i-robot 2021-09-07 12:09:05 +00:00 committed by Gitee
commit bb14c28985
1 changed files with 6 additions and 1 deletions

View File

@ -306,7 +306,12 @@ std::string GetOpIOFormat(const AnfNodePtr &anf) {
if (iter->second == "format") {
ValuePtr format = prim->GetAttr("format");
MS_EXCEPTION_IF_NULL(format);
return GetValue<std::string>(format);
if (format->isa<Int64Imm>()) {
CheckAndConvertUtils::ConvertAttrValueToString(prim->name(), "format", &format);
return GetValue<std::string>(format);
} else {
return GetValue<std::string>(format);
}
}
return iter->second;
}