Skip to content

Commit

Permalink
[NFC] Resolve warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanghb97 committed Dec 17, 2024
1 parent 9d9d850 commit cf21db1
Show file tree
Hide file tree
Showing 6 changed files with 141 additions and 96 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class ConvNhwcFhwcOptimizePattern : public ConversionPattern {
// clang format off
// Step 1: Create outer most loops.
// Create the scf::ForallOp operation For N,OH,OW,OC
auto outputForAllOp = rewriter.create<scf::ForallOp>(
rewriter.create<scf::ForallOp>(
loc, SmallVector<OpFoldResult, 4>({N, OH, OW, OC}), ValueRange{},
std::nullopt, // No mapping specified in this example
[&](OpBuilder &nestedBuilder, Location nestedLoc,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ class DepthwiseConv2DNhwcHwcOptimizePattern : public ConversionPattern {
rewriter.create<arith::ConstantOp>(loc, rewriter.getIndexAttr(vecSize));
const AffineExpr d0 = rewriter.getAffineDimExpr(0);
const AffineExpr d1 = rewriter.getAffineDimExpr(1);
const AffineExpr s0 = rewriter.getAffineSymbolExpr(0);
// TODO: remove s0?
// const AffineExpr s0 = rewriter.getAffineSymbolExpr(0);

Value input = op->getOperand(0);
Value filter = op->getOperand(1);
Expand Down Expand Up @@ -122,7 +123,7 @@ class DepthwiseConv2DNhwcHwcOptimizePattern : public ConversionPattern {
// clang format off
// Step 1: Create outer most loops.
// Create the scf::ForallOp operation For N,OH,OW
auto outputForAllOp = rewriter.create<scf::ForallOp>(
rewriter.create<scf::ForallOp>(
loc, SmallVector<OpFoldResult, 3>({N, OH, OW}), ValueRange{},
std::nullopt, // No mapping specified in this example
[&](OpBuilder &nestedBuilder, Location nestedLoc,
Expand Down
Loading

0 comments on commit cf21db1

Please sign in to comment.