(self)
| 823 | self.v, resource_variable_ops.ResourceVariable) |
| 824 | |
| 825 | def testRunMetadata(self): |
| 826 | |
| 827 | @def_function.function |
| 828 | def f(x): |
| 829 | return x * x |
| 830 | |
| 831 | with ops.device('cpu:0'): |
| 832 | context.enable_run_metadata() |
| 833 | f(constant_op.constant(1.0)) |
| 834 | run_metadata = context.export_run_metadata() |
| 835 | context.disable_run_metadata() |
| 836 | self.assertLen(run_metadata.partition_graphs, 1) |
| 837 | |
| 838 | def testGraphModeCaptureVariable(self): |
| 839 | with context.graph_mode(), self.cached_session(): |
nothing calls this directly
no test coverage detected