@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / bf68fd76a9
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 14, 05:30 UTC

[Compile] Fix AMD Compile Error (#25518)

Signed-off-by: yewentao256 <zhyanwentao@126.com>

Wentao Ye committed Sep 23, 2025 at 20:42 UTC bf68fd76a91bd00f1693a453368688540bf22305
2 files changed +12 -1
csrc/quantization/activation_kernels.cu
+6 -1
@@ -23,9 +23,14 @@
23 typedef __hip_bfloat162 __nv_bfloat162;
24 typedef __hip_bfloat16 __nv_bfloat16;
25 typedef __hip_bfloat16_raw __nv_bfloat16_raw;
26 -
26 + #if defined(HIP_FP8_TYPE_OCP)
27 typedef __hip_fp8_e4m3 __nv_fp8_e4m3;
28 typedef __hip_fp8x4_e4m3 __nv_fp8x4_e4m3;
29 + #else
30 +// ROCm 6.2 fallback: only *_fnuz types exist
31 +typedef __hip_fp8_e4m3_fnuz __nv_fp8_e4m3;
32 +typedef __hip_fp8x4_e4m3_fnuz __nv_fp8x4_e4m3;
33 + #endif
34 #endif
35
36 #include "core/registration.h"
csrc/rocm/attention.cu
+6
@@ -25,6 +25,12 @@
25 #include "../attention/dtype_fp8.cuh"
26 #include "../quantization/fp8/amd/quant_utils.cuh"
27
28 +// ROCm 6.2 compatibility: map OCP fp8 types to FNUZ variants if OCP is absent
29 +#if !defined(HIP_FP8_TYPE_OCP)
30 +using __hip_fp8_e4m3 = __hip_fp8_e4m3_fnuz;
31 +using __hip_fp8_e5m2 = __hip_fp8_e5m2_fnuz;
32 +#endif
33 +
34 #if defined(__HIPCC__) && \
35 (defined(__gfx90a__) || defined(__gfx942__) || defined(__gfx950__))
36 #define __HIP__GFX9__