Skip to content

Commit de44eda

Browse files
committed
Update on "[ET-VK] Fixing conv2d dw incorrect output when stride != dilation issue."
This diff moves current implementation of conv2d dw as a special case when stride equals dilation in the Vulkan backend of Executorch, since that's the only time this kind of caching is possible. If stride does not equal dilation the old implementation is used. Additional test cases are added to ensure computation is correct when stride != dilation. Differential Revision: [D67908916](https://our.internmc.facebook.com/intern/diff/D67908916/) [ghstack-poisoned]
1 parent 01d48a2 commit de44eda

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

backends/vulkan/runtime/graph/ops/glsl/conv2d_dw_output_tile.glsl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,11 @@ void main() {
130130

131131
#else
132132
void main() {
133-
const ivec3 pos = idx_to_ipos_x_wise(gl_GlobalInvocationID.x, out_limits.x, out_limits.y);
133+
const uint div_by_x = gl_GlobalInvocationID.x / out_limits.x;
134+
const ivec3 pos = ivec3(
135+
gl_GlobalInvocationID.x % out_limits.x,
136+
div_by_x % out_limits.y,
137+
div_by_x / out_limits.y);
134138

135139
if (any(greaterThanEqual(pos, out_limits))) {
136140
return;

0 commit comments

Comments
 (0)