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

Method __init__

tensorflow/python/framework/test_util.py:1812–1824  ·  view source on GitHub ↗
(self, methodName="runTest")

Source from the content-addressed store, hash-verified

1810 """Base class for tests that need to test TensorFlow."""
1811
1812 def __init__(self, methodName="runTest"): # pylint: disable=invalid-name
1813 super(TensorFlowTestCase, self).__init__(methodName)
1814 if is_xla_enabled():
1815 pywrap_tensorflow.TF_SetXlaAutoJitMode("2")
1816 pywrap_tensorflow.TF_SetXlaMinClusterSize(1)
1817 pywrap_tensorflow.TF_SetXlaEnableLazyCompilation(False)
1818 # Constant folding secretly runs code on TF:Classic CPU, so we also
1819 # disable it here.
1820 pywrap_tensorflow.TF_SetXlaConstantFoldingDisabled(True)
1821
1822 self._threads = []
1823 self._tempdir = None
1824 self._cached_session = None
1825
1826 def setUp(self):
1827 self._ClearCachedSession()

Callers

nothing calls this directly

Calls 2

is_xla_enabledFunction · 0.90
__init__Method · 0.45

Tested by

no test coverage detected