Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

Fix smoke_inputs in morphology tests to include both tensor and kernel arguments

arc-wonders04412649d56d
diff --git a/tests/morphology/test_bottom_hat.py b/tests/morphology/test_bottom_hat.py
index f639ff900..3e9b96a4b 100644
--- a/tests/morphology/test_bottom_hat.py
+++ b/tests/morphology/test_bottom_hat.py
@@ -25,7 +25,7 @@ from testing.parametrized_tester import parametrized_test
@parametrized_test(
- smoke_inputs=lambda device, dtype: (torch.rand(3, 3, device=device, dtype=dtype),),
+ smoke_inputs=lambda device, dtype: (torch.rand(1, 3, 4, 4, device=device, dtype=dtype), torch.ones((3, 3), device=device, dtype=dtype)),
cardinality_tests=[
{
"inputs": lambda device, dtype: (
diff --git a/tests/morphology/test_closing.py b/tests/morphology/test_closing.py
index 747e50542..d1c6daf8b 100644
--- a/tests/morphology/test_closing.py
+++ b/tests/morphology/test_closing.py
@@ -25,7 +25,7 @@ from testing.parametrized_tester import parametrized_test
@parametrized_test(
- smoke_inputs=lambda device, dtype: (torch.rand(3, 3, device=device, dtype=dtype),),
+ smoke_inputs=lambda device, dtype: (torch.rand(1, 3, 4, 4, device=device, dtype=dtype), torch.ones((3, 3), device=device, dtype=dtype)),
cardinality_tests=[
{
"inputs": lambda device, dtype: (
diff --git a/tests/morphology/test_dilation.py b/tests/morphology/test_dilation.py
index feb07c0c8..5bb01f14a 100644
--- a/tests/morphology/test_dilation.py
+++ b/tests/morphology/test_dilation.py
@@ -25,7 +25,7 @@ from testing.parametrized_tester import parametrized_test
@parametrized_test(
- smoke_inputs=lambda device, dtype: (torch.rand(3, 3, device=device, dtype=dtype),),
+ smoke_inputs=lambda device, dtype: (torch.rand(1, 3, 4, 4, device=device, dtype=dtype), torch.ones((3, 3), device=device, dtype=dtype)),
cardinality_tests=[
{
"inputs": lambda device, dtype: (
diff --git a/tests/morphology/test_erosion.py b/tests/morphology/test_erosion.py
index 63311d763..4c83f29ba 100644
--- a/tests/morphology/test_erosion.py
+++ b/tests/morphology/test_erosion.py
@@ -25,7 +25,7 @@ from testing.parametrized_tester import parametrized_test
@parametrized_test(
- smoke_inputs=lambda device, dtype: (torch.rand(3, 3, device=device, dtype=dtype),),
+ smoke_inputs=lambda device, dtype: (torch.rand(1, 3, 4, 4, device=device, dtype=dtype), torch.ones((3, 3), device=device, dtype=dtype)),
cardinality_tests=[
{
"inputs": lambda device, dtype: (
diff --git a/tests/morphology/test_gradient.py b/tests/morphology/test_gradient.py
index 052c2bcba..aba6604c9 100644
--- a/tests/morphology/test_gradient.py
+++ b/tests/morphology/test_gradient.py
@@ -25,7 +25,7 @@ from testing.parametrized_tester import parametrized_test
@parametrized_test(
- smoke_inputs=lambda device, dtype: (torch.rand(3, 3, device=device, dtype=dtype),),
+ smoke_inputs=lambda device, dtype: (torch.rand(1, 3, 4, 4, device=device, dtype=dtype), torch.ones((3, 3), device=device, dtype=dtype)),
cardinality_tests=[
{
"inputs": lambda device, dtype: (
diff --git a/tests/morphology/test_opening.py b/tests/morphology/test_opening.py
index 369f28319..ceacec5b1 100644
--- a/tests/morphology/test_opening.py
+++ b/tests/morphology/test_opening.py
@@ -25,7 +25,7 @@ from testing.parametrized_tester import parametrized_test
@parametrized_test(
- smoke_inputs=lambda device, dtype: (torch.rand(3, 3, device=device, dtype=dtype),),
+ smoke_inputs=lambda device, dtype: (torch.rand(1, 3, 4, 4, device=device, dtype=dtype), torch.ones((3, 3), device=device, dtype=dtype)),
cardinality_tests=[
{
"inputs": lambda device, dtype: (
diff --git a/tests/morphology/test_top_hat.py b/tests/morphology/test_top_hat.py
index c75cce4c8..c9b4aec67 100644
--- a/tests/morphology/test_top_hat.py
+++ b/tests/morphology/test_top_hat.py
@@ -25,7 +25,7 @@ from testing.parametrized_tester import parametrized_test
@parametrized_test(
- smoke_inputs=lambda device, dtype: (torch.rand(3, 3, device=device, dtype=dtype),),
+ smoke_inputs=lambda device, dtype: (torch.rand(1, 3, 4, 4, device=device, dtype=dtype), torch.ones((3, 3), device=device, dtype=dtype)),
cardinality_tests=[
{
"inputs": lambda device, dtype: (