File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 2323typedef __hip_bfloat162 __nv_bfloat162;
2424typedef __hip_bfloat16 __nv_bfloat16;
2525typedef __hip_bfloat16_raw __nv_bfloat16_raw;
26-
26+ # if defined(HIP_FP8_TYPE_OCP)
2727typedef __hip_fp8_e4m3 __nv_fp8_e4m3;
2828typedef __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
2934#endif
3035
3136#include " core/registration.h"
Original file line number Diff line number Diff line change 2525#include " ../attention/dtype_fp8.cuh"
2626#include " ../quantization/fp8/amd/quant_utils.cuh"
2727
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+
2834#if defined(__HIPCC__) && \
2935 (defined (__gfx90a__) || defined (__gfx942__) || defined (__gfx950__))
3036 #define __HIP__GFX9__
You can’t perform that action at this time.
0 commit comments