Issue |
130014
|
Summary |
[MLIR] Assertion `succeeded( ConcreteT::verifyInvariants(getDefaultDiagnosticEmitFn(ctx), args...))' failed.
|
Labels |
mlir
|
Assignees |
|
Reporter |
RiRi114
|
Test on commit: 0f9720a6
steps to reproduceļ¼
`mlir-opt temp.mlir --nvvm-attach-target `
test case:
```mlir
module attributes {gpu.container_module} {
gpu.module @nvvm_module_example_1 [#nvvm.target<chip = "sm_70", O = 3>] {
}
gpu.module @nvvm_module_example_2 [#nvvm.target<chip = "sm_80", features = "fast", O = 2>] {
}
gpu.module @nvvm_module_example_3 [#nvvm.target<chip = "sm_90", features = "ftz", O = 4>] {
}
}
```
crash trace:
```
<unknown>:0: error: The optimization level must be a number between 0 and 3.
mlir-opt: /home/fuzzing/llvm-project/mlir/include/mlir/IR/StorageUniquerSupport.h:180: static ConcreteT mlir::detail::StorageUserBase<mlir::NVVM::NVVMTargetAttr, mlir::Attribute, mlir::NVVM::detail::NVVMTargetAttrStorage, mlir::detail::AttributeUniquer>::get(mlir::MLIRContext *, Args &&...) [ConcreteT = mlir::NVVM::NVVMTargetAttr, BaseT = mlir::Attribute, StorageT = mlir::NVVM::detail::NVVMTargetAttrStorage, UniquerT = mlir::detail::AttributeUniquer, Traits = <>, Args = <int &, llvm::StringRef &, llvm::StringRef &, llvm::StringRef &, mlir::DictionaryAttr &, mlir::ArrayAttr &>]: Assertion `succeeded( ConcreteT::verifyInvariants(getDefaultDiagnosticEmitFn(ctx), args...))' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /home/fuzzing/llvm-project/build/bin/mlir-opt temp.mlir --nvvm-attach-target
1. MLIR Parser: custom op parser 'builtin.module'
2. MLIR Parser: custom op parser 'gpu.module'
#0 0x000000000113ce77 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x113ce77)
#1 0x000000000113aa0e llvm::sys::RunSignalHandlers() (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x113aa0e)
#2 0x000000000113d855 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
#3 0x000070d97cb89520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#4 0x000070d97cbdd9fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
#5 0x000070d97cb89476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
#6 0x000070d97cb6f7f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
#7 0x000070d97cb6f71b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
#8 0x000070d97cb80e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
#9 0x0000000002829974 (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x2829974)
#10 0x0000000002829d9c mlir::NVVM::NVVMTargetAttr::parse(mlir::AsmParser&, mlir::Type) (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x2829d9c)
#11 0x000000000282b638 mlir::NVVM::NVVMDialect::parseAttribute(mlir::DialectAsmParser&, mlir::Type) const (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x282b638)
#12 0x00000000069af1c6 mlir::detail::Parser::parseExtendedAttr(mlir::Type) (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x69af1c6)
#13 0x00000000069dac96 llvm::ParseResult llvm::function_ref<llvm::ParseResult ()>::callback_fn<mlir::detail::Parser::parseAttribute(mlir::Type)::$_0>(long) AttributeParser.cpp:0:0
#14 0x00000000069b495e mlir::detail::Parser::parseCommaSeparatedListUntil(mlir::Token::Kind, llvm::function_ref<llvm::ParseResult ()>, bool) (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x69b495e)
#15 0x00000000069d561e mlir::detail::Parser::parseAttribute(mlir::Type) (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x69d561e)
#16 0x00000000069d7c96 mlir::detail::Parser::parseOptionalAttribute(mlir::ArrayAttr&, mlir::Type) (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x69d7c96)
#17 0x0000000001857b7e mlir::gpu::GPUModuleOp::parse(mlir::OpAsmParser&, mlir::OperationState&) (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x1857b7e)
#18 0x00000000069b881e (anonymous namespace)::OperationParser::parseOperation() Parser.cpp:0:0
#19 0x00000000069c3d01 (anonymous namespace)::OperationParser::parseBlock(mlir::Block*&) Parser.cpp:0:0
#20 0x00000000069c198e (anonymous namespace)::OperationParser::parseRegion(mlir::Region&, llvm::ArrayRef<mlir::OpAsmParser::Argument>, bool) Parser.cpp:0:0
#21 0x00000000069bfbf9 (anonymous namespace)::CustomOpAsmParser::parseRegion(mlir::Region&, llvm::ArrayRef<mlir::OpAsmParser::Argument>, bool) Parser.cpp:0:0
#22 0x00000000043648ce mlir::ModuleOp::parse(mlir::OpAsmParser&, mlir::OperationState&) (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x43648ce)
#23 0x00000000069b881e (anonymous namespace)::OperationParser::parseOperation() Parser.cpp:0:0
#24 0x00000000069b7108 mlir::parseAsmSourceFile(llvm::SourceMgr const&, mlir::Block*, mlir::ParserConfig const&, mlir::AsmParserState*, mlir::AsmParserCodeCompleteContext*) (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x69b7108)
#25 0x000000000424207f mlir::parseSourceFile(std::shared_ptr<llvm::SourceMgr> const&, mlir::Block*, mlir::ParserConfig const&, mlir::LocationAttr*) (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x424207f)
#26 0x0000000004240f8e mlir::parseSourceFileForTool(std::shared_ptr<llvm::SourceMgr> const&, mlir::ParserConfig const&, bool) (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x4240f8e)
#27 0x0000000004240793 performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#28 0x0000000004240503 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&)::$_3>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer> >, llvm::raw_ostream&) MlirOptMain.cpp:0:0
#29 0x00000000042ec4e8 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) (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x42ec4e8)
#30 0x000000000423a151 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer> >, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x423a151)
#31 0x000000000423a403 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x423a403)
#32 0x000000000423a612 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x423a612)
#33 0x000000000111a8d7 main (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x111a8d7)
#34 0x000070d97cb70d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#35 0x000070d97cb70e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#36 0x000000000111a435 _start (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x111a435)
Aborted (core dumped)
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs