forked from mindspore-Ecosystem/mindspore
!22983 modify adapter format type
Merge pull request !22983 from changzherui/mod_adapter_format
This commit is contained in:
commit
bb14c28985
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue