Skip to content

Commit e5c0820

Browse files
trivedivivekfacebook-github-bot
authored andcommitted
Removing one shift op from quantized linear shader to improve perf. (#15191)
Summary: This diff removes a redundant mask op from 4 bit quantized linear shader to improve performance. Reviewed By: SS-JIA Differential Revision: D84679388
1 parent acd0636 commit e5c0820

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ void main() {
114114
const uvec4 packed_weight_tex = texelFetch(
115115
t_weight, u16vec2(weight_txcol + ${c}, pos + r), 0);
116116

117-
qmat2[${c}] = (VEC4_T((packed_weight_tex & 0xF0) >> 4) - 8.0);
117+
qmat2[${c}] = (VEC4_T(packed_weight_tex >> 4) - 8.0);
118118
qmat2[${c + 1}] = (VEC4_T(packed_weight_tex & 0x0F) - 8.0);
119119
$else:
120120
$for c in range(TILE_TXCOLS):

0 commit comments

Comments
 (0)