MLIR-AIE 1.4.5.dev
FoldBF16RoundTripPattern Struct Reference

Pattern to drop bf16 -> f32 -> bf16 round trips. More...

Inheritance diagram for FoldBF16RoundTripPattern:
Collaboration diagram for FoldBF16RoundTripPattern:

Public Member Functions

LogicalResult matchAndRewrite (arith::TruncFOp op, PatternRewriter &rewriter) const override

Detailed Description

Pattern to drop bf16 -> f32 -> bf16 round trips.

Arith used to fold these but no longer does: widening a signaling NaN quiets it, so the original bit pattern cannot be recovered. This pass has always made that trade anyway – smartTruncF32ToBF16 collapses the same pair on sight – so fold here to keep the pipeline's pre-existing behavior rather than leaving the round trips for the backend.

Definition at line 755 of file VectorToVectorConversions.cpp.

Member Function Documentation

◆ matchAndRewrite()

LogicalResult FoldBF16RoundTripPattern::matchAndRewrite ( arith::TruncFOp op,
PatternRewriter & rewriter ) const
inlineoverride

Definition at line 758 of file VectorToVectorConversions.cpp.


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