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

Function TEST_F

tensorflow/core/framework/op_compatibility_test.cc:201–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199REGISTER_KERNEL_BUILDER(Name("Same").Device(DEVICE_CPU), TestKernel);
200
201TEST_F(OpCompatibilityTest, Same) {
202 TF_ASSERT_OK(NodeDefBuilder("same", "Same")
203 .Input(FakeInput())
204 .Input(FakeInput(DT_FLOAT))
205 .Input(FakeInput(3))
206 .Input(FakeInput(3, DT_FLOAT))
207 .Input(FakeInput(2, DT_BOOL))
208 .Finalize(node_def()));
209 ExpectSuccess(*RegisteredOpDef());
210 EXPECT_EQ(
211 "{{node same}} = Same[N=3, T=DT_FLOAT, TList=[DT_BOOL, DT_BOOL]](a, b, "
212 "c, c:1, c:2, d, d:1, d:2, e, e:1)",
213 Result());
214}
215
216// Should be able to add an attr with a default.
217REGISTER_OP("AddAttr").Output("ndef: string").Attr("a: int = 42");

Callers

nothing calls this directly

Calls 9

NodeDefBuilderClass · 0.85
ExpectSuccessFunction · 0.85
OpDefBuilderClass · 0.85
FakeInputFunction · 0.70
ResultClass · 0.50
FinalizeMethod · 0.45
InputMethod · 0.45
OutputMethod · 0.45
AttrMethod · 0.45

Tested by

no test coverage detected