Skip to content

Commit 23b6712

Browse files
committed
add skip_tf_cpu decorator
Signed-off-by: hwangdeyu <[email protected]>
1 parent 0d72473 commit 23b6712

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/test_backend.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -741,20 +741,23 @@ def func(x):
741741
graph_validator=lambda g: check_op_count(g, "Reshape", 0, disabled=False))
742742

743743
@check_tf_min_version("1.15")
744+
@skip_tf_cpu("only tf_gpu can run conv2d with NCHW format")
744745
def test_conv2d_biasadd_rewriter(self):
745746
x_shape = [2, 3, 32, 16]
746747
x_val = make_xval(x_shape)
747748
def func(x):
748-
middles = tf.keras.layers.ZeroPadding2D(padding=(0, 4),
749+
middles = tf.keras.layers.ZeroPadding2D(
750+
padding=(0, 4),
749751
data_format="channels_first",
750-
name="padding")(x)
752+
name="padding"
753+
)(x)
751754
t = tf.keras.layers.Conv2D(
752755
filters=768,
753756
kernel_size=3,
754757
strides=1,
755758
use_bias=True,
756759
data_format="channels_first",
757-
name="conv2d",
760+
name="conv2d"
758761
)(middles)
759762
return tf.identity(t, name=_TFOUTPUT)
760763
self._run_test_case(func, [_OUTPUT], {_INPUT: x_val}, rtol=1e-04, atol=1e-2, as_session=True,

0 commit comments

Comments
 (0)