-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
[mlir][arith] -arith-emulate-wide-int crashes in EmulateWideInt.cpp:160: Value constructResultVector(ConversionPatternRewriter &, Location, VectorType, ValueRange): Assertion `resultShape.back() == static_cast<int64_t>(resultComponents.size()) && "Wrong number of result components"' failed. #108163
Comments
llvm-project/mlir/lib/Dialect/Arith/Transforms/EmulateWideInt.cpp Lines 1087 to 1106 in dbd1971
op.getType() is vector<8xi128> and maxIntWidth is 32, converter expected to return std::nullopt . But newTy actually is vector<8xi128> . I don't know why this is.
|
I can reproduce this. Minimized repro: func.func @test_muli_vector(%arg0: vector<8xi64>) -> vector<8xi64> {
%0 = arith.extsi %arg0: vector<8xi64> to vector<8xi128>
%2 = arith.muli %0, %0 : vector<8xi128>
%3 = arith.trunci %2 : vector<8xi128> to vector<8xi64>
return %3 : vector<8xi64>
} |
In this case, I believe that we should bail out on |
It's because of a bug in the return values of the type converter. They return llvm-project/mlir/include/mlir/Transforms/DialectConversion.h Lines 147 to 153 in a3bad9a
|
Use `nullptr` to indicate that type conversion failed and no fallback conversion should be attempted. Fixes: llvm#108163
Use `nullptr` to indicate that type conversion failed and no fallback conversion should be attempted. Fixes: llvm#108163
Thanks, I understand it. |
Use `nullptr` to indicate that type conversion failed and no fallback conversion should be attempted. Fixes: #108163
git version: 761bf33
system:
Ubuntu 18.04.6 LTS
reproduce with:
mlir-opt -arith-emulate-wide-int a.mlir
This case also crashes in
-memref-emulate-wide-int
a.mlir:
stack trace:
The text was updated successfully, but these errors were encountered: