[ROCm] Fix HIP version check for HIPBLAS V2 API compatibility #14744
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.
Description
This PR updates the HIP version check from:
#if defined(__HIP_PLATFORM_AMD__) && HIP_VERSION >= 70000000
to:
#if defined(__HIP_PLATFORM_AMD__) && HIP_VERSION >= 50600000
🛠 Why
The original condition seems to intend enabling support for HIPBLAS V2 API types (
hipblasComputeType_t
,HIPBLAS_COMPUTE_*
,hipDataType
), which replaced the deprecatedhipblasDatatype_t
andHIPBLAS_R_*
. However, the check forHIP_VERSION >= 70000000
likely overshoots the required version.I believe
HIP_VERSION >= 50600000
is a more appropriate threshold:50600000
is already used throughout the codebase for similar feature gating.This change allowed me to build llama.cpp with ROCm and HIPBLAS V2 support on bleeding-edge ROCm releases from TheRock.
@ggerganov