Skip to content

Commit a93a2f2

Browse files
committed
Update on "[ET-VK] Adding a common utility function to calculate 3d output position based on unique index."
This diff adds an indexing utils header file used in Vulkan backend of Executorch. The header file includes functions for converting a global index to u16 indices based on input sizes. Differential Revision: [D67821941](https://our.internmc.facebook.com/intern/diff/D67821941/) [ghstack-poisoned]
1 parent 73f82b9 commit a93a2f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ layout(local_size_x_id = 0, local_size_y_id = 1, local_size_z_id = 2) in;
4343
void main() {
4444
// y divided up by batch size is used to determine 3d position
4545
// since work size is calculated by x * ((y + B_Y - 1) / B_Y) * z
46-
const uint out_limits_y_scaled = (out_limits.y + BATCH_SIZE_Y - 1) / BATCH_SIZE_Y;
46+
const int out_limits_y_scaled = (out_limits.y + BATCH_SIZE_Y - 1) / BATCH_SIZE_Y;
4747

4848
u16vec3 pos = idx_to_u16pos_x_wise(gl_GlobalInvocationID.x, out_limits.x, out_limits_y_scaled);
4949

0 commit comments

Comments
 (0)