Issue 202554
Summary [mlir] LLVM ERROR: vector.to_elements created with unregistered dialect.
Labels mlir
Assignees
Reporter Anonymous7i0em3yd
    git version: aec0da1e9455356a32ec797430794025628b4210

system: `Ubuntu 18.04.6 LTS`

reproduce with: `mlir-opt  --convert-math-to-apfloat a.mlir`

a.mlir:  

```
module {
  func.func @fma_caller(%arg0: vector<8xf64>, %arg1: vector<8xf64>, %arg2: vector<8xf64>) -> vector<8xf64> {
    %0 = math.fma %arg0, %arg1, %arg2 : vector<8xf64>
    return %0 : vector<8xf64>
  }
}



```

stack trace:

```
LLVM ERROR: vector.to_elements created with unregistered dialect. If this is intended, please call allowUnregisteredDialects() on the MLIRContext, or use -allow-unregistered-dialect with the MLIR tool used.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
Stack dump:
0.      Program arguments: /data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt --convert-math-to-apfloat /data/wwy/work/mlir/a.mlir
 #0 0x0000557307c8a658 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x1fda658)
 #1 0x0000557307c874f1 llvm::sys::RunSignalHandlers() (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x1fd74f1)
 #2 0x0000557307c8b776 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #3 0x00007f30e4b4f420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
 #4 0x00007f30e418c00b raise /build/glibc-LcI20x/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
 #5 0x00007f30e416b859 abort /build/glibc-LcI20x/glibc-2.31/stdlib/abort.c:81:7
 #6 0x0000557307c705f8 llvm::report_fatal_error(llvm::Twine const&, bool) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x1fc05f8)
 #7 0x00005573108cab59 (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xac1ab59)
 #8 0x00005573108ca2cb mlir::Operation::create(mlir::Location, mlir::OperationName, mlir::TypeRange, mlir::ValueRange, mlir::DictionaryAttr, mlir::PropertyRef, mlir::BlockRange, unsigned int) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xac1a2cb)
 #9 0x00005573108c9de7 mlir::Operation::create(mlir::Location, mlir::OperationName, mlir::TypeRange, mlir::ValueRange, mlir::NamedAttrList&&, mlir::PropertyRef, mlir::BlockRange, mlir::RegionRange) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xac19de7)
#10 0x00005573108c9ca5 mlir::Operation::create(mlir::OperationState const&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xac19ca5)
#11 0x000055731080c590 mlir::OpBuilder::create(mlir::OperationState const&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xab5c590)
#12 0x000055730eea5682 mlir::vector::ToElementsOp::create(mlir::OpBuilder&, mlir::Location, mlir::Value) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x91f5682)
#13 0x000055730964d54e FmaOpToAPFloatConversion::matchAndRewrite(mlir::math::FmaOp, mlir::PatternRewriter&) const (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x399d54e)
#14 0x000055731055bb3d void llvm::function_ref<void ()>::callback_fn<mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<llvm::LogicalResult (mlir::Pattern const&)>)::$_0>(long) PatternApplicator.cpp:0:0
#15 0x000055731055849a mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<llvm::LogicalResult (mlir::Pattern const&)>) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xa8a849a)
#16 0x0000557310553a5d void llvm::function_ref<void ()>::callback_fn<mlir::walkAndApplyPatterns(mlir::Operation*, mlir::FrozenRewritePatternSet const&, mlir::RewriterBase::Listener*)::$_2>(long) WalkPatternRewriteDriver.cpp:0:0
#17 0x0000557310552e01 mlir::walkAndApplyPatterns(mlir::Operation*, mlir::FrozenRewritePatternSet const&, mlir::RewriterBase::Listener*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xa8a2e01)
#18 0x0000557309649f29 (anonymous namespace)::MathToAPFloatConversionPass::runOnOperation() MathToAPFloat.cpp:0:0
#19 0x00005573105b6f42 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xa906f42)
#20 0x00005573105b7d84 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xa907d84)
#21 0x00005573105bec9a mlir::PassManager::runPasses(mlir::Operation*, mlir::AnalysisManager) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xa90ec9a)
#22 0x00005573105be5cf mlir::PassManager::run(mlir::Operation*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xa90e5cf)
#23 0x0000557307d3c56b performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#24 0x0000557307d3b7a6 llvm::LogicalResult llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::MemoryBufferRef const&, 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::MemoryBufferRef const&, llvm::raw_ostream&) MlirOptMain.cpp:0:0
#25 0x000055731090b815 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::MemoryBufferRef const&, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xac5b815)
#26 0x0000557307d313a6 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x20813a6)
#27 0x0000557307d31785 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x2081785)
#28 0x0000557307d31ae5 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x2081ae5)
#29 0x0000557307c700e2 main (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x1fc00e2)
#30 0x00007f30e416d083 __libc_start_main /build/glibc-LcI20x/glibc-2.31/csu/../csu/libc-start.c:342:3
#31 0x0000557307c6fc1e _start (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x1fbfc1e)
已放弃 (核心已转储)
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to