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
|
||||
import tensorflow.python.ops.nn_grad # pylint: disable=unused-import
|
||||
from tensorflow.python.platform import test
|
||||
from tensorflow.python.framework import test_util
|
||||
|
||||
|
||||
def GetTestConfigs():
|
||||
@ -220,12 +221,13 @@ class Conv3DTest(test.TestCase):
|
||||
expected=expected_output)
|
||||
|
||||
def testConv3D1x1x1Filter2x1x1Dilation(self):
|
||||
self._VerifyDilatedConvValues(
|
||||
tensor_in_sizes=[1, 3, 6, 1, 1],
|
||||
filter_in_sizes=[1, 1, 1, 1, 1],
|
||||
stride=1,
|
||||
padding="VALID",
|
||||
dilations=[2, 1, 1])
|
||||
if test.is_gpu_available(cuda_only=True) or test_util.IsMklEnabled():
|
||||
self._VerifyDilatedConvValues(
|
||||
tensor_in_sizes=[1, 3, 6, 1, 1],
|
||||
filter_in_sizes=[1, 1, 1, 1, 1],
|
||||
stride=1,
|
||||
padding="VALID",
|
||||
dilations=[2, 1, 1])
|
||||
|
||||
# Expected values computed using scipy's correlate function.
|
||||
def testConv3D2x2x2Filter(self):
|
||||
@ -244,12 +246,13 @@ class Conv3DTest(test.TestCase):
|
||||
expected=expected_output)
|
||||
|
||||
def testConv3D2x2x2Filter1x2x1Dilation(self):
|
||||
self._VerifyDilatedConvValues(
|
||||
tensor_in_sizes=[1, 4, 6, 3, 1],
|
||||
filter_in_sizes=[2, 2, 2, 1, 1],
|
||||
stride=1,
|
||||
padding="VALID",
|
||||
dilations=[1, 2, 1])
|
||||
if test.is_gpu_available(cuda_only=True) or test_util.IsMklEnabled():
|
||||
self._VerifyDilatedConvValues(
|
||||
tensor_in_sizes=[1, 4, 6, 3, 1],
|
||||
filter_in_sizes=[2, 2, 2, 1, 1],
|
||||
stride=1,
|
||||
padding="VALID",
|
||||
dilations=[1, 2, 1])
|
||||
|
||||
def testConv3DStrides(self):
|
||||
expected_output = [
|
||||
|
Loading…
Reference in New Issue
Block a user