[llvm] [NVPTX] Add intrinsics for ff/f16/bf16 to ue5m3 conversions (PR #218677)
Srinivasa Ravi via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 25 21:24:37 PDT 2026
================
@@ -936,6 +938,36 @@ let Predicates = [hasS2F6X2ConversionSupport] in {
"cvt${mode:base}${mode:satfinite}.scaled::n2::ue8m0.bf16x2.ue5m3x2">,
Requires<[hasUE5M3TypeSupport]>;
+ def CVT_ue5m3x2_f32 : BasicFlagsNVPTXInst<(outs B16:$dst),
+ (ins B32:$src1, B32:$src2), (ins CvtMode:$mode),
+ "cvt${mode:base}${mode:satfinite}.ue5m3x2.f32">,
+ Requires<[hasUE5M3TypeSupport]>;
+ def CVT_ue5m3x2_f16x2 : BasicFlagsNVPTXInst<(outs B16:$dst),
+ (ins B32:$src), (ins CvtMode:$mode),
+ "cvt${mode:base}${mode:satfinite}.ue5m3x2.f16x2">,
+ Requires<[hasUE5M3TypeSupport]>;
+ def CVT_ue5m3x2_bf16x2 : BasicFlagsNVPTXInst<(outs B16:$dst),
+ (ins B32:$src), (ins CvtMode:$mode),
+ "cvt${mode:base}${mode:satfinite}.ue5m3x2.bf16x2">,
----------------
Wolfram70 wrote:
The two instructions seem to be copies of each other except for `f16x2` and `bf16x2`, so can we loop over them (like below)?
https://github.com/llvm/llvm-project/pull/218677
More information about the llvm-commits
mailing list