File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
third_party/intel/lib/Analysis Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -1236,6 +1236,13 @@ unsigned ModuleAxisInfoAnalysis::getAlignment(Value value) {
12361236 auto linAttr =
12371237 gpu::toLinearEncoding (tensorTy.getEncoding (), tensorTy.getShape ());
12381238 auto order = linAttr.getOrder ();
1239+
1240+ // FIXME: should this be an assertion instead?
1241+ // Temporarily added to avoid crashing on some tests.
1242+ // See issue #3842.
1243+ if (order[0 ] >= axisInfo->getRank ())
1244+ return 1 ;
1245+
12391246 auto maxMultipleBytes = axisInfo->getDivisibility (order[0 ]);
12401247 auto maxContig = axisInfo->getContiguity (order[0 ]);
12411248
@@ -1270,7 +1277,14 @@ unsigned ModuleAxisInfoAnalysis::getMaskAlignment(Value mask) {
12701277 return 1 ;
12711278 auto linAttr =
12721279 gpu::toLinearEncoding (tensorTy.getEncoding (), tensorTy.getShape ());
1280+
1281+ // FIXME: should this be an assertion instead?
1282+ // Temporarily added to avoid crashing on some tests.
1283+ // See issue #3842.
12731284 auto maskOrder = linAttr.getOrder ();
1285+ if (maskOrder[0 ] >= axisInfo->getRank ())
1286+ return 1 ;
1287+
12741288 auto alignment = std::max<unsigned >(axisInfo->getConstancy (maskOrder[0 ]), 1 );
12751289 LDBG (" getMaskAlignment maskOrder[0] " << maskOrder[0 ] << " alignment "
12761290 << alignment);
You can’t perform that action at this time.
0 commit comments