From 62642593394c64f120cbd40471f8d2844df3005c Mon Sep 17 00:00:00 2001 From: Vivek Trivedi <5340687+trivedivivek@users.noreply.github.com> Date: Mon, 9 Jun 2025 07:34:57 -0700 Subject: [PATCH 1/4] [ET-VK] Adding more test cases for conv 2d dw op. Differential Revision: [D76241304](https://our.internmc.facebook.com/intern/diff/D76241304/) [ghstack-poisoned] --- backends/vulkan/test/op_tests/cases.py | 176 ++++++++++++++++++------- 1 file changed, 131 insertions(+), 45 deletions(-) diff --git a/backends/vulkan/test/op_tests/cases.py b/backends/vulkan/test/op_tests/cases.py index 277daa60451..53e49694a2f 100644 --- a/backends/vulkan/test/op_tests/cases.py +++ b/backends/vulkan/test/op_tests/cases.py @@ -279,17 +279,6 @@ def get_conv_inputs(): output_padding=[0, 1], groups=1, ), - Test( - self=(1, 8, 72, 96), - weight=(8, 1, 3, 3), - bias=(8,), - stride=[1, 1], - padding=[1, 1], - dilation=[1, 1], - transposed=False, - output_padding=[0, 0], - groups=8, - ), Test( self=(1, 6, 40, 50), weight=(8, 6, 3, 3), @@ -345,39 +334,6 @@ def get_conv_inputs(): output_padding=[0], groups=5, ), - Test( - self=(1, 4, 234, 234), - weight=(4, 1, 3, 3), - bias=(4,), - stride=[2, 1], - padding=[1, 1], - dilation=[1, 1], - transposed=False, - output_padding=[0, 0], - groups=4, - ), - Test( - self=(1, 4, 234, 234), - weight=(4, 1, 3, 3), - bias=(4,), - stride=[1, 2], - padding=[1, 1], - dilation=[1, 1], - transposed=False, - output_padding=[0, 0], - groups=4, - ), - Test( - self=(1, 4, 234, 234), - weight=(4, 1, 3, 3), - bias=(4,), - stride=[2, 2], - padding=[1, 1], - dilation=[1, 1], - transposed=False, - output_padding=[0, 0], - groups=4, - ), Test( self=(1, 8, 90, 77), weight=(1, 8, 3, 3), @@ -526,6 +482,130 @@ def get_conv_inputs(): ), ] + test_cases_dw = [ + Test( + self=(1, XS, S, S1), + weight=(XS, 1, 3, 3), + bias=(XS,), + stride=[1, 1], + padding=[1, 1], + dilation=[1, 1], + transposed=False, + output_padding=[0, 0], + groups=XS, + ), + Test( + self=(1, XS, S, S1), + weight=(XS, 1, 5, 5), + bias=(XS,), + stride=[1, 1], + padding=[2, 2], + dilation=[1, 1], + transposed=False, + output_padding=[0, 0], + groups=XS, + ), + Test( + self=(1, XS, S, S1), + weight=(XS, 1, 3, 3), + bias=(XS,), + stride=[2, 1], + padding=[1, 1], + dilation=[1, 1], + transposed=False, + output_padding=[0, 0], + groups=XS, + ), + Test( + self=(1, XS, S, S1), + weight=(XS, 1, 5, 5), + bias=(XS,), + stride=[1, 2], + padding=[2, 2], + dilation=[1, 1], + transposed=False, + output_padding=[0, 0], + groups=XS, + ), + Test( + self=(1, S2, S, S1), + weight=(S2, 1, 3, 3), + bias=(S2,), + stride=[1, 1], + padding=[1, 1], + dilation=[1, 1], + transposed=False, + output_padding=[0, 0], + groups=S2, + ), + Test( + self=(1, S2, S, S1), + weight=(S2, 1, 5, 5), + bias=(S2,), + stride=[1, 1], + padding=[2, 2], + dilation=[1, 1], + transposed=False, + output_padding=[0, 0], + groups=S2, + ), + Test( + self=(1, 8, 72, 96), + weight=(8, 1, 3, 3), + bias=(8,), + stride=[1, 1], + padding=[1, 1], + dilation=[1, 1], + transposed=False, + output_padding=[0, 0], + groups=8, + ), + Test( + self=(1, 8, 72, 96), + weight=(8, 1, 5, 5), + bias=(8,), + stride=[1, 1], + padding=[2, 2], + dilation=[1, 1], + transposed=False, + output_padding=[0, 0], + groups=8, + ), + Test( + self=(1, 4, 234, 234), + weight=(4, 1, 3, 3), + bias=(4,), + stride=[2, 1], + padding=[1, 1], + dilation=[1, 1], + transposed=False, + output_padding=[0, 0], + groups=4, + ), + Test( + self=(1, 4, 234, 234), + weight=(4, 1, 3, 3), + bias=(4,), + stride=[1, 2], + padding=[1, 1], + dilation=[1, 1], + transposed=False, + output_padding=[0, 0], + groups=4, + ), + Test( + self=(1, 4, 234, 234), + weight=(4, 1, 3, 3), + bias=(4,), + stride=[2, 2], + padding=[1, 1], + dilation=[1, 1], + transposed=False, + output_padding=[0, 0], + groups=4, + ), + ] + test_suite = VkTestSuite(test_cases) test_suite.layouts = [ "utils::kChannelsPacked", @@ -536,7 +616,13 @@ def get_conv_inputs(): "utils::kChannelsPacked", ] test_suite_pw.test_name_suffix = "pw" - return [test_suite, test_suite_pw] + + test_suite_dw = VkTestSuite(test_cases_dw) + test_suite_dw.layouts = [ + "utils::kChannelsPacked", + ] + test_suite_dw.test_name_suffix = "dw" + return [test_suite, test_suite_pw, test_suite_dw] @register_test_suite("aten.native_layer_norm.default") From c64efe4ece1dccc68e244058b7e9802342a26937 Mon Sep 17 00:00:00 2001 From: Vivek Trivedi <5340687+trivedivivek@users.noreply.github.com> Date: Mon, 9 Jun 2025 07:42:30 -0700 Subject: [PATCH 2/4] Update on "[ET-VK] Adding more test cases for conv 2d dw op." Differential Revision: [D76241304](https://our.internmc.facebook.com/intern/diff/D76241304/) [ghstack-poisoned] From 7414594527e27e3a9250cf132523cab38f3cc021 Mon Sep 17 00:00:00 2001 From: Vivek Trivedi <5340687+trivedivivek@users.noreply.github.com> Date: Mon, 9 Jun 2025 08:38:36 -0700 Subject: [PATCH 3/4] Update on "[ET-VK] Adding more test cases for conv 2d dw op." Differential Revision: [D76241304](https://our.internmc.facebook.com/intern/diff/D76241304/) [ghstack-poisoned] From d008caa591a2e2b8fd3fcdbe48c9d4f95b179014 Mon Sep 17 00:00:00 2001 From: Vivek Trivedi <5340687+trivedivivek@users.noreply.github.com> Date: Mon, 9 Jun 2025 09:20:42 -0700 Subject: [PATCH 4/4] Update on "[ET-VK] Adding more test cases for conv 2d dw op." Differential Revision: [D76241304](https://our.internmc.facebook.com/intern/diff/D76241304/) [ghstack-poisoned] --- backends/vulkan/test/op_tests/cases.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/vulkan/test/op_tests/cases.py b/backends/vulkan/test/op_tests/cases.py index 53e49694a2f..bd67933dc93 100644 --- a/backends/vulkan/test/op_tests/cases.py +++ b/backends/vulkan/test/op_tests/cases.py @@ -504,7 +504,7 @@ def get_conv_inputs(): transposed=False, output_padding=[0, 0], groups=XS, - ), + ), Test( self=(1, XS, S, S1), weight=(XS, 1, 3, 3),