(self, methodName="runTest")
| 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() |
nothing calls this directly
no test coverage detected