Skip to content

Commit b0cabaf

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 b0cabaf

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ layout(local_size_x_id = 0, local_size_y_id = 1, local_size_z_id = 2) in;
3535
* output at a single output location.
3636
*/
3737
void main() {
38-
const ivec3 pos = idx_to_ipos_x_wise(gl_GlobalInvocationID.x, out_limits.x, out_limits.y);
38+
ivec3 pos = idx_to_ipos_x_wise(gl_GlobalInvocationID.x, out_limits.x, out_limits.y);
3939

4040
if (any(greaterThanEqual(pos, out_limits))) {
4141
return;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void main() {
4444
const ivec2 out_limits_scaled = (out_limits.xy + TILE_SIZE - 1) / TILE_SIZE;
4545
const uint shared_mem_stride = gl_WorkGroupSize.x * gl_WorkGroupSize.y * gl_WorkGroupSize.z;
4646

47-
const ivec3 gpos = idx_to_ipos_x_wise(gl_GlobalInvocationID.x, out_limits_scaled.x, out_limits_scaled.y);
47+
ivec3 gpos = idx_to_ipos_x_wise(gl_GlobalInvocationID.x, out_limits_scaled.x, out_limits_scaled.y);
4848

4949
// Output position for TILE_SIZE = 2
5050
// +--------+--------+

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ ivec3 lpos_to_pos(const ivec3 lpos, const ivec4 axis_map) {
224224
}
225225

226226
ivec3 idx_to_ipos_x_wise(uint idx, int size_x, int size_y) {
227-
const uint div_by_x = idx / size_x;
227+
uint div_by_x = 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)