You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 96051d4
Browse filesBrowse the repository at this point in the historyBrowse files
Vulkan: hoist the pointwise conv spatial divides out of the K loop
conv2d_pw_tiled recovers the (x, y) texel coordinate from the flattened
spatial index with a divide and a modulo by W_out. W_out is a runtime
uniform, so neither strength reduces to a shift, and both sat inside the
loop over K: once per (m, k4) on the input loads, and again per output
texel on the store. The coordinates depend only on m, so a conv with
K4 = 4 issued four times as many integer divides as the arithmetic they
fed.
Compute them once per invocation and pass them down. On a Mali-G76,
selfie segmentation fp16 at 256x256 spends 66% of its GPU time in this
shader, and that drops from 8.02 ms to 4.18 ms (1.92x); whole-graph GPU
time goes 12.2 ms to 8.3 ms and end-to-end inference 14.6 ms to 10.7 ms.
Output is bit identical before and after.
(cherry picked from commit 2e6e14e)
0 commit comments