Test scope that runs tests on a Tensorflow/XLA device. Uses a compilation_scope() to mark operators to compile. Yields: A scope to apply to the operators under test.
(self)
| 233 | |
| 234 | @contextlib.contextmanager |
| 235 | def test_scope(self): |
| 236 | """Test scope that runs tests on a Tensorflow/XLA device. |
| 237 | |
| 238 | Uses a compilation_scope() to mark operators to compile. |
| 239 | |
| 240 | Yields: |
| 241 | A scope to apply to the operators under test. |
| 242 | """ |
| 243 | with ops.device('device:{}:0'.format(self.device)): |
| 244 | yield |
| 245 | |
| 246 | |
| 247 | def Benchmark(tf_bench, |
no test coverage detected