Commit 38289a2
committed
[ET-VK][benchmarking][ez] Don't perform copies when benchmarking
## Context
The bencmarks generated by the generated operator benchmarks currently have a high amount of copy overhead:
1. Copy from CPU to staging
2. Copy from staging to GPU Buffer/Image
And this is done for both inputs and outputs.
Since benchmarks are not correctness tests, copying data in/out is not really necessary especially if the compute shader does not have behaviour dependent on the contents of the input/output tensor.
Make it so that by default, the benchmark will only execute the op without adding copy overhead. However, test cases can optionally specify that the copy overhead should be included in the benchmark.
Differential Revision: [D71570143](https://our.internmc.facebook.com/intern/diff/D71570143/)
[ghstack-poisoned]1 parent ea43453 commit 38289a2
File tree
3 files changed
+33
-14
lines changed- backends/vulkan/test/op_tests/utils
3 files changed
+33
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
| |||
197 | 199 | | |
198 | 200 | | |
199 | 201 | | |
200 | | - | |
| 202 | + | |
201 | 203 | | |
202 | 204 | | |
203 | 205 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
94 | 100 | | |
95 | 101 | | |
96 | 102 | | |
| 103 | + | |
97 | 104 | | |
98 | 105 | | |
99 | 106 | | |
| |||
275 | 282 | | |
276 | 283 | | |
277 | 284 | | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
278 | 289 | | |
279 | 290 | | |
280 | 291 | | |
| |||
602 | 613 | | |
603 | 614 | | |
604 | 615 | | |
605 | | - | |
| 616 | + | |
| 617 | + | |
606 | 618 | | |
607 | 619 | | |
608 | 620 | | |
| |||
614 | 626 | | |
615 | 627 | | |
616 | 628 | | |
617 | | - | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | | - | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
622 | 637 | | |
623 | | - | |
624 | 638 | | |
625 | 639 | | |
626 | 640 | | |
627 | | - | |
628 | | - | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
629 | 645 | | |
630 | 646 | | |
631 | 647 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
0 commit comments