mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-05-08 19:25:51 +08:00
[Compile] Fix AMD Compile Error (#25518)
Signed-off-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
parent
4ed6b67da3
commit
faa58fa791
@ -23,9 +23,14 @@
|
|||||||
typedef __hip_bfloat162 __nv_bfloat162;
|
typedef __hip_bfloat162 __nv_bfloat162;
|
||||||
typedef __hip_bfloat16 __nv_bfloat16;
|
typedef __hip_bfloat16 __nv_bfloat16;
|
||||||
typedef __hip_bfloat16_raw __nv_bfloat16_raw;
|
typedef __hip_bfloat16_raw __nv_bfloat16_raw;
|
||||||
|
#if defined(HIP_FP8_TYPE_OCP)
|
||||||
typedef __hip_fp8_e4m3 __nv_fp8_e4m3;
|
typedef __hip_fp8_e4m3 __nv_fp8_e4m3;
|
||||||
typedef __hip_fp8x4_e4m3 __nv_fp8x4_e4m3;
|
typedef __hip_fp8x4_e4m3 __nv_fp8x4_e4m3;
|
||||||
|
#else
|
||||||
|
// ROCm 6.2 fallback: only *_fnuz types exist
|
||||||
|
typedef __hip_fp8_e4m3_fnuz __nv_fp8_e4m3;
|
||||||
|
typedef __hip_fp8x4_e4m3_fnuz __nv_fp8x4_e4m3;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "core/registration.h"
|
#include "core/registration.h"
|
||||||
|
|||||||
@ -25,6 +25,12 @@
|
|||||||
#include "../attention/dtype_fp8.cuh"
|
#include "../attention/dtype_fp8.cuh"
|
||||||
#include "../quantization/w8a8/fp8/amd/quant_utils.cuh"
|
#include "../quantization/w8a8/fp8/amd/quant_utils.cuh"
|
||||||
|
|
||||||
|
// ROCm 6.2 compatibility: map OCP fp8 types to FNUZ variants if OCP is absent
|
||||||
|
#if !defined(HIP_FP8_TYPE_OCP)
|
||||||
|
using __hip_fp8_e4m3 = __hip_fp8_e4m3_fnuz;
|
||||||
|
using __hip_fp8_e5m2 = __hip_fp8_e5m2_fnuz;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(__HIPCC__) && \
|
#if defined(__HIPCC__) && \
|
||||||
(defined(__gfx90a__) || defined(__gfx942__) || defined(__gfx950__))
|
(defined(__gfx90a__) || defined(__gfx942__) || defined(__gfx950__))
|
||||||
#define __HIP__GFX9__
|
#define __HIP__GFX9__
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user