Skip to content

Commit 834e80d

Browse files
committed
Update base for Update on "[ET-VK] Add coop shader for int8 linear"
Title says it all! ## Changes * Apply co-operative shader for vector * matrix computations. Differential Revision: [D73279548](https://our.internmc.facebook.com/intern/diff/D73279548/) [ghstack-poisoned]
1 parent 3277f6d commit 834e80d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,18 @@ void main() {
7171
// Preload input tensor
7272
[[unroll]] for (int i = 0; i < TILE_ROWS; i++) {
7373
$if IN_STORAGE == "buffer":
74-
a[i] = t_in[((out_row + i) * in_sizes.x + (pos)) >> 2];
74+
a[i] = t_in[((out_row + i) * in_sizes.x + pos) >> 2];
7575
$else:
7676
a[i] = VEC4_T(texelFetch(t_in, ivec3(pos >> 2, out_row + i, 0), 0));
7777
}
7878

79-
// Compute partial output
79+
// Accumulate output
8080
[[unroll]] for (int i = 0; i < TILE_ROWS; ++i) {
8181
c[i] += a[i].x * b[0] + a[i].y * b[1] + a[i].z * b[2] + a[i].w * b[3];
8282
}
8383
}
8484

85-
// Store output tensor
85+
// Store to output tensor
8686
[[unroll]] for (int i = 0; i < TILE_ROWS; ++i) {
8787
$if OUT_STORAGE == "buffer":
8888
if (out_row + i < out_sizes.y) {

0 commit comments

Comments
 (0)