Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ROCm] Skipping subtests that check support for Pooling Ops with 3D tensors #30502

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions tensorflow/python/eager/backprop_test.py
Expand Up @@ -1334,6 +1334,8 @@ def grad(dy):
@test_util.run_in_graph_and_eager_modes
def testMaxPooling3DGradient(self):

if test.is_built_with_rocm():
self.skipTest("Pooling with 3D tensors is not supported in ROCm")
def forward(a):
r = max_pooling3d(a, pool_size=pool_size, strides=strides, padding='SAME')
return r
Expand Down
2 changes: 2 additions & 0 deletions tensorflow/python/keras/backend_test.py
Expand Up @@ -789,6 +789,8 @@ def test_pool2d(self):
y = keras.backend.pool2d(x, (2, 2), strides=(2, 2), pool_mode='other')

def test_pool3d(self):
if test.is_built_with_rocm():
self.skipTest("Pooling with 3D tensors is not supported in ROCm")
val = np.random.random((10, 3, 10, 10, 10))
x = keras.backend.variable(val)
y = keras.backend.pool3d(x, (2, 2, 2), strides=(1, 1, 1),
Expand Down
4 changes: 4 additions & 0 deletions tensorflow/python/keras/layers/pooling_test.py
Expand Up @@ -144,6 +144,8 @@ class Pooling3DTest(test.TestCase):

@tf_test_util.run_in_graph_and_eager_modes
def test_maxpooling_3d(self):
if test.is_built_with_rocm():
self.skipTest("Pooling with 3D tensors is not supported in ROCm")
pool_size = (3, 3, 3)
testing_utils.layer_test(
keras.layers.MaxPooling3D,
Expand All @@ -163,6 +165,8 @@ def test_maxpooling_3d(self):

@tf_test_util.run_in_graph_and_eager_modes
def test_averagepooling_3d(self):
if test.is_built_with_rocm():
self.skipTest("Pooling with 3D tensors is not supported in ROCm")
pool_size = (3, 3, 3)
testing_utils.layer_test(
keras.layers.AveragePooling3D,
Expand Down
7 changes: 7 additions & 0 deletions tensorflow/python/kernel_tests/pool_test.py
Expand Up @@ -219,6 +219,8 @@ def testPool2D(self):
strides=strides)

def testPool3D(self):
if test.is_built_with_rocm():
self.skipTest("Pooling with 3D tensors is not supported in ROCm")
with self.session(use_gpu=test.is_gpu_available()):
for padding in ["SAME", "VALID"]:
for pooling_type in ["MAX", "AVG"]:
Expand Down Expand Up @@ -274,6 +276,9 @@ def testPoolNC(self):
strides=[1, 2],
dilation_rate=[1, 1],
data_format="NCHW")
if test.is_built_with_rocm():
# Pooling with 3D tensors is not supported in ROCm
continue
self._test(
input_shape=[2, 2, 7, 5, 3],
window_shape=[2, 2, 2],
Expand Down Expand Up @@ -358,6 +363,8 @@ def testGradient2D(self):

@test_util.run_deprecated_v1
def testGradient3D(self):
if test.is_built_with_rocm():
self.skipTest("Pooling with 3D tensors is not supported in ROCm")
with self.session(use_gpu=test.is_gpu_available()):
for padding in ["SAME", "VALID"]:
for pooling_type in ["AVG", "MAX"]:
Expand Down
8 changes: 8 additions & 0 deletions tensorflow/python/ops/nn_test.py
Expand Up @@ -1291,6 +1291,8 @@ def test2DNumpy(self):
self.assertAllEqual(self.evaluate(y1), self.evaluate(y2))

def test3DTensor(self):
if test_lib.is_built_with_rocm():
self.skipTest("Pooling with 3D tensors is not supported in ROCm")
x = array_ops.ones([3, 7, 6, 6, 5])
ksize = 2
strides = 2
Expand All @@ -1301,6 +1303,8 @@ def test3DTensor(self):
self.assertAllEqual(self.evaluate(y1), self.evaluate(y2))

def test3DNumpy(self):
if test_lib.is_built_with_rocm():
self.skipTest("Pooling with 3D tensors is not supported in ROCm")
x = np.ones([3, 7, 6, 6, 5], dtype=np.float32)
ksize = 2
strides = 2
Expand Down Expand Up @@ -1355,6 +1359,8 @@ def test2DNumpy(self):
self.assertAllEqual(self.evaluate(y1), self.evaluate(y2))

def test3DTensor(self):
if test_lib.is_built_with_rocm():
self.skipTest("Pooling with 3D tensors is not supported in ROCm")
x = array_ops.ones([3, 7, 6, 6, 5])
ksize = 2
strides = 2
Expand All @@ -1365,6 +1371,8 @@ def test3DTensor(self):
self.assertAllEqual(self.evaluate(y1), self.evaluate(y2))

def test3DNumpy(self):
if test_lib.is_built_with_rocm():
self.skipTest("Pooling with 3D tensors is not supported in ROCm")
x = np.ones([3, 7, 6, 6, 5], dtype=np.float32)
ksize = 2
strides = 2
Expand Down
2 changes: 2 additions & 0 deletions tensorflow/python/ops/parallel_for/control_flow_ops_test.py
Expand Up @@ -354,6 +354,8 @@ def loop_fn(i):
self._test_loop_fn(loop_fn, 3, loop_fn_dtypes=[dtypes.float32] * 3)

def test_max_pool3d(self):
if test.is_built_with_rocm():
self.skipTest("Pooling with 3D tensors is not supported in ROCm")
with backprop.GradientTape(persistent=True) as g:
x = random_ops.random_uniform([3, 3, 2, 12, 12, 3])
g.watch(x)
Expand Down