ROCm 7 build fails: #3267 compat probes test for macros that HIP 7 delivers as enum members and functions
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- cmake, cpp
- Área
- backend, build-system
Línea de trabajo
The issue is in two files: src/vt/rocm/rocm_matmul_hipblaslt.hip and include/vt/rocm/hip_shfl_compat.h. Start by checking the HIP_VERSION_MAJOR macro and the existing #ifndef probes. Look at the ROCm 7 headers to confirm HIPBLAS_COMPUTE_32F is an enum and __shfl_sync are functions. The fix involves replacing #ifndef with version checks. Test the build with the ROCm 7 toolchain after making changes.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Environment
- OS: Fedora 44
- ROCm 7.1.52802 (
HIP_VERSION_MAJOR= 7), clang from the ROCm toolchain - Targets:
gfx1102(Radeon RX 7700S 8GB VRAM) andgfx1103(Radeon 780M, UMA) - Host: Ryzen 9 7940HS, Framework 16, 64 GB DDR5 RAM, ~54GB usable for the host
- Tree:
mainafter #3267,cmakeHIP preset, tests excluded
Problem
The ROCm 5.7 compatibility layer from #3267 uses #ifndef probes. Two of
them misfire on ROCm 7, and the build fails for both RDNA3 targets.
-
src/vt/rocm/rocm_matmul_hipblaslt.hipprobes#ifndef HIPBLAS_COMPUTE_32F.
On ROCm 7 that name is an enumerator ofhipblasComputeType_tin
hipblas-common.h, not a macro. The probe reads true, so the pre-ROCm6
block activates and typedefshipblasDatatype_t, a type ROCm 7 removed.
Result: 20 compile errors in that file. -
include/vt/rocm/hip_shfl_compat.hprobes#ifndef __shfl_down_syncand
#ifndef __shfl_sync. On ROCm 6 and later those names exist as functions
inamd_warp_sync_functions.h, invisible to#ifndef. The macro shims
activate anyway and collide with the real declarations.
Root cause
#ifndef answers "does a macro with this name exist". HIP delivers API
changes as enumerators and functions, so the probe tests the wrong property.
Every ROCm release that moves a name from macro to enum or function form
silently re-arms these branches.
Proposed fix
Gate version-dependent shims on HIP_VERSION_MAJOR, and keep #ifndef
probes only for names that stay macros across releases:
// hip_shfl_compat.h: the _sync wrappers exist as functions on ROCm 6+
#if !defined(HIP_VERSION_MAJOR) || HIP_VERSION_MAJOR < 6
...existing shims...
#endif
// rocm_matmul_hipblaslt.hip: enum form landed in ROCm 6,
// hipblasDatatype_t was removed in ROCm 7
#if !defined(HIPBLAS_COMPUTE_32F) && \
(!defined(HIP_VERSION_MAJOR) || HIP_VERSION_MAJOR < 7)
...existing typedef and aliases...
#endif
Other propositions
Maybe... we should also think about shared header for ROCm versioning handling?
Other notes
I already have local version with fix. Tested on Granite 4.2 3b safetensors, fp8 and bf16. Results on iGPU and dGPU:
| Device | bf16 | fp8 |
|---|---|---|
| 7700S | 22.8 t/s, 6.9G | 22.3 t/s, 3.9G |
| 780M | 10.2 t/s | 8.8 t/s |
- Lenguaje dominante
- C++
- Estrellas
- 423
- Forks
- 53
- Merge medio
- 1 d 7 h
- PR fusionados (30 d)
- 382
Preparar el entorno
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de mudler/vllm.cpp
-
[Windows] full build fails in tools/bench/conv1d_scaling_probe.cpp (POSIX-only sys/resource.h)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
Todos los issues de mudler/vllm.cpp
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
hyprwm/aquamarine#426 ·
Los mantenedores suelen responder en 1 día
-
Winget hash mismatch for 5.0.3.0Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
amnezia-vpn/amnezia-client#3222 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
valkey-io/valkey-search#1465 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
KhronosGroup/Vulkan-Tutorial#524 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
microsoft/onnxruntime-genai#2633 ·
Los mantenedores suelen responder en 1 día