[llvm] [AMDGPU] Add custom lowering of llvm.convert.from.arbitrary.fp for FP8 (PR #194144)

Shilei Tian via llvm-commits llvm-commits at lists.llvm.org
Sun May 24 15:27:12 PDT 2026


================
@@ -815,6 +815,16 @@ defm FP8ConversionInsts : AMDGPUSubtargetFeature<"fp8-conversion-insts",
   "Has fp8 and bf8 conversion instructions"
 >;
 
+// OCP fp8 semantics (E4M3FN, E5M2). Distinct from the FNUZ formats used by
+// gfx942.
+defm OCPFP8ConversionInsts : AMDGPUSubtargetFeature<"ocp-fp8-conversion-insts",
+  "Has OCP fp8 (E4M3FN, E5M2) conversion instructions"
+>;
+
+defm FP8F16ConversionInsts : AMDGPUSubtargetFeature<"fp8-f16-conversion-insts",
----------------
shiltian wrote:

I think this should use `f8` instead of `fp8`, since it also supports `bf8`. Does `f16` here mean both `fp16` and `bf16`?

https://github.com/llvm/llvm-project/pull/194144


More information about the llvm-commits mailing list