From 98f71ba30ebdf849bfd482cb1adb6af8769cb7c5 Mon Sep 17 00:00:00 2001 From: Vivek Trivedi Date: Sat, 18 Oct 2025 07:32:02 -0700 Subject: [PATCH] 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 --- backends/vulkan/runtime/graph/ops/glsl/linear_qcsnw_tiled.glsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/vulkan/runtime/graph/ops/glsl/linear_qcsnw_tiled.glsl b/backends/vulkan/runtime/graph/ops/glsl/linear_qcsnw_tiled.glsl index 6f809d57ff8..bc000580f76 100644 --- a/backends/vulkan/runtime/graph/ops/glsl/linear_qcsnw_tiled.glsl +++ b/backends/vulkan/runtime/graph/ops/glsl/linear_qcsnw_tiled.glsl @@ -114,7 +114,7 @@ void main() { const uvec4 packed_weight_tex = texelFetch( t_weight, u16vec2(weight_txcol + ${c}, pos + r), 0); - qmat2[${c}] = (VEC4_T((packed_weight_tex & 0xF0) >> 4) - 8.0); + qmat2[${c}] = (VEC4_T(packed_weight_tex >> 4) - 8.0); qmat2[${c + 1}] = (VEC4_T(packed_weight_tex & 0x0F) - 8.0); $else: $for c in range(TILE_TXCOLS):