Skip to content

Commit 151fb45

Browse files
authored
[ET-VK][ez] Fix conv2d_pw shared memory buffer not having a constant size
Differential Revision: D68331984 Pull Request resolved: #7729
1 parent 1a6b7a6 commit 151fb45

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ ${layout_declare_ubo(8, "float", "out_min", "float", "out_max")}
3333
layout(local_size_x_id = 0, local_size_y_id = 1, local_size_z_id = 2) in;
3434

3535
// shared memory to hold calculated positions, this would reduce register usage thus improving performance.
36-
shared ivec2 pos_shared[gl_WorkGroupSize.x * gl_WorkGroupSize.y * gl_WorkGroupSize.z * TILE_SIZE * TILE_SIZE];
36+
// 64 is the number of threads in the local wg
37+
$num_shared = 64 * TILE_SIZE * TILE_SIZE
38+
shared ivec2 pos_shared[${num_shared}];
3739

3840
/*
3941
* Computes a 2D pointwise convolution of an NxN output tile. Calculating an

0 commit comments

Comments
 (0)