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
cuda : the signs of IQ2 / IQ3 values cost two SWAR sequences per 4 values on HIP #93
The IQ2 and IQ3 mat-vec kernels read about 500 GB/s on an RX 7900 XT (IQ2_S 431 GB/s), against about 740 GB/s for Q4_K, Q6_K and Q8_0. They are bound by the ALU work per value, not by memory.
Per 4 values the kernels build a byte mask from the sign bits with __vcmpne4 and negate with __vsub4. HIP has no byte-wise compare or subtract, so both are SWAR sequences (vendors/hip.h, about 7 and 6 operations). The dot product itself is one instruction.
To check: can the signs be applied with fewer operations on HIP, with the same result.
Activity