Skip to content

HIP: Replace usage of depricated preprocessor macro __AMDGCN_WAVEFRONT_SIZE__ #14183

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

Merged
merged 1 commit into from
Jun 15, 2025

Conversation

IMbackK
Copy link
Collaborator

@IMbackK IMbackK commented Jun 14, 2025

Unfortunately AMD has decided to deprecate the __AMDGCN_WAVEFRONT_SIZE__ macro and all methods to determine the warp size at compile time.

Officially the method we should use is to query the warp size at runtime only. This is unworkable for us as this would require us to pass the size to all our kernels as a template parameter, which would bloat compile time and binary size for no reason, as all architectures you can build hip for are currently fixed warp size, as RDNA can not be used in CU mode in hip see https://github.com/ROCm/hip/blob/4f263b6e90770c55c694af6beb0924db084b952f/include/hip/hip_runtime.h#L41

This leaves us with only the option to guess the wavefront size based on the generation of the GPU we are compiling for, which is also what has been recommended to me by an AMD engineer ROCm/ROCm#4121 (comment) and is what this pr dose.

@github-actions github-actions bot added Nvidia GPU Issues specific to Nvidia GPUs ggml changes relating to the ggml tensor library for machine learning labels Jun 14, 2025
@IMbackK IMbackK requested a review from JohannesGaessler June 14, 2025 20:31
@IMbackK IMbackK merged commit 2c2caa4 into ggml-org:master Jun 15, 2025
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ggml changes relating to the ggml tensor library for machine learning Nvidia GPU Issues specific to Nvidia GPUs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants