-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed executable compilation (tensor.extract_slice and an illegal vector.transfer_read) #42
Comments
Dispatch 86 does trigger the assert in a debug build. I think these are the only two issues left in the model (compilation blocking at least). Either can be compiled in isolation with |
The extra innermost unit dim is causing issues for warp reduction in dispatch 86. It can be fixed via the following: diff --git a/compiler/src/iree/compiler/Codegen/Common/OptimizeVectorTransferPass.cpp b/compiler/src/iree/compiler/Codegen/Common/OptimizeVectorTransferPass.cpp
index c35d70d99a..7bdf02468c 100644
--- a/compiler/src/iree/compiler/Codegen/Common/OptimizeVectorTransferPass.cpp
+++ b/compiler/src/iree/compiler/Codegen/Common/OptimizeVectorTransferPass.cpp
@@ -13,6 +13,7 @@
#include "mlir/Dialect/MemRef/IR/MemRef.h"
#include "mlir/Dialect/MemRef/Utils/MemRefUtils.h"
#include "mlir/Dialect/Vector/IR/VectorOps.h"
+#include "mlir/Dialect/Vector/Transforms/VectorRewritePatterns.h"
#include "mlir/Dialect/Vector/Transforms/VectorTransforms.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Pass/Pass.h"
@@ -70,12 +71,14 @@ struct OptimizeVectorTransferPass
// to transfer reads.
{
RewritePatternSet patterns(&getContext());
- mlir::vector::populateCastAwayVectorLeadingOneDimPatterns(patterns);
+ vector::populateCastAwayVectorLeadingOneDimPatterns(patterns);
+ vector::populateDropUnitDimWithShapeCastPatterns(patterns);
vector::ExtractOp::getCanonicalizationPatterns(patterns, &getContext());
+ vector::ShapeCastOp::getCanonicalizationPatterns(patterns, &getContext());
+ vector::BroadcastOp::getCanonicalizationPatterns(patterns, &getContext());
patterns.add<TransposeUnitDimToShapeCast>(&getContext());
- mlir::vector::
- populateVectorTransferCollapseInnerMostContiguousDimsPatterns(
- patterns);
+ vector::populateVectorTransferCollapseInnerMostContiguousDimsPatterns(
+ patterns);
if (failed(applyPatternsAndFoldGreedily(funcOp, std::move(patterns)))) {
return signalPassFailure();
} |
For dispatch 88, @bangtianliu can you look into the issue? |
sure |
The latest int8-model has some compilation issues. If running with a debug compiler, there is an assert:
If running with a release compiler, there are errors on two dispatches.
@main$async_dispatch_86
@main$async_dispatch_88
Probably related.
The text was updated successfully, but these errors were encountered: