Commit 0bdffcb
[ET-VK] Replace Uniform buffers with push constants for binary op (pytorch#7346)
Pull Request resolved: pytorch#7230
This diff replaces uniform buffers with push constants for binary op in the Vulkan backend of Executorch. The changes include updating the GLSL code to use push constants instead of uniform buffers and updating the C++ code to pass the sizes as push constants to the shader.
ghstack-source-id: 258575398
@exported-using-ghexport
Differential Revision: [D66853542](https://our.internmc.facebook.com/intern/diff/D66853542/)
Co-authored-by: Vivek Trivedi <[email protected]>1 parent 6b72663 commit 0bdffcb
File tree
4 files changed
+28
-22
lines changed- backends/vulkan
- runtime/graph/ops
- glsl
- impl
- test
4 files changed
+28
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
53 | | - | |
54 | | - | |
| 56 | + | |
| 57 | + | |
55 | 58 | | |
56 | 59 | | |
57 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | 22 | | |
28 | 23 | | |
29 | 24 | | |
| |||
40 | 35 | | |
41 | 36 | | |
42 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
71 | 74 | | |
72 | 75 | | |
73 | 76 | | |
| |||
83 | 86 | | |
84 | 87 | | |
85 | 88 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
| 89 | + | |
91 | 90 | | |
92 | 91 | | |
93 | 92 | | |
94 | 93 | | |
95 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1601 | 1601 | | |
1602 | 1602 | | |
1603 | 1603 | | |
1604 | | - | |
1605 | | - | |
1606 | | - | |
| 1604 | + | |
1607 | 1605 | | |
1608 | 1606 | | |
1609 | 1607 | | |
| |||
1624 | 1622 | | |
1625 | 1623 | | |
1626 | 1624 | | |
1627 | | - | |
1628 | | - | |
1629 | | - | |
| 1625 | + | |
1630 | 1626 | | |
1631 | 1627 | | |
1632 | 1628 | | |
1633 | 1629 | | |
1634 | 1630 | | |
1635 | 1631 | | |
| 1632 | + | |
1636 | 1633 | | |
1637 | | - | |
| 1634 | + | |
1638 | 1635 | | |
1639 | 1636 | | |
1640 | 1637 | | |
| |||
0 commit comments