提交 f4cc504f 编写于 作者: N nhzlx

fix gencode bug: add kInt32 type to PrecisoinPepr

上级 58bf3c48
......@@ -55,6 +55,8 @@ static size_t PrecisionTypeLength(PrecisionType type) {
return 4;
case PrecisionType::kInt8:
return 1;
case PrecisionType::kInt32:
return 4;
default:
return 4;
}
......@@ -99,7 +101,7 @@ static const std::string& TargetRepr(TargetType target) {
static const std::string& PrecisionRepr(PrecisionType precision) {
static const std::string precision2string[] = {"kUnk", "kFloat", "kInt8",
"kAny"};
"kInt32", "kAny"};
auto x = static_cast<int>(precision);
CHECK_LT(x, static_cast<int>(PRECISION(NUM)));
return precision2string[x];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册