Skip to content

Commit bf9074d

Browse files
committed
Add slow attr to heavy Laplacian tests
Signed-off-by: Kamil Tokarski <ktokarski@nvidia.com>
1 parent 85a2493 commit bf9074d

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

dali/test/python/test_operator_laplacian.py

+23-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from scipy.ndimage import convolve1d, filters as sp_filters
2222
import os
2323
from nose_utils import assert_raises
24+
from nose.plugins.attrib import attr
2425

2526
from test_utils import get_dali_extra_path, check_batch, RandomlyShapedDataIterator
2627

@@ -194,6 +195,14 @@ def _test_vs_open_cv(device, batch_size, window_size, in_type, out_type, normali
194195

195196

196197
def test_vs_open_cv():
198+
batch_size = 10
199+
for device in ["cpu", "gpu"]:
200+
for window_size in range(1, 13, 2):
201+
yield _test_vs_open_cv, device, batch_size, window_size, types.UINT8, None, False, False
202+
203+
204+
@attr('slow')
205+
def test_vs_open_cv_slow():
197206
batch_size = 10
198207
for device in ["cpu", "gpu"]:
199208
for normalize in [True, False]:
@@ -431,7 +440,19 @@ def check_per_sample_laplacian(device, batch_size, window_dim, smoothing_dim, no
431440
def test_per_sample_laplacian():
432441
batch_size = 10
433442
for device in ["cpu", "gpu"]:
434-
for in_type in [np.uint8, np.int16, np.int32, np.float32]:
443+
for in_type in [np.uint8]:
444+
for out_type in [None, np.float32]:
445+
for shape, layout, axes in shape_layout_axes_cases:
446+
for normalize in [True, False]:
447+
yield check_per_sample_laplacian, device, batch_size, 1, 1, \
448+
normalize, shape, layout, axes, in_type, out_type
449+
450+
451+
@attr('slow')
452+
def test_per_sample_laplacian_slow():
453+
batch_size = 10
454+
for device in ["cpu", "gpu"]:
455+
for in_type in [np.int16, np.int32, np.float32]:
435456
for out_type in [None, np.float32]:
436457
for shape, layout, axes in shape_layout_axes_cases:
437458
for window_dim in [None, 0, 1]:
@@ -490,6 +511,7 @@ def pipeline():
490511
max_allowed_error=max_error, expected_layout=layout)
491512

492513

514+
@attr('slow')
493515
def test_fixed_params_laplacian():
494516
batch_size = 10
495517
window_size_cases = {

0 commit comments

Comments
 (0)