| 199 | REGISTER_KERNEL_BUILDER(Name("Same").Device(DEVICE_CPU), TestKernel); |
| 200 | |
| 201 | TEST_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. |
| 217 | REGISTER_OP("AddAttr").Output("ndef: string").Attr("a: int = 42"); |
nothing calls this directly
no test coverage detected