MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / PrimitiveTypeFromString

Function PrimitiveTypeFromString

tensorflow/compiler/xla/tools/driver.cc:109–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107std::string ToString(PrimitiveType type) { return primitive_strings()[type]; }
108
109PrimitiveType PrimitiveTypeFromString(const std::string& s) {
110 const auto& vec = primitive_strings();
111 return static_cast<PrimitiveType>(
112 std::distance(vec.begin(), std::find(vec.begin(), vec.end(), s)));
113}
114
115int ByteSize(PrimitiveType type) {
116 std::string s = ToString(type);

Callers 1

ArrayShapeFromStringFunction · 0.85

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected