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

Function BM_ConcatInputRange

tensorflow/core/framework/op_kernel_test.cc:1089–1110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1087REGISTER_KERNEL_BUILDER(Name("Select").Device(DEVICE_CPU), DummyKernel);
1088
1089void BM_ConcatInputRange(int iters) {
1090 testing::StopTiming();
1091
1092 // Create a ConcatV2 NodeDef with 4 inputs (plus the axis).
1093 NodeDef node_def;
1094 node_def.set_name("concat-op");
1095 node_def.set_op("ConcatV2");
1096 AttrValue attr_N;
1097 attr_N.set_i(4);
1098 AttrValue attr_T;
1099 attr_T.set_type(DT_FLOAT);
1100 AttrValue attr_Tidx;
1101 attr_Tidx.set_type(DT_INT32);
1102 node_def.mutable_attr()->insert({"N", attr_N});
1103 node_def.mutable_attr()->insert({"T", attr_T});
1104 node_def.mutable_attr()->insert({"Tidx", attr_Tidx});
1105 for (size_t i = 0; i < 5; ++i) {
1106 node_def.add_input(strings::StrCat("a:", i));
1107 }
1108
1109 BM_InputRangeHelper(iters, node_def, "values", 0, 4);
1110}
1111
1112void BM_SelectInputRange(int iters) {
1113 testing::StopTiming();

Callers

nothing calls this directly

Calls 7

StopTimingFunction · 0.85
BM_InputRangeHelperFunction · 0.85
set_opMethod · 0.80
StrCatFunction · 0.50
set_nameMethod · 0.45
insertMethod · 0.45
add_inputMethod · 0.45

Tested by

no test coverage detected