@@ -73,8 +73,10 @@ struct TilesArray {
73
73
74
74
SmallVector<Value> toFlatVector () {
75
75
SmallVector<Value> flatVector;
76
+ // NOLINTBEGIN
76
77
for (auto row : tileMatrix)
77
78
flatVector.append (row);
79
+ // NOLINTEND
78
80
return flatVector;
79
81
}
80
82
@@ -124,10 +126,12 @@ static bool isDPASCompatible(linalg::LinalgOp linalgOp, int kTile,
124
126
int dpasTileM = dpasTile[0 ];
125
127
int dpasTileN = dpasTile[1 ];
126
128
int dpasTileK = dpasTile[2 ];
129
+ // NOLINTBEGIN
127
130
if ((mDim % dpasTileM != 0 ) || (nDim % dpasTileN != 0 ) ||
128
131
(kDim % dpasTileK != 0 ) || (kTile % dpasTileK != 0 )) {
129
132
return false ;
130
133
}
134
+ // NOLINTEND
131
135
132
136
return true ;
133
137
}
@@ -177,7 +181,8 @@ static std::optional<Value> lowerGenericOp(linalg::GenericOp genericOp,
177
181
return std::nullopt;
178
182
}
179
183
180
- if (structured_match::utils::isTwoDReluOp (genericOp, /* operands=*/ nullptr )) {
184
+ if (structured_match::utils::isTwoDReluOp (genericOp,
185
+ /* operands=*/ nullptr )) { // NOLINT
181
186
assert (operands.size () == 1 &&
182
187
" Invalid number of operands for generic 2D ReLU" );
183
188
@@ -203,7 +208,8 @@ static std::optional<Value> lowerGenericOp(linalg::GenericOp genericOp,
203
208
.getResult ();
204
209
}
205
210
206
- if (structured_match::utils::isTwoDAddOp (genericOp, /* operands=*/ nullptr )) {
211
+ if (structured_match::utils::isTwoDAddOp (genericOp,
212
+ /* operands=*/ nullptr )) { // NOLINT
207
213
assert (operands.size () == 2 &&
208
214
" Invalid number of operands for generic 2D add" );
209
215
return rewriter
@@ -690,11 +696,13 @@ static SmallVector<Value> createCoarseDscTiles(PatternRewriter &rewriter,
690
696
int64_t sgLoadCols = std::min (sgTile2D[1 ], maxWidth);
691
697
int64_t arrayLength = std::min (maxWidth / sgLoadCols, maxArrayLength);
692
698
// In case of partial fit, load only single tile.
699
+ // NOLINTBEGIN
693
700
if (maxWidth % sgLoadCols != 0 || arrayLength != 4 || arrayLength != 2 )
694
701
arrayLength = 1 ;
695
702
696
703
// TODO: Add variable array_length support.
697
704
arrayLength = 1 ;
705
+ // NOLINTEND
698
706
699
707
return createDescriptorTiles (rewriter, loc, src, sgTile2D, {0 , 0 },
700
708
{sgLoadRows, sgLoadCols}, arrayLength);
@@ -1114,7 +1122,8 @@ static LogicalResult createDPASKernel(linalg::LinalgOp linalgOp,
1114
1122
}
1115
1123
1116
1124
// Create loop terminator and exit the loop.
1117
- auto terminateLoop = [&](scf::ForOp loopOp, SmallVector<Value> resultValues) {
1125
+ auto terminateLoop = [&](scf::ForOp loopOp,
1126
+ SmallVector<Value> resultValues) { // NOLINT
1118
1127
rewriter.setInsertionPointToEnd (loopOp.getBody ());
1119
1128
rewriter.create <scf::YieldOp>(loc, resultValues);
1120
1129
rewriter.setInsertionPointAfter (loopOp);
@@ -1204,12 +1213,14 @@ LogicalResult createEltwiseKernel(linalg::LinalgOp linalgOp,
1204
1213
int64_t subTileRows = std::min (loadShape[0 ], maxSizeSIMD / subTileCols);
1205
1214
1206
1215
SmallVector<SmallVector<Value>> vecSubTiles;
1216
+ // NOLINTBEGIN
1207
1217
for (auto inputTiles : loadedInputs) {
1208
1218
TilesArray subTiles =
1209
1219
extractVecSubTiles (rewriter, loc, inputTiles, outputShape, loadShape,
1210
1220
{subTileRows, subTileCols});
1211
1221
vecSubTiles.push_back (subTiles.toFlatVector ());
1212
1222
}
1223
+ // NOLINTEND
1213
1224
1214
1225
// Perform vectorized computations for each output tile.
1215
1226
SmallVector<Value> results;
0 commit comments