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

Function TEST

tensorflow/core/ops/remote_fused_graph_ops_test.cc:27–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25namespace tensorflow {
26
27TEST(RemoteFusedGraphOpsTest, RemoteFusedGraphExecute_ShapeFn) {
28 ShapeInferenceTestOp op("RemoteFusedGraphExecute");
29 auto set_n = [&op](int input1_count, int input2_count, int output_count) {
30 std::vector<NodeDefBuilder::NodeOut> src_list;
31 DataTypeVector input_types;
32 for (int i = 0; i < input1_count; ++i) {
33 src_list.emplace_back("a", 0, DT_FLOAT);
34 input_types.emplace_back(DT_FLOAT);
35 }
36 for (int i = 0; i < input2_count; ++i) {
37 src_list.emplace_back("b", 0, DT_INT32);
38 input_types.emplace_back(DT_INT32);
39 }
40 DataTypeVector output_types;
41 for (int i = 0; i < output_count; ++i) {
42 output_types.emplace_back(DT_FLOAT);
43 }
44 NodeDefBuilder builder = NodeDefBuilder("test", "RemoteFusedGraphExecute")
45 .Input(src_list)
46 .Attr("Tinputs", input_types)
47 .Attr("Toutputs", output_types);
48 TF_ASSERT_OK(builder.Finalize(&op.node_def));
49 };
50 set_n(4, 0, 2);
51 INFER_OK(op, "?;?;?;?", "?;?"); // output rank unknown
52
53 set_n(4, 3, 3);
54 INFER_OK(op, "?;?;?;?;?;?;?", "?;?;?"); // output rank unknown
55
56 // TODO(satok): Implement shape inference and do its test here
57}
58
59} // namespace tensorflow

Callers

nothing calls this directly

Calls 5

NodeDefBuilderClass · 0.85
emplace_backMethod · 0.45
AttrMethod · 0.45
InputMethod · 0.45
FinalizeMethod · 0.45

Tested by

no test coverage detected