mirror of
https://github.com/zebrajr/tensorflow.git
synced 2025-12-06 12:20:11 +01:00
Automated Code Change
PiperOrigin-RevId: 821967952
This commit is contained in:
parent
a31ff63e54
commit
fdc9d00af9
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user