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

Method test_scope

tensorflow/compiler/tests/xla_test.py:235–244  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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
247def Benchmark(tf_bench,

Calls 2

deviceMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected