Skip to content

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

@gabriellaraujocoding

Description

@gabriellaraujocoding

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions