Skip to content

Commit fb60a15

Browse files
trivedivivekfacebook-github-bot
authored andcommitted
Fixing linux build. (#7580)
Summary: Fixing build issue in unittest / linux / linux-job 2025-01-09T21:17:15.4021836Z /pytorch/executorch/cmake-out/conv2d_dw_half.glsl:58: error: 'idx_to_ipos_x_wise' : no matching overloaded function found 2025-01-09T21:17:15.4022815Z /pytorch/executorch/cmake-out/conv2d_dw_half.glsl:58: error: 'const' : non-matching or non-convertible constant type for const initializer 2025-01-09T21:17:15.4023491Z 2 errors generated. 2025-01-09T21:17:15.4024083Z /pytorch/executorch/cmake-out/conv2d_dw_output_tile_3x3_half.glsl:70: error: 'idx_to_ipos_x_wise' : no matching overloaded function found 2025-01-09T21:17:15.4025172Z /pytorch/executorch/cmake-out/conv2d_dw_output_tile_3x3_half.glsl:70: error: '=' : cannot convert from ' const float' to ' temp highp 3-component vector of int' 2025-01-09T21:17:15.4025903Z 2 errors generated. 2025-01-09T21:17:15.4026440Z /pytorch/executorch/cmake-out/conv2d_pw_half.glsl:67: error: 'idx_to_ipos_x_wise' : no matching overloaded function found 2025-01-09T21:17:15.4027412Z /pytorch/executorch/cmake-out/conv2d_pw_half.glsl:67: error: 'const' : non-matching or non-convertible constant type for const initializer Reviewed By: jorgep31415 Differential Revision: D67997666
1 parent 478198b commit fb60a15

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backends/vulkan/runtime/graph/ops/glsl/indexing_utils.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ ivec3 lpos_to_pos(const ivec3 lpos, const ivec4 axis_map) {
223223
return pos;
224224
}
225225

226-
ivec3 idx_to_ipos_x_wise(uint idx, int size_x, int size_y) {
227-
const uint div_by_x = idx / size_x;
226+
ivec3 idx_to_ipos_x_wise(const uint idx, int size_x, int size_y) {
227+
const int div_by_x = int(idx) / size_x;
228228
return ivec3(idx % size_x, div_by_x % size_y, div_by_x / size_y);
229229
}
230230

0 commit comments

Comments
 (0)