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

Function ArrayShapeToString

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

Source from the content-addressed store, hash-verified

129};
130
131std::string ArrayShapeToString(ArrayShape shape) {
132 std::ostringstream out;
133 out << ToString(shape.type) << "[";
134 for (int i = 0; i < shape.dimensions.size(); i++) {
135 out << std::to_string(shape.dimensions[i]);
136 if (i != shape.dimensions.size() - 1) {
137 out << ",";
138 }
139 }
140 out << "]";
141 return out.str();
142}
143
144// Input: TYPE[D1,D2,...DN]
145ArrayShape ArrayShapeFromString(const std::string& s) {

Callers 2

TupleShapeToStringFunction · 0.85
FillFunction · 0.85

Calls 3

to_stringFunction · 0.85
ToStringFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected