Add 'test_util.IsMklEnabled()' to guard tests to only mkl.
This commit is contained in:
parent
b47c1aafac
commit
b1fca4d98c
@ -32,6 +32,7 @@ from tensorflow.python.ops import gradients_impl
|
|||||||
from tensorflow.python.ops import nn_ops
|
from tensorflow.python.ops import nn_ops
|
||||||
import tensorflow.python.ops.nn_grad # pylint: disable=unused-import
|
import tensorflow.python.ops.nn_grad # pylint: disable=unused-import
|
||||||
from tensorflow.python.platform import test
|
from tensorflow.python.platform import test
|
||||||
|
from tensorflow.python.framework import test_util
|
||||||
|
|
||||||
|
|
||||||
def GetTestConfigs():
|
def GetTestConfigs():
|
||||||
@ -220,12 +221,13 @@ class Conv3DTest(test.TestCase):
|
|||||||
expected=expected_output)
|
expected=expected_output)
|
||||||
|
|
||||||
def testConv3D1x1x1Filter2x1x1Dilation(self):
|
def testConv3D1x1x1Filter2x1x1Dilation(self):
|
||||||
self._VerifyDilatedConvValues(
|
if test.is_gpu_available(cuda_only=True) or test_util.IsMklEnabled():
|
||||||
tensor_in_sizes=[1, 3, 6, 1, 1],
|
self._VerifyDilatedConvValues(
|
||||||
filter_in_sizes=[1, 1, 1, 1, 1],
|
tensor_in_sizes=[1, 3, 6, 1, 1],
|
||||||
stride=1,
|
filter_in_sizes=[1, 1, 1, 1, 1],
|
||||||
padding="VALID",
|
stride=1,
|
||||||
dilations=[2, 1, 1])
|
padding="VALID",
|
||||||
|
dilations=[2, 1, 1])
|
||||||
|
|
||||||
# Expected values computed using scipy's correlate function.
|
# Expected values computed using scipy's correlate function.
|
||||||
def testConv3D2x2x2Filter(self):
|
def testConv3D2x2x2Filter(self):
|
||||||
@ -244,12 +246,13 @@ class Conv3DTest(test.TestCase):
|
|||||||
expected=expected_output)
|
expected=expected_output)
|
||||||
|
|
||||||
def testConv3D2x2x2Filter1x2x1Dilation(self):
|
def testConv3D2x2x2Filter1x2x1Dilation(self):
|
||||||
self._VerifyDilatedConvValues(
|
if test.is_gpu_available(cuda_only=True) or test_util.IsMklEnabled():
|
||||||
tensor_in_sizes=[1, 4, 6, 3, 1],
|
self._VerifyDilatedConvValues(
|
||||||
filter_in_sizes=[2, 2, 2, 1, 1],
|
tensor_in_sizes=[1, 4, 6, 3, 1],
|
||||||
stride=1,
|
filter_in_sizes=[2, 2, 2, 1, 1],
|
||||||
padding="VALID",
|
stride=1,
|
||||||
dilations=[1, 2, 1])
|
padding="VALID",
|
||||||
|
dilations=[1, 2, 1])
|
||||||
|
|
||||||
def testConv3DStrides(self):
|
def testConv3DStrides(self):
|
||||||
expected_output = [
|
expected_output = [
|
||||||
|
Loading…
Reference in New Issue
Block a user