Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions lite/model_parser/base/traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,16 @@ inline VarDataType ConvertPrecisionType(lite_api::PrecisionType type) {
return lite::VarDataType::vtype; \
break
switch (type) {
CASE(Float, FP32);
CASE(Bool, BOOL);
CASE(Int8, INT8);
CASE(UInt8, UINT8);
CASE(Int16, INT16);
CASE(Int32, INT32);
CASE(FP16, FP16);
CASE(Bool, BOOL);
CASE(Int64, INT64);
CASE(Int16, INT16);
CASE(FP16, FP16);
CASE(Float, FP32);
default:
LOG(FATAL) << "Illegal flatbuffer VarType.";
LOG(FATAL) << "Illegal flatbuffer VarType." << static_cast<int>(type);
return lite::VarDataType();
}
#undef CASE
Expand All @@ -100,15 +101,16 @@ inline lite_api::PrecisionType ConvertPrecisionType(VarDataType type) {
return lite_api::PrecisionType::k##ptype; \
break
switch (type) {
CASE(Float, FP32);
CASE(Bool, BOOL);
CASE(Int8, INT8);
CASE(UInt8, UINT8);
CASE(Int16, INT16);
CASE(Int32, INT32);
CASE(FP16, FP16);
CASE(Bool, BOOL);
CASE(Int64, INT64);
CASE(Int16, INT16);
CASE(FP16, FP16);
CASE(Float, FP32);
default:
LOG(FATAL) << "Illegal flatbuffer VarType.";
LOG(FATAL) << "Illegal flatbuffer VarType: " << static_cast<int>(type);
return lite_api::PrecisionType();
}
#undef CASE
Expand Down