Skip to content

Commit 93ea14f

Browse files
[ET-VK] Adding more test cases for conv 2d dw op. (#11494)
This PR was created by the merge bot to help merge the original PR into the main branch. ghstack PR number: #11476 by @trivedivivek ^ Please use this as the source of truth for the PR details, comments, and reviews ghstack PR base: https://github.com/pytorch/executorch/tree/gh/trivedivivek/112/base ghstack PR head: https://github.com/pytorch/executorch/tree/gh/trivedivivek/112/head Merge bot PR base: https://github.com/pytorch/executorch/tree/main Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/trivedivivek/112/orig @diff-train-skip-merge Co-authored-by: Vivek Trivedi <[email protected]>
1 parent bc42d8d commit 93ea14f

File tree

1 file changed

+131
-45
lines changed

1 file changed

+131
-45
lines changed

backends/vulkan/test/op_tests/cases.py

Lines changed: 131 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -279,17 +279,6 @@ def get_conv_inputs():
279279
output_padding=[0, 1],
280280
groups=1,
281281
),
282-
Test(
283-
self=(1, 8, 72, 96),
284-
weight=(8, 1, 3, 3),
285-
bias=(8,),
286-
stride=[1, 1],
287-
padding=[1, 1],
288-
dilation=[1, 1],
289-
transposed=False,
290-
output_padding=[0, 0],
291-
groups=8,
292-
),
293282
Test(
294283
self=(1, 6, 40, 50),
295284
weight=(8, 6, 3, 3),
@@ -345,39 +334,6 @@ def get_conv_inputs():
345334
output_padding=[0],
346335
groups=5,
347336
),
348-
Test(
349-
self=(1, 4, 234, 234),
350-
weight=(4, 1, 3, 3),
351-
bias=(4,),
352-
stride=[2, 1],
353-
padding=[1, 1],
354-
dilation=[1, 1],
355-
transposed=False,
356-
output_padding=[0, 0],
357-
groups=4,
358-
),
359-
Test(
360-
self=(1, 4, 234, 234),
361-
weight=(4, 1, 3, 3),
362-
bias=(4,),
363-
stride=[1, 2],
364-
padding=[1, 1],
365-
dilation=[1, 1],
366-
transposed=False,
367-
output_padding=[0, 0],
368-
groups=4,
369-
),
370-
Test(
371-
self=(1, 4, 234, 234),
372-
weight=(4, 1, 3, 3),
373-
bias=(4,),
374-
stride=[2, 2],
375-
padding=[1, 1],
376-
dilation=[1, 1],
377-
transposed=False,
378-
output_padding=[0, 0],
379-
groups=4,
380-
),
381337
Test(
382338
self=(1, 8, 90, 77),
383339
weight=(1, 8, 3, 3),
@@ -526,6 +482,130 @@ def get_conv_inputs():
526482
),
527483
]
528484

485+
test_cases_dw = [
486+
Test(
487+
self=(1, XS, S, S1),
488+
weight=(XS, 1, 3, 3),
489+
bias=(XS,),
490+
stride=[1, 1],
491+
padding=[1, 1],
492+
dilation=[1, 1],
493+
transposed=False,
494+
output_padding=[0, 0],
495+
groups=XS,
496+
),
497+
Test(
498+
self=(1, XS, S, S1),
499+
weight=(XS, 1, 5, 5),
500+
bias=(XS,),
501+
stride=[1, 1],
502+
padding=[2, 2],
503+
dilation=[1, 1],
504+
transposed=False,
505+
output_padding=[0, 0],
506+
groups=XS,
507+
),
508+
Test(
509+
self=(1, XS, S, S1),
510+
weight=(XS, 1, 3, 3),
511+
bias=(XS,),
512+
stride=[2, 1],
513+
padding=[1, 1],
514+
dilation=[1, 1],
515+
transposed=False,
516+
output_padding=[0, 0],
517+
groups=XS,
518+
),
519+
Test(
520+
self=(1, XS, S, S1),
521+
weight=(XS, 1, 5, 5),
522+
bias=(XS,),
523+
stride=[1, 2],
524+
padding=[2, 2],
525+
dilation=[1, 1],
526+
transposed=False,
527+
output_padding=[0, 0],
528+
groups=XS,
529+
),
530+
Test(
531+
self=(1, S2, S, S1),
532+
weight=(S2, 1, 3, 3),
533+
bias=(S2,),
534+
stride=[1, 1],
535+
padding=[1, 1],
536+
dilation=[1, 1],
537+
transposed=False,
538+
output_padding=[0, 0],
539+
groups=S2,
540+
),
541+
Test(
542+
self=(1, S2, S, S1),
543+
weight=(S2, 1, 5, 5),
544+
bias=(S2,),
545+
stride=[1, 1],
546+
padding=[2, 2],
547+
dilation=[1, 1],
548+
transposed=False,
549+
output_padding=[0, 0],
550+
groups=S2,
551+
),
552+
Test(
553+
self=(1, 8, 72, 96),
554+
weight=(8, 1, 3, 3),
555+
bias=(8,),
556+
stride=[1, 1],
557+
padding=[1, 1],
558+
dilation=[1, 1],
559+
transposed=False,
560+
output_padding=[0, 0],
561+
groups=8,
562+
),
563+
Test(
564+
self=(1, 8, 72, 96),
565+
weight=(8, 1, 5, 5),
566+
bias=(8,),
567+
stride=[1, 1],
568+
padding=[2, 2],
569+
dilation=[1, 1],
570+
transposed=False,
571+
output_padding=[0, 0],
572+
groups=8,
573+
),
574+
Test(
575+
self=(1, 4, 234, 234),
576+
weight=(4, 1, 3, 3),
577+
bias=(4,),
578+
stride=[2, 1],
579+
padding=[1, 1],
580+
dilation=[1, 1],
581+
transposed=False,
582+
output_padding=[0, 0],
583+
groups=4,
584+
),
585+
Test(
586+
self=(1, 4, 234, 234),
587+
weight=(4, 1, 3, 3),
588+
bias=(4,),
589+
stride=[1, 2],
590+
padding=[1, 1],
591+
dilation=[1, 1],
592+
transposed=False,
593+
output_padding=[0, 0],
594+
groups=4,
595+
),
596+
Test(
597+
self=(1, 4, 234, 234),
598+
weight=(4, 1, 3, 3),
599+
bias=(4,),
600+
stride=[2, 2],
601+
padding=[1, 1],
602+
dilation=[1, 1],
603+
transposed=False,
604+
output_padding=[0, 0],
605+
groups=4,
606+
),
607+
]
608+
529609
test_suite = VkTestSuite(test_cases)
530610
test_suite.layouts = [
531611
"utils::kChannelsPacked",
@@ -536,7 +616,13 @@ def get_conv_inputs():
536616
"utils::kChannelsPacked",
537617
]
538618
test_suite_pw.test_name_suffix = "pw"
539-
return [test_suite, test_suite_pw]
619+
620+
test_suite_dw = VkTestSuite(test_cases_dw)
621+
test_suite_dw.layouts = [
622+
"utils::kChannelsPacked",
623+
]
624+
test_suite_dw.test_name_suffix = "dw"
625+
return [test_suite, test_suite_pw, test_suite_dw]
540626

541627

542628
@register_test_suite("aten.native_layer_norm.default")

0 commit comments

Comments
 (0)