Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for warp sizes of 64 #935

Open
Haus1 opened this issue Aug 26, 2024 · 1 comment
Open

Support for warp sizes of 64 #935

Haus1 opened this issue Aug 26, 2024 · 1 comment

Comments

@Haus1
Copy link

Haus1 commented Aug 26, 2024

Looking through the code it appears that warp sizes are often hardcoded at 32 with some places supporting both 16 and 32. While the vulkan backend recognizes warp sizes of 64 correctly, and uses about 50% more power for it, performance is only marginally better, if not equal to, the CUDA/ROCM implementation using a warp size of 32.

It seems there is a big opportunity for improvement here, but the fact that F16 is supported with CUDA/HIP and not by vulkan complicates things.

I lack experience with optimizing for GPUs so I figured I would see if anyone has looked into doing this before. How involved would this change be?

@JohannesGaessler
Copy link
Collaborator

It is basically impossible to change WARP_SIZE from 32 for the CUDA code. The code is very tightly coupled to that specific value, not only for performance but also for shared memory allocation and correctness (because the code assumes that all threads in a warp are automatically synchronized). And to my knowledge there isn't a single NVIDIA GPU with a different warp size anyways. So this would at most provide benefit for ROCm/MUSA where a translation of the CUDA code is suboptimal in the first place. Writing dedicated code for other GPU architectures would both be less work and result in better performance than trying to change WARP_SIZE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@Haus1 @JohannesGaessler and others