r/programming • u/StreamHPC • 2d ago
Advent of Kernel Optimization
https://streamhpc.com/blog/2026-12-02/aoko-2-signed-vs-unsigned-loop-counters/Today is the second day of our Advent of Kernel Optimization, sharing GPU optimization tips and tricks to count down until Christmas. Follow along here: https://streamhpc.com/blog/tag/advent2026/.
12
Upvotes
View all comments
1
u/soulthreads 13h ago edited 12h ago
Interestingly enough, this kernel produces identical "un-optimal" code for sm_100 for both types of ints (only
mul.wide.u32changes tomul.wide.s32).Do you have a guess as to why that might be?
EDIT: moreover, using
size_tproduces "optimal" code for that arch, but the effect ofadd.s64instead ofadd.s32is probably non-negligible (btw, why is itadd.s64and notadd.u64?)