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

Function MatMulBCastToStr

tensorflow/core/util/matmul_bcast_test.cc:25–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23namespace {
24
25string MatMulBCastToStr(const MatMulBCast& b) {
26 if (!b.IsValid()) {
27 return "invalid";
28 }
29 string ret;
30 strings::StrAppend(
31 &ret, "[", absl::StrJoin(b.output_batch_shape().dim_sizes(), ","), "]");
32 strings::StrAppend(&ret, "[", absl::StrJoin(b.x_batch_indices(), ","), "]");
33 strings::StrAppend(&ret, "[", absl::StrJoin(b.y_batch_indices(), ","), "]");
34 return ret;
35}
36
37TEST(MatMulBCastTest, SimpleBroadcast) {
38 MatMulBCast bcast({1, 5, 3}, {4, 3, 7});

Callers 1

TESTFunction · 0.85

Calls 3

StrAppendFunction · 0.50
IsValidMethod · 0.45
dim_sizesMethod · 0.45

Tested by

no test coverage detected