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

Allow to get warp size on GPUs that are not from NVIDIA #4

Open
gabriellaraujocoding opened this issue Apr 10, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@gabriellaraujocoding
Copy link
Member

Currently, GSParLib only allows collecting the warp size from NVIDIA GPUs as presented in this code line: https://github.com/GMAP/GSParLib/blob/main/src/GSPar_OpenCL.cpp#L438

While OpenCL on NVIDIA GPUs requires CL_DEVICE_WARP_SIZE_NV, the equivalent query on AMD GPUs is CL_DEVICE_WAVEFRONT_WIDTH_AMD.

GPUs from different vendors require different queries. Since the warp size can vary from each GPU vendor or GPU model, collecting the warp size is relevant to organizing the GPU thread hierarchy according to the underlying hardware, improving the portability from the GSParLib code. For instance, a best practice is creating thread blocks where the block size is a multiple of the GPU warp size.

This link contains a bit of discussion about warp size on NVIDIA, AMD, and Intel GPUs: https://stackoverflow.com/questions/77563895/are-there-any-warp-size-or-wavefront-width-equivalent-on-intel-gpus

@gabriellaraujocoding gabriellaraujocoding added the enhancement New feature or request label Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant