Skip to content

Commit b33b7c9

Browse files
committed
Don't test io_parallel for Catapult test and reduce the size of test to speed it up
1 parent 4cc5804 commit b33b7c9

File tree

2 files changed

+24
-9
lines changed

2 files changed

+24
-9
lines changed

test/pytest/test_sepconv1d.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
keras_conv1d = [SeparableConv1D]
1313
padds_options = ['same', 'valid']
1414
chans_options = ['channels_last']
15-
io_type_options = ['io_parallel', 'io_stream']
1615
strides_options = [(1), (2)]
1716
kernel_options = [(2), (3)]
1817
bias_options = [False]
@@ -24,14 +23,22 @@
2423
@pytest.mark.parametrize('strides', strides_options)
2524
@pytest.mark.parametrize('kernels', kernel_options)
2625
@pytest.mark.parametrize('bias', bias_options)
27-
@pytest.mark.parametrize('io_type', io_type_options)
28-
@pytest.mark.parametrize('backend', ['Vivado', 'Vitis', 'Catapult'])
26+
@pytest.mark.parametrize(
27+
'backend, io_type',
28+
[
29+
('Vivado', 'io_parallel'),
30+
('Vitis', 'io_parallel'),
31+
('Vivado', 'io_stream'),
32+
('Vitis', 'io_stream'),
33+
('Catapult', 'io_stream'),
34+
],
35+
)
2936
def test_sepconv1d(conv1d, chans, padds, strides, kernels, bias, io_type, backend):
3037
model = tf.keras.models.Sequential()
31-
input_shape = (28, 3)
38+
input_shape = (16, 3)
3239
model.add(
3340
conv1d(
34-
filters=32,
41+
filters=8,
3542
kernel_size=kernels,
3643
strides=strides,
3744
padding=padds,

test/pytest/test_sepconv2d.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,22 @@
2424
@pytest.mark.parametrize('strides', strides_options)
2525
@pytest.mark.parametrize('kernels', kernel_options)
2626
@pytest.mark.parametrize('bias', bias_options)
27-
@pytest.mark.parametrize('io_type', io_type_options)
28-
@pytest.mark.parametrize('backend', ['Vivado', 'Vitis', 'Catapult'])
27+
@pytest.mark.parametrize(
28+
'backend, io_type',
29+
[
30+
('Vivado', 'io_parallel'),
31+
('Vitis', 'io_parallel'),
32+
('Vivado', 'io_stream'),
33+
('Vitis', 'io_stream'),
34+
('Catapult', 'io_stream'),
35+
],
36+
)
2937
def test_sepconv2d(conv2d, chans, padds, strides, kernels, bias, io_type, backend):
3038
model = tf.keras.models.Sequential()
31-
input_shape = (28, 28, 3)
39+
input_shape = (16, 16, 3)
3240
model.add(
3341
conv2d(
34-
filters=32,
42+
filters=8,
3543
kernel_size=kernels,
3644
strides=strides,
3745
padding=padds,

0 commit comments

Comments
 (0)