MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / DataTypeToString

Function DataTypeToString

paddle/fluid/framework/data_type.cc:81–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81std::string DataTypeToString(const proto::VarType::Type type) {
82 auto it = gDataTypeMap().proto_to_str_.find(static_cast<int>(type));
83 if (it != gDataTypeMap().proto_to_str_.end()) {
84 return it->second;
85 }
86 // deal with RAW type
87 if (type == proto::VarType::RAW) {
88 return "RAW(runtime decided type)";
89 }
90 PADDLE_THROW(common::errors::Unimplemented(
91 "Not support proto::VarType::Type(%d) as tensor type.",
92 static_cast<int>(type)));
93}
94
95size_t SizeOfType(proto::VarType::Type type) {
96 auto it = gDataTypeMap().proto_to_size_.find(static_cast<int>(type));

Callers 15

has_feed_operatorsFunction · 0.70
has_fetch_operatorsFunction · 0.70
XPUTransDataTypeFunction · 0.70
TransDataTypeFunction · 0.70
TransComplexToRealFunction · 0.70
VisitIntDataTypeFunction · 0.70
data_type.hFile · 0.70
ToComplexTypeFunction · 0.70
ToRealTypeFunction · 0.70
ShareDimMethod · 0.70
SizeOfTypeFunction · 0.70

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected