@@ -40,12 +40,12 @@ namespace {
40
40
// ===----------------------------------------------------------------------===//
41
41
42
42
// Common match failure reasons.
43
- static constexpr StringLiteral MATCH_FAILURE_NOT_SME_TILE_TYPE_MULTIPLE (
43
+ static constexpr StringLiteral kMatchFailureNotSMETileTypeMultiple (
44
44
" op vector size is not multiple of SME tiles" );
45
- static constexpr StringLiteral MATCH_FAILURE_UNSUPPORTED_MASK_OP (
45
+ static constexpr StringLiteral kMatchFailureUnsupportedMaskOp (
46
46
" op mask is unsupported for legalization/decomposition" );
47
47
static constexpr StringLiteral
48
- MATCH_FAILURE_NON_PERMUTATION_MAP (" op affine map is not a permutation" );
48
+ kMatchFailureNonPermutationMap (" op affine map is not a permutation" );
49
49
50
50
// / An SMESubTile represents a single SME-sized sub-tile from decomposing a
51
51
// / larger vector type. The (`row`, `col`) are the position of the tile in the
@@ -174,8 +174,8 @@ struct LegalizeVectorOuterProductOpsByDecomposition
174
174
OneToNPatternRewriter &rewriter) const override {
175
175
auto vectorType = outerProductOp.getResultVectorType ();
176
176
if (!isMultipleOfSMETileVectorType (vectorType))
177
- return rewriter.notifyMatchFailure (
178
- outerProductOp, MATCH_FAILURE_NOT_SME_TILE_TYPE_MULTIPLE );
177
+ return rewriter.notifyMatchFailure (outerProductOp,
178
+ kMatchFailureNotSMETileTypeMultiple );
179
179
180
180
Value mask;
181
181
Operation *rootOp = outerProductOp;
@@ -188,7 +188,7 @@ struct LegalizeVectorOuterProductOpsByDecomposition
188
188
189
189
if (!isSupportedMaskOp (mask))
190
190
return rewriter.notifyMatchFailure (outerProductOp,
191
- MATCH_FAILURE_UNSUPPORTED_MASK_OP );
191
+ kMatchFailureUnsupportedMaskOp );
192
192
193
193
ValueRange accSMETiles = adaptor.getAcc ();
194
194
auto smeTileType = getSMETileTypeForElement (vectorType.getElementType ());
@@ -252,18 +252,18 @@ struct LegalizeTransferReadOpsByDecomposition
252
252
OneToNPatternRewriter &rewriter) const override {
253
253
auto vectorType = readOp.getVectorType ();
254
254
if (!isMultipleOfSMETileVectorType (vectorType))
255
- return rewriter.notifyMatchFailure (
256
- readOp, MATCH_FAILURE_NOT_SME_TILE_TYPE_MULTIPLE );
255
+ return rewriter.notifyMatchFailure (readOp,
256
+ kMatchFailureNotSMETileTypeMultiple );
257
257
258
258
auto mask = readOp.getMask ();
259
259
if (!isSupportedMaskOp (mask))
260
260
return rewriter.notifyMatchFailure (readOp,
261
- MATCH_FAILURE_UNSUPPORTED_MASK_OP );
261
+ kMatchFailureUnsupportedMaskOp );
262
262
263
263
auto permutationMap = readOp.getPermutationMap ();
264
264
if (!permutationMap.isPermutation ())
265
265
return rewriter.notifyMatchFailure (readOp,
266
- MATCH_FAILURE_NON_PERMUTATION_MAP );
266
+ kMatchFailureNonPermutationMap );
267
267
268
268
// Note: For 2D vector types the only non-identity permutation is a simple
269
269
// tranpose [1, 0].
@@ -300,18 +300,18 @@ struct LegalizeTransferWriteOpsByDecomposition
300
300
OneToNPatternRewriter &rewriter) const override {
301
301
auto vectorType = writeOp.getVectorType ();
302
302
if (!isMultipleOfSMETileVectorType (vectorType))
303
- return rewriter.notifyMatchFailure (
304
- writeOp, MATCH_FAILURE_NOT_SME_TILE_TYPE_MULTIPLE );
303
+ return rewriter.notifyMatchFailure (writeOp,
304
+ kMatchFailureNotSMETileTypeMultiple );
305
305
306
306
auto mask = writeOp.getMask ();
307
307
if (!isSupportedMaskOp (mask))
308
308
return rewriter.notifyMatchFailure (writeOp,
309
- MATCH_FAILURE_UNSUPPORTED_MASK_OP );
309
+ kMatchFailureUnsupportedMaskOp );
310
310
311
311
auto permutationMap = writeOp.getPermutationMap ();
312
312
if (!permutationMap.isPermutation ())
313
313
return rewriter.notifyMatchFailure (writeOp,
314
- MATCH_FAILURE_NON_PERMUTATION_MAP );
314
+ kMatchFailureNonPermutationMap );
315
315
316
316
// Note: For 2D vector types the only non-identity permutation is a simple
317
317
// tranpose [1, 0].
0 commit comments