[llvm] [LLVM][NVPTX]Add BF16 vector instruction and fix lowering rules (PR #69415)
Han Shen via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 19 04:13:27 PDT 2023
================
@@ -741,12 +753,14 @@ NVPTXTargetLowering::NVPTXTargetLowering(const NVPTXTargetMachine &TM,
// These map to conversion instructions for scalar FP types.
for (const auto &Op : {ISD::FCEIL, ISD::FFLOOR, ISD::FNEARBYINT, ISD::FRINT,
ISD::FROUNDEVEN, ISD::FTRUNC}) {
- setOperationAction(Op, MVT::bf16, Legal);
+ setBF16OperationAction(Op, MVT::bf16, Legal, Promote);
----------------
shenh10 wrote:
I think there should be a check for sm_80 and sm_90 for bf16 instruction, isn't it?
https://github.com/llvm/llvm-project/pull/69415
More information about the llvm-commits
mailing list