Skip to content

Commit a31614e

Browse files
authored
[ROCm][Quantization][Kernel] Use FP8 FNUZ when OCP flag is 0 or undefined (#13851)
Signed-off-by: Hollow Man <hollowman@opensuse.org>
1 parent f959039 commit a31614e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

csrc/quantization/fp8/amd/quant_utils.cuh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ __inline__ __device__ Tout scaled_vec_conversion(const Tin& x,
2424
return x;
2525
}
2626

27-
#if HIP_FP8_TYPE_FNUZ
28-
using fp8_type = __hip_fp8_e4m3_fnuz;
29-
using fp8x2_type = __hip_fp8x2_e4m3_fnuz;
30-
#elif HIP_FP8_TYPE_OCP
27+
#if HIP_FP8_TYPE_OCP
3128
using fp8_type = __hip_fp8_e4m3;
3229
using fp8x2_type = __hip_fp8x2_e4m3;
30+
#else
31+
using fp8_type = __hip_fp8_e4m3_fnuz;
32+
using fp8x2_type = __hip_fp8x2_e4m3_fnuz;
3333
#endif
3434

3535
// fp8 -> half

0 commit comments

Comments
 (0)