diff --git a/paddle/fluid/inference/analysis/passes/memory_optimize_pass.cc b/paddle/fluid/inference/analysis/passes/memory_optimize_pass.cc index 6ecaf08f7d3329e63b0f71da46a66c67eb5c53be..9a56346773110348dbce571b4015818b533cff35 100644 --- a/paddle/fluid/inference/analysis/passes/memory_optimize_pass.cc +++ b/paddle/fluid/inference/analysis/passes/memory_optimize_pass.cc @@ -101,6 +101,16 @@ int DataTypeToSpace(framework::proto::VarType_Type type) { return sizeof(int32_t); case framework::proto::VarType_Type_INT64: return sizeof(int64_t); + case framework::proto::VarType_Type_INT16: + return sizeof(int16_t); + case framework::proto::VarType_Type_FP16: + return sizeof(int16_t); + case framework::proto::VarType_Type_FP64: + return sizeof(double); + case framework::proto::VarType_Type_UINT8: + return sizeof(unsigned char); + case framework::proto::VarType_Type_INT8: + return sizeof(int8_t); default: PADDLE_THROW("Unknown data type"); }