HIP: Replace usage of depricated preprocessor macro __AMDGCN_WAVEFRONT_SIZE__ #14183
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.