Issue |
132859
|
Summary |
[mlir] Assertion `hasSameElementsOrSplat(type, values)' failed
|
Labels |
mlir
|
Assignees |
|
Reporter |
wwy6191
|
git version: 59fd2878fce470f02058f43d4b818ed68ce04094
system: `Ubuntu 18.04.6 LTS`
reproduce with: `mlir-opt a.mlir`
a.mlir:
```
module {
func.func @test_vectorize_copy_complex(%arg0: tensor<8x8xcomplex<i32>>, %arg1: tensor<8x8xcomplex<i32>>) -> tensor<8x8xcomplex<i32>> {
%cst = arith.constant dense<42> : tensor<8x8xcomplex<i32>>
%c0 = arith.constant 0 : index
%c1 = arith.constant 1 : index
%c8 = arith.constant 8 : index
%idx7 = index.constant 7
%c0_0 = arith.constant 0 : index
%c7 = arith.constant 7 : index
%idx0 = index.constant 0
%true = index.bool.constant true
cf.assert %true, "ERROR: Runtime op verification failed\0A%8 = \22linalg.copy\22(%arg0, %c0, %c1) <{operandSegmentSizes = array<i32: 2, 1>}> ({...}) : (tensor<8x8xcomplex<i32>>, index, index) -> tensor<8x8xcomplex<i32>>\0A^ unexpected negative result on dimension #0 of input/output operand #1\0ALocation: loc(\22/data/szy/MLIR/seed729/tmp.PQR72Gcnu1.mlir\22:4:6)"
%idx7_1 = index.constant 7
%idx8 = index.constant 8
%c0_2 = arith.constant 0 : index
%c8_3 = arith.constant 8 : index
%true_4 = index.bool.constant true
cf.assert %true_4, "ERROR: Runtime op verification failed\0A%13 = \22linalg.copy\22(%arg1, %c0_2, %c8_3) <{operandSegmentSizes = array<i32: 2, 1>}> ({...}) : (tensor<8x8xcomplex<i32>>, index, index) -> tensor<8x8xcomplex<i32>>\0A^ dimension #0 of input/output operand #0 is incompatible with dimension %13 is dynamic\0ALocation: loc(\22/data/szy/MLIR/seed729/tmp.PQR72Gcnu1.mlir\22:4:6)"
%idx7_5(base)
```
stack trace:
```
mlir-opt: /data/szy/MLIR/llvm-project/mlir/lib/IR/BuiltinAttributes.cpp:1027: static DenseElementsAttr mlir::DenseElementsAttr::get(ShapedType, ArrayRef<std::complex<APInt>>): Assertion `hasSameElementsOrSplat(type, values)' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /data/szy/MLIR/llvm-project/install/bin/mlir-opt /data/szy/MLIR/seed/seed7/tmp.OExlhtwwSr.mlir
1. MLIR Parser: custom op parser 'builtin.module'
2. MLIR Parser: custom op parser 'func.func'
3. MLIR Parser: custom op parser 'arith.constant'
#0 0x00005567cd916db8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x11bddb8)
#1 0x00005567cd9148be llvm::sys::RunSignalHandlers() (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x11bb8be)
#2 0x00005567cd917736 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
#3 0x00007efd811ed420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
#4 0x00007efd8082a00b raise /build/glibc-LcI20x/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
#5 0x00007efd80809859 abort /build/glibc-LcI20x/glibc-2.31/stdlib/abort.c:81:7
#6 0x00007efd80809729 get_sysdep_segment_value /build/glibc-LcI20x/glibc-2.31/intl/loadmsgcat.c:509:8
#7 0x00007efd80809729 _nl_load_domain /build/glibc-LcI20x/glibc-2.31/intl/loadmsgcat.c:970:34
#8 0x00007efd8081afd6 (/lib/x86_64-linux-gnu/libc.so.6+0x33fd6)
#9 0x00005567d0a11060 llvm::SmallVectorTemplateBase<std::complex<llvm::APFloat>, false>::push_back(std::complex<llvm::APFloat>&&) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x42b8060)
#10 0x00005567d3a9ff27 (anonymous namespace)::TensorLiteralParser::getAttr(llvm::SMLoc, mlir::ShapedType) AttributeParser.cpp:0:0
#11 0x00005567d3a9c7cc mlir::detail::Parser::parseDenseElementsAttr(mlir::Type) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x73437cc)
#12 0x00005567d3a855d0 mlir::detail::AsmParserImpl<mlir::OpAsmParser>::parseAttribute(mlir::Attribute&, mlir::Type) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x732c5d0)
#13 0x00005567cdb91cab llvm::ParseResult mlir::AsmParser::parseAttribute<mlir::TypedAttr>(mlir::TypedAttr&, mlir::Type) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x1438cab)
#14 0x00005567cdb4687f mlir::arith::ConstantOp::parse(mlir::OpAsmParser&, mlir::OperationState&) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x13ed87f)
#15 0x00005567d3a7f7e4 (anonymous namespace)::OperationParser::parseOperation() Parser.cpp:0:0
#16 0x00005567d3a8a9a4 (anonymous namespace)::OperationParser::parseBlock(mlir::Block*&) Parser.cpp:0:0
#17 0x00005567d3a8885c (anonymous namespace)::OperationParser::parseRegion(mlir::Region&, llvm::ArrayRef<mlir::OpAsmParser::Argument>, bool) Parser.cpp:0:0
#18 0x00005567d3a86acc (anonymous namespace)::CustomOpAsmParser::parseOptionalRegion(mlir::Region&, llvm::ArrayRef<mlir::OpAsmParser::Argument>, bool) Parser.cpp:0:0
#19 0x00005567d3b88e32 mlir::function_interface_impl::parseFunctionOp(mlir::OpAsmParser&, mlir::OperationState&, bool, mlir::StringAttr, llvm::function_ref<mlir::Type (mlir::Builder&, llvm::ArrayRef<mlir::Type>, llvm::ArrayRef<mlir::Type>, mlir::function_interface_impl::VariadicFlag, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)>, mlir::StringAttr, mlir::StringAttr) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x742fe32)
#20 0x00005567cdf997fa mlir::func::FuncOp::parse(mlir::OpAsmParser&, mlir::OperationState&) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x18407fa)
#21 0x00005567d3a7f7e4 (anonymous namespace)::OperationParser::parseOperation() Parser.cpp:0:0
#22 0x00005567d3a8a9a4 (anonymous namespace)::OperationParser::parseBlock(mlir::Block*&) Parser.cpp:0:0
#23 0x00005567d3a886d5 (anonymous namespace)::OperationParser::parseRegion(mlir::Region&, llvm::ArrayRef<mlir::OpAsmParser::Argument>, bool) Parser.cpp:0:0
#24 0x00005567d0a3db9e mlir::ModuleOp::parse(mlir::OpAsmParser&, mlir::OperationState&) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x42e4b9e)
#25 0x00005567d3a7f7e4 (anonymous namespace)::OperationParser::parseOperation() Parser.cpp:0:0
#26 0x00005567d3a7e5ad mlir::parseAsmSourceFile(llvm::SourceMgr const&, mlir::Block*, mlir::ParserConfig const&, mlir::AsmParserState*, mlir::AsmParserCodeCompleteContext*) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x73255ad)
#27 0x00005567d091df0f mlir::parseSourceFile(std::shared_ptr<llvm::SourceMgr> const&, mlir::Block*, mlir::ParserConfig const&, mlir::LocationAttr*) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x41c4f0f)
#28 0x00005567d091ce8e mlir::parseSourceFileForTool(std::shared_ptr<llvm::SourceMgr> const&, mlir::ParserConfig const&, bool) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x41c3e8e)
#29 0x00005567d091c67f performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#30 0x00005567d091c3ed llvm::LogicalResult llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::callback_fn<mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&)::$_0>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) MlirOptMain.cpp:0:0
#31 0x00005567d09c7275 mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x426e275)
#32 0x00005567d0916405 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x41bd405)
#33 0x00005567d09166af mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x41bd6af)
#34 0x00005567d09169de mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x41bd9de)
#35 0x00005567cd8f5337 main (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x119c337)
#36 0x00007efd8080b083 __libc_start_main /build/glibc-LcI20x/glibc-2.31/csu/../csu/libc-start.c:342:3
#37 0x00005567cd8f4e9e _start (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x119be9e)
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs