News for hackers. Stuff that matters.
Re:Switching to Mojo gave a 14% improvement over CUDA by viraptor on Friday June 06, 2025 @09:27PM (#44206655)
Now I'm curious, how many times do you have to fully read the matrix in GPU for the total impact of reading columns to be higher than one-off actual transpose and then sequential row reads? I know it depends on lots of things, I'm after a rough estimate.
Re:Switching to Mojo gave a 14% improvement over CUDA by saagarjha on Saturday June 07, 2025 @05:59AM (#44208611)
It's quite rare. Usually problems are tiled anyway and you can amortize the cost of having data in the "wrong" layout by loading coalesced in whatever is the best layout for your data and then transposing inside your tile, which gives you access to much faster memory.
Re:Switching to Mojo gave a 14% improvement over CUDA by stephencanon on Saturday June 07, 2025 @11:50AM (#44210433)
The one pure transpose case that does come up occasionally is an in-place non-square transpose, where there is a rich literature of very fussy algorithms. If someone managed to make any headway with compiler optimization there, I'd be interested.