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

Function VecToShapeProto

tensorflow/core/profiler/internal/tfprof_node.cc:278–288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

276}
277
278TensorShapeProto VecToShapeProto(const std::vector<int64>& shape_vec) {
279 TensorShapeProto shape_pb;
280 if (shape_vec.empty()) {
281 shape_pb.set_unknown_rank(true);
282 return shape_pb;
283 }
284 for (const int64 s : shape_vec) {
285 shape_pb.add_dim()->set_size(s);
286 }
287 return shape_pb;
288}
289
290bool IsPlacedOnAccelerator(const string& device) {
291 return device.find("gpu") != device.npos ||

Callers 1

ReInitMethod · 0.85

Calls 2

emptyMethod · 0.45
set_sizeMethod · 0.45

Tested by

no test coverage detected