@@ -37,7 +37,9 @@ class HIPOptions:
37
37
debug : bool = False
38
38
sanitize_overflow : bool = True
39
39
arch : str = None
40
- supported_fp8_dtypes : Tuple [str ] = ("fp8e5" , )
40
+ # We have native support for OCP fp8 variants since CNDA4/RDNA4. For earlier generations,
41
+ # we software emulate the support for them.
42
+ supported_fp8_dtypes : Tuple [str ] = ("fp8e4nv" , "fp8e5" )
41
43
deprecated_fp8_dot_operand_dtypes : Tuple [str ] = ()
42
44
default_dot_input_precision : str = "ieee"
43
45
allowed_dot_input_precisions : Tuple [str ] = ("ieee" , )
@@ -113,11 +115,8 @@ def parse_options(self, opts) -> Any:
113
115
if "supported_fp8_dtypes" not in opts :
114
116
supported_fp8_dtypes = set (HIPOptions .supported_fp8_dtypes )
115
117
if self .target .arch == 'gfx942' :
116
- supported_fp8_dtypes .update ({'fp8e4nv' , 'fp8e4b8' , 'fp8e5b16' })
117
- elif self .target .arch == 'gfx950' :
118
- supported_fp8_dtypes .update ({'fp8e4nv' , 'fp8e5' })
119
- elif 'gfx12' in self .target .arch :
120
- supported_fp8_dtypes .update ({'fp8e4nv' , 'fp8e5' })
118
+ # CDNA3/gfx942 has native support for AMD specific FP8 types.
119
+ supported_fp8_dtypes .update ({'fp8e4b8' , 'fp8e5b16' })
121
120
args ["supported_fp8_dtypes" ] = tuple (sorted (supported_fp8_dtypes ))
122
121
123
122
if "enable_fp_fusion" not in opts :
0 commit comments