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

Function DebugString

tensorflow/core/distributed_runtime/rpcbench_test.cc:157–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157string DebugString(const Tensor& x, const Tensor& y, int tensor_size) {
158 CHECK_EQ(x.NumElements(), tensor_size);
159 CHECK_EQ(y.NumElements(), tensor_size);
160 auto x_flat = x.flat<float>();
161 auto y_flat = y.flat<float>();
162 // Just print the first couple of elements of each tensor
163 CHECK_GE(tensor_size, 2);
164 return strings::Printf("x = [%8.6f %8.6f] y = [%8.6f %8.6f]", x_flat(0),
165 x_flat(1), y_flat(0), y_flat(1));
166}
167
168// TODO: Support sharding and depth.
169static void BM_Helper(int iters, int width, int num_stages, int tensor_size,

Callers 2

BM_HelperFunction · 0.70
CompleteMethod · 0.50

Calls 2

PrintfFunction · 0.85
NumElementsMethod · 0.45

Tested by

no test coverage detected