Automated Code Change

PiperOrigin-RevId: 821967952
This commit is contained in:
A. Unique TensorFlower 2025-10-20 23:29:37 -07:00 committed by TensorFlower Gardener
parent a31ff63e54
commit fdc9d00af9
2 changed files with 8 additions and 3 deletions

View File

@ -218,7 +218,8 @@ struct RewriteFp8TruncFPattern : public Fp8OpRewritePattern<arith::TruncFOp> {
llvm::transform(inputs, inputs.begin(), [&](mlir::Value v) -> mlir::Value {
if (v.getType().getIntOrFloatBitWidth() < f32_ty.getWidth()) {
return b.create<arith::ExtFOp>(f32_ty, v);
} else if (v.getType() != f32_ty) {
}
if (v.getType() != f32_ty) {
return b.create<arith::TruncFOp>(f32_ty, v);
} else {
return v;

View File

@ -79,7 +79,9 @@ struct PeelLoop : public OpRewritePattern<LoopOp> {
peeled_map.Simplify();
// If the symbol is still constrained, peeling does not help.
if (peeled_map.IsSymbolConstrained(sym_index)) continue;
if (peeled_map.IsSymbolConstrained(sym_index)) {
continue;
}
// Create remainder indexing map.
IndexingMap tail_map = indexing_map;
@ -104,7 +106,9 @@ struct PeelLoop : public OpRewritePattern<LoopOp> {
Location loc = loop_op.getLoc();
SmallVector<Value, 4> inits = loop_op.getInits();
for (const auto& indexing_map : llvm::reverse(indexing_maps)) {
if (indexing_map.IsKnownEmpty()) continue;
if (indexing_map.IsKnownEmpty()) {
continue;
}
auto tail_loop = rewriter.create<LoopOp>(
loc, indexing_map, loop_op.getDims(), inits,
[&](OpBuilder& nested_b, Location nested_loc, ValueRange ivs,