(self)
| 895 | attrs=('T', dtypes.int32.as_datatype_enum, 'unknown_attr', 'blah')) |
| 896 | |
| 897 | def testComposition(self): |
| 898 | |
| 899 | def add(x, y): |
| 900 | return execute( |
| 901 | b'Add', |
| 902 | num_outputs=1, |
| 903 | inputs=[x, y], |
| 904 | attrs=('T', dtypes.int32.as_datatype_enum))[0] |
| 905 | |
| 906 | x = constant_op.constant(1) |
| 907 | three_x = add(add(x, x), x) |
| 908 | self.assertEquals(dtypes.int32, three_x.dtype) |
| 909 | self.assertAllEqual(3, three_x) |
| 910 | |
| 911 | @test_util.run_gpu_only |
| 912 | def testOperationWithNoInputsRunsOnDevice(self): |
nothing calls this directly
no test coverage detected