MLIR-AIE 1.4.5.dev
EmulateBinaryF32InBF16Pattern< OpTy > Struct Template Reference

Pattern to emulate f32 binary vector arithmetic ops in bf16. More...

Inheritance diagram for EmulateBinaryF32InBF16Pattern< OpTy >:
Collaboration diagram for EmulateBinaryF32InBF16Pattern< OpTy >:

Public Member Functions

LogicalResult matchAndRewrite (OpTy op, PatternRewriter &rewriter) const override

Detailed Description

template<typename OpTy>
struct EmulateBinaryF32InBF16Pattern< OpTy >

Pattern to emulate f32 binary vector arithmetic ops in bf16.

For an op like: r = arith.addf a, b : vector<16xf32> Produces: a_bf16 = arith.truncf a : vector<16xf32> to vector<16xbf16> b_bf16 = arith.truncf b : vector<16xf32> to vector<16xbf16> r_bf16 = arith.addf a_bf16, b_bf16 : vector<16xbf16> r = arith.extf r_bf16 : vector<16xbf16> to vector<16xf32>

Definition at line 784 of file VectorToVectorConversions.cpp.

Member Function Documentation

◆ matchAndRewrite()

template<typename OpTy>
LogicalResult EmulateBinaryF32InBF16Pattern< OpTy >::matchAndRewrite ( OpTy op,
PatternRewriter & rewriter ) const
inlineoverride

Definition at line 787 of file VectorToVectorConversions.cpp.


The documentation for this struct was generated from the following file: