Skip to content

Commit 3a35889

Browse files
authored
Minor perf improvements to quantized linear 8 bit shader.
Differential Revision: D66134239 Pull Request resolved: #6944
1 parent ce77995 commit 3a35889

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,10 @@ VEC4_T q_8w_linear(const u16vec3 out_pos, const uint16_t K) {
117117

118118
void main() {
119119
const u16vec3 out_pos = u16vec3(
120-
gl_GlobalInvocationID.x / (out_limits.y * out_limits.z),
121-
(gl_GlobalInvocationID.x / out_limits.z) % out_limits.y,
122-
gl_GlobalInvocationID.x % out_limits.z);
123-
if (any(greaterThanEqual(out_pos, out_limits))) {
120+
gl_GlobalInvocationID.x / out_limits.y,
121+
gl_GlobalInvocationID.x % out_limits.y,
122+
0);
123+
if (out_pos.x >= out_limits.x) {
124124
return;
125125
}
126126

0 commit comments

Comments
 (0)