Skip to content

Commit 3dd59f2

Browse files
[ET-VK] Adding more pointwise convolution tests. (#11435)
This PR was created by the merge bot to help merge the original PR into the main branch. ghstack PR number: #11358 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/111/base ghstack PR head: https://github.com/pytorch/executorch/tree/gh/trivedivivek/111/head Merge bot PR base: https://github.com/pytorch/executorch/tree/main Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/trivedivivek/111/orig @diff-train-skip-merge Co-authored-by: Vivek Trivedi <5340687+trivedivivek@users.noreply.github.com>
1 parent e163575 commit 3dd59f2

File tree

1 file changed

+146
-24
lines changed

1 file changed

+146
-24
lines changed

backends/vulkan/test/op_tests/cases.py

Lines changed: 146 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def get_conv_inputs():
255255
[9, 0],
256256
1,
257257
)
258-
test_cases = []
258+
259259
test_cases = [
260260
Test(
261261
self=(1, 6, 40, 50),
@@ -290,17 +290,6 @@ def get_conv_inputs():
290290
output_padding=[0, 0],
291291
groups=8,
292292
),
293-
Test(
294-
self=(1, 8, 72, 96),
295-
weight=(8, 8, 1, 1),
296-
bias=(8,),
297-
stride=[1, 1],
298-
padding=[1, 1],
299-
dilation=[1, 1],
300-
transposed=False,
301-
output_padding=[0, 0],
302-
groups=1,
303-
),
304293
Test(
305294
self=(1, 6, 40, 50),
306295
weight=(8, 6, 3, 3),
@@ -356,17 +345,6 @@ def get_conv_inputs():
356345
output_padding=[0],
357346
groups=5,
358347
),
359-
Test(
360-
self=(1, 16, 672, 512),
361-
weight=(64, 16, 1, 1),
362-
bias=(64,),
363-
stride=[1, 1],
364-
padding=[0, 0],
365-
dilation=[1, 1],
366-
transposed=False,
367-
output_padding=[0, 0],
368-
groups=1,
369-
),
370348
Test(
371349
self=(1, 4, 234, 234),
372350
weight=(4, 1, 3, 3),
@@ -413,8 +391,152 @@ def get_conv_inputs():
413391
),
414392
]
415393

394+
test_cases_pw = [
395+
Test(
396+
self=(1, 16, 3, 5),
397+
weight=(4, 16, 1, 1),
398+
bias=(4,),
399+
stride=[1, 1],
400+
padding=[0, 0],
401+
dilation=[1, 1],
402+
transposed=False,
403+
output_padding=[0, 0],
404+
groups=1,
405+
),
406+
Test(
407+
self=(1, 5, 3, 5),
408+
weight=(4, 5, 1, 1),
409+
bias=(4,),
410+
stride=[1, 1],
411+
padding=[0, 0],
412+
dilation=[1, 1],
413+
transposed=False,
414+
output_padding=[0, 0],
415+
groups=1,
416+
),
417+
Test(
418+
self=(1, 5, 3, 5),
419+
weight=(3, 5, 1, 1),
420+
bias=(3,),
421+
stride=[1, 1],
422+
padding=[0, 0],
423+
dilation=[1, 1],
424+
transposed=False,
425+
output_padding=[0, 0],
426+
groups=1,
427+
),
428+
Test(
429+
self=(1, 5, 3, 5),
430+
weight=(3, 5, 1, 1),
431+
bias=(3,),
432+
stride=[1, 1],
433+
padding=[1, 0],
434+
dilation=[1, 1],
435+
transposed=False,
436+
output_padding=[0, 0],
437+
groups=1,
438+
),
439+
Test(
440+
self=(1, 5, 3, 5),
441+
weight=(3, 5, 1, 1),
442+
bias=(3,),
443+
stride=[1, 1],
444+
padding=[0, 1],
445+
dilation=[1, 1],
446+
transposed=False,
447+
output_padding=[0, 0],
448+
groups=1,
449+
),
450+
Test(
451+
self=(1, 5, 3, 5),
452+
weight=(3, 5, 1, 1),
453+
bias=(3,),
454+
stride=[2, 1],
455+
padding=[1, 0],
456+
dilation=[1, 1],
457+
transposed=False,
458+
output_padding=[0, 0],
459+
groups=1,
460+
),
461+
Test(
462+
self=(1, 8, 72, 96),
463+
weight=(8, 8, 1, 1),
464+
bias=(8,),
465+
stride=[1, 1],
466+
padding=[1, 1],
467+
dilation=[1, 1],
468+
transposed=False,
469+
output_padding=[0, 0],
470+
groups=1,
471+
),
472+
Test(
473+
self=(1, 16, 240, 320),
474+
weight=(64, 16, 1, 1),
475+
bias=(64,),
476+
stride=[1, 1],
477+
padding=[0, 0],
478+
dilation=[1, 1],
479+
transposed=False,
480+
output_padding=[0, 0],
481+
groups=1,
482+
),
483+
Test(
484+
self=(1, 16, 240, 320),
485+
weight=(64, 16, 1, 1),
486+
bias=(64,),
487+
stride=[2, 2],
488+
padding=[0, 0],
489+
dilation=[1, 1],
490+
transposed=False,
491+
output_padding=[0, 0],
492+
groups=1,
493+
),
494+
Test(
495+
self=(1, 16, 240, 320),
496+
weight=(64, 16, 1, 1),
497+
bias=(64,),
498+
stride=[4, 4],
499+
padding=[1, 1],
500+
dilation=[1, 1],
501+
transposed=False,
502+
output_padding=[0, 0],
503+
groups=1,
504+
),
505+
Test(
506+
self=(1, 16, 240, 320),
507+
weight=(64, 16, 1, 1),
508+
bias=(64,),
509+
stride=[1, 1],
510+
padding=[4, 4],
511+
dilation=[1, 1],
512+
transposed=False,
513+
output_padding=[0, 0],
514+
groups=1,
515+
),
516+
Test(
517+
self=(1, 16, 672, 512),
518+
weight=(64, 16, 1, 1),
519+
bias=(64,),
520+
stride=[1, 1],
521+
padding=[0, 0],
522+
dilation=[1, 1],
523+
transposed=False,
524+
output_padding=[0, 0],
525+
groups=1,
526+
),
527+
]
528+
416529
test_suite = VkTestSuite(test_cases)
417-
return test_suite
530+
test_suite.layouts = [
531+
"utils::kChannelsPacked",
532+
]
533+
534+
test_suite_pw = VkTestSuite(test_cases_pw)
535+
test_suite_pw.layouts = [
536+
"utils::kChannelsPacked",
537+
]
538+
test_suite_pw.test_name_suffix = "pw"
539+
return [test_suite, test_suite_pw]
418540

419541

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

0 commit comments

Comments
 (0)