llvm / llvm/torch-mlir

AtenReplicationPad2d lowering to linalg sometimes crashes

Open
#3,537 3 comments 0 reactions 1 assignee View on GitHub

@zjgarvey is already working on this.

Since Jul 12, 2024.

Dominant language
C++
Stars
1.9k
Forks
736
Avg merge
5d 22h
Merged PRs (30d)
15

Description

The torch to linalg lowering for this op implicitly assumes the non-padded dimensions are 1 without checking this explicitly.

Some sample IR to reproduce the error:

module {
  func.func @main(%arg0: !torch.vtensor<[2,3,4,5],f32>) -> !torch.vtensor<[2,3,10,9],f32> attributes {torch.onnx_meta.ir_version = 10 : si64, torch.onnx_meta.opset_version = 19 : si64, torch.onnx_meta.producer_name = "", torch.onnx_meta.producer_version = ""} {
    %int2 = torch.constant.int 2
    %int1 = torch.constant.int 1
    %int4 = torch.constant.int 4
    %int3 = torch.constant.int 3
    %0 = torch.prim.ListConstruct %int1, %int3, %int2, %int4 : (!torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int>
    %1 = torch.aten.replication_pad2d %arg0, %0 : !torch.vtensor<[2,3,4,5],f32>, !torch.list<int> -> !torch.vtensor<[2,3,10,9],f32>
    return %1 : !torch.vtensor<[2,3,10,9],f32>
  }
}

Running torch-mlir-opt --convert-torch-to-linalg will cause a crash when trying to infer a tensor::ConcatOp result type, since the slice dims being concatenated together only match if the non-pading dims of the input are one.

Stack Dump:

/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/optional:439: _Tp &std::_Optional_base_impl<mlir::SaturatedInteger, std::_Optional_base<mlir::SaturatedInteger, true, true>>::_M_get() [_Tp = mlir::SaturatedInteger, _Dp = std::_Optional_base<mlir::SaturatedInteger, true, true>]: Assertion 'this->_M_is_engaged()' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: torch-mlir-opt --convert-torch-to-linalg padtest.mlir
 #0 0x00005564cd9cb6b7 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/zjgar/code/torch-mlir/externals/llvm-project/llvm/lib/Support/Unix/Signals.inc:723:13
 #1 0x00005564cd9c97e0 llvm::sys::RunSignalHandlers() /home/zjgar/code/torch-mlir/externals/llvm-project/llvm/lib/Support/Signals.cpp:106:18
 #2 0x00005564cd9cbd5a SignalHandler(int) /home/zjgar/code/torch-mlir/externals/llvm-project/llvm/lib/Support/Unix/Signals.inc:413:1
 #3 0x00007f2958e36520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #4 0x00007f2958e8a9fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #5 0x00007f2958e36476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #6 0x00007f2958e1c7f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #7 0x00005564cc4c2baf (/home/zjgar/code/torch-mlir/build/bin/torch-mlir-opt+0x176baf)
 #8 0x00005564cd66fda5 mlir::TypeStorage::getAbstractType() /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/include/mlir/IR/TypeSupport.h:173:5
 #9 0x00005564cd66fda5 mlir::Type::getTypeID() /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/include/mlir/IR/Types.h:117:37
#10 0x00005564cd66fda5 bool mlir::detail::StorageUserBase<mlir::RankedTensorType, mlir::TensorType, mlir::detail::RankedTensorTypeStorage, mlir::detail::TypeUniquer, mlir::ShapedType::Trait>::classof<mlir::Type>(mlir::Type) /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/include/mlir/IR/StorageUniquerSupport.h:114:16
#11 0x00005564cd66fda5 llvm::CastInfo<mlir::RankedTensorType, mlir::Type const, void>::isPossible(mlir::Type) /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/include/mlir/IR/Types.h:417:14
#12 0x00005564cd66fda5 bool llvm::isa<mlir::RankedTensorType, mlir::Type>(mlir::Type const&) /home/zjgar/code/torch-mlir/externals/llvm-project/llvm/include/llvm/Support/Casting.h:549:10
#13 0x00005564cd66fda5 decltype(auto) llvm::cast<mlir::RankedTensorType, mlir::Type>(mlir::Type&) /home/zjgar/code/torch-mlir/externals/llvm-project/llvm/include/llvm/Support/Casting.h:572:3
#14 0x00005564cd66fda5 mlir::tensor::ConcatOp::inferResultType(long, mlir::TypeRange)::$_1::operator()(mlir::Type) const /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp:526:16
#15 0x00005564cd66fda5 decltype(auto) llvm::callable_detail::Callable<mlir::tensor::ConcatOp::inferResultType(long, mlir::TypeRange)::$_1, false>::operator()<mlir::Type, 0>(mlir::Type&&) const /home/zjgar/code/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLExtras.h:250:12
#16 0x00005564cd66fda5 llvm::mapped_iterator<llvm::detail::indexed_accessor_range_base<mlir::TypeRange, llvm::PointerUnion<mlir::Value const*, mlir::Type const*, mlir::OpOperand*, mlir::detail::OpResultImpl*>, mlir::Type, mlir::Type, mlir::Type>::iterator, mlir::tensor::ConcatOp::inferResultType(long, mlir::TypeRange)::$_1, mlir::RankedTensorType>::operator*() const /home/zjgar/code/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLExtras.h:363:42
#17 0x00005564cd66fda5 mlir::RankedTensorType* std::__uninitialized_copy<false>::__uninit_copy<llvm::mapped_iterator<llvm::detail::indexed_accessor_range_base<mlir::TypeRange, llvm::PointerUnion<mlir::Value const*, mlir::Type const*, mlir::OpOperand*, mlir::detail::OpResultImpl*>, mlir::Type, mlir::Type, mlir::Type>::iterator, mlir::tensor::ConcatOp::inferResultType(long, mlir::TypeRange)::$_1, mlir::RankedTensorType>, mlir::RankedTensorType*>(llvm::mapped_iterator<llvm::detail::indexed_accessor_range_base<mlir::TypeRange, llvm::PointerUnion<mlir::Value const*, mlir::Type const*, mlir::OpOperand*, mlir::detail::OpResultImpl*>, mlir::Type, mlir::Type, mlir::Type>::iterator, mlir::tensor::ConcatOp::inferResultType(long, mlir::TypeRange)::$_1, mlir::RankedTensorType>, llvm::mapped_iterator<llvm::detail::indexed_accessor_range_base<mlir::TypeRange, llvm::PointerUnion<mlir::Value const*, mlir::Type const*, mlir::OpOperand*, mlir::detail::OpResultImpl*>, mlir::Type, mlir::Type, mlir::Type>::iterator, mlir::tensor::ConcatOp::inferResultType(long, mlir::TypeRange)::$_1, mlir::RankedTensorType>, mlir::RankedTensorType*) /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_uninitialized.h:92:45
#18 0x00005564cd66fda5 mlir::RankedTensorType* std::uninitialized_copy<llvm::mapped_iterator<llvm::detail::indexed_accessor_range_base<mlir::TypeRange, llvm::PointerUnion<mlir::Value const*, mlir::Type const*, mlir::OpOperand*, mlir::detail::OpResultImpl*>, mlir::Type, mlir::Type, mlir::Type>::iterator, mlir::tensor::ConcatOp::inferResultType(long, mlir::TypeRange)::$_1, mlir::RankedTensorType>, mlir::RankedTensorType*>(llvm::mapped_iterator<llvm::detail::indexed_accessor_range_base<mlir::TypeRange, llvm::PointerUnion<mlir::Value const*, mlir::Type const*, mlir::OpOperand*, mlir::detail::OpResultImpl*>, mlir::Type, mlir::Type, mlir::Type>::iterator, mlir::tensor::ConcatOp::inferResultType(long, mlir::TypeRange)::$_1, mlir::RankedTensorType>, llvm::mapped_iterator<llvm::detail::indexed_accessor_range_base<mlir::TypeRange, llvm::PointerUnion<mlir::Value const*, mlir::Type const*, mlir::OpOperand*, mlir::detail::OpResultImpl*>, mlir::Type, mlir::Type, mlir::Type>::iterator, mlir::tensor::ConcatOp::inferResultType(long, mlir::TypeRange)::$_1, mlir::RankedTensorType>, mlir::RankedTensorType*) /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_uninitialized.h:148:14
#19 0x00005564cd66fda5 void llvm::SmallVectorTemplateBase<mlir::RankedTensorType, true>::uninitialized_copy<llvm::mapped_iterator<llvm::detail::indexed_accessor_range_base<mlir::TypeRange, llvm::PointerUnion<mlir::Value const*, mlir::Type const*, mlir::OpOperand*, mlir::detail::OpResultImpl*>, mlir::Type, mlir::Type, mlir::Type>::iterator, mlir::tensor::ConcatOp::inferResultType(long, mlir::TypeRange)::$_1, mlir::RankedTensorType>, mlir::RankedTensorType*>(llvm::mapped_iterator<llvm::detail::indexed_accessor_range_base<mlir::TypeRange, llvm::PointerUnion<mlir::Value const*, mlir::Type const*, mlir::OpOperand*, mlir::detail::OpResultImpl*>, mlir::Type, mlir::Type, mlir::Type>::iterator, mlir::tensor::ConcatOp::inferResultType(long, mlir::TypeRange)::$_1, mlir::RankedTensorType>, llvm::mapped_iterator<llvm::detail::indexed_accessor_range_base<mlir::TypeRange, llvm::PointerUnion<mlir::Value const*, mlir::Type const*, mlir::OpOperand*, mlir::detail::OpResultImpl*>, mlir::Type, mlir::Type, mlir::Type>::iterator, mlir::tensor::ConcatOp::inferResultType(long, mlir::TypeRange)::$_1, mlir::RankedTensorType>, mlir::RankedTensorType*) /home/zjgar/code/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/SmallVector.h:518:5
#20 0x00005564cd66fda5 void llvm::SmallVectorImpl<mlir::RankedTensorType>::append<llvm::mapped_iterator<llvm::detail::indexed_accessor_range_base<mlir::TypeRange, llvm::PointerUnion<mlir::Value const*, mlir::Type const*, mlir::OpOperand*, mlir::detail::OpResultImpl*>, mlir::Type, mlir::Type, mlir::Type>::iterator, mlir::tensor::ConcatOp::inferResultType(long, mlir::TypeRange)::$_1, mlir::RankedTensorType>, void>(llvm::mapped_iterator<llvm::detail::indexed_accessor_range_base<mlir::TypeRange, llvm::PointerUnion<mlir::Value const*, mlir::Type const*, mlir::OpOperand*, mlir::detail::OpResultImpl*>, mlir::Type, mlir::Type, mlir::Type>::iterator, mlir::tensor::ConcatOp::inferResultType(long, mlir::TypeRange)::$_1, mlir::RankedTensorType>, llvm::mapped_iterator<llvm::detail::indexed_accessor_range_base<mlir::TypeRange, llvm::PointerUnion<mlir::Value const*, mlir::Type const*, mlir::OpOperand*, mlir::detail::OpResultImpl*>, mlir::Type, mlir::Type, mlir::Type>::iterator, mlir::tensor::ConcatOp::inferResultType(long, mlir::TypeRange)::$_1, mlir::RankedTensorType>) /home/zjgar/code/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/SmallVector.h:700:5
#21 0x00005564cd66fda5 llvm::SmallVector<mlir::RankedTensorType, 4u>::SmallVector<llvm::mapped_iterator<llvm::detail::indexed_accessor_range_base<mlir::TypeRange, llvm::PointerUnion<mlir::Value const*, mlir::Type const*, mlir::OpOperand*, mlir::detail::OpResultImpl*>, mlir::Type, mlir::Type, mlir::Type>::iterator, mlir::tensor::ConcatOp::inferResultType(long, mlir::TypeRange)::$_1, mlir::RankedTensorType>, void>(llvm::mapped_iterator<llvm::detail::indexed_accessor_range_base<mlir::TypeRange, llvm::PointerUnion<mlir::Value const*, mlir::Type const*, mlir::OpOperand*, mlir::detail::OpResultImpl*>, mlir::Type, mlir::Type, mlir::Type>::iterator, mlir::tensor::ConcatOp::inferResultType(long, mlir::TypeRange)::$_1, mlir::RankedTensorType>, llvm::mapped_iterator<llvm::detail::indexed_accessor_range_base<mlir::TypeRange, llvm::PointerUnion<mlir::Value const*, mlir::Type const*, mlir::OpOperand*, mlir::detail::OpResultImpl*>, mlir::Type, mlir::Type, mlir::Type>::iterator, mlir::tensor::ConcatOp::inferResultType(long, mlir::TypeRange)::$_1, mlir::RankedTensorType>) /home/zjgar/code/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/SmallVector.h:1230:11
#22 0x00005564cd66fda5 llvm::SmallVector<std::remove_const<std::remove_reference<decltype(*std::begin(std::declval<llvm::iterator_range<llvm::mapped_iterator<llvm::detail::indexed_accessor_range_base<mlir::TypeRange, llvm::PointerUnion<mlir::Value const*, mlir::Type const*, mlir::OpOperand*, mlir::detail::OpResultImpl*>, mlir::Type, mlir::Type, mlir::Type>::iterator, mlir::tensor::ConcatOp::inferResultType(long, mlir::TypeRange)::$_1, mlir::RankedTensorType>>&>()))>::type>::type, 4u> llvm::to_vector<4u, llvm::iterator_range<llvm::mapped_iterator<llvm::detail::indexed_accessor_range_base<mlir::TypeRange, llvm::PointerUnion<mlir::Value const*, mlir::Type const*, mlir::OpOperand*, mlir::detail::OpResultImpl*>, mlir::Type, mlir::Type, mlir::Type>::iterator, mlir::tensor::ConcatOp::inferResultType(long, mlir::TypeRange)::$_1, mlir::RankedTensorType>>>(llvm::iterator_range<llvm::mapped_iterator<llvm::detail::indexed_accessor_range_base<mlir::TypeRange, llvm::PointerUnion<mlir::Value const*, mlir::Type const*, mlir::OpOperand*, mlir::detail::OpResultImpl*>, mlir::Type, mlir::Type, mlir::Type>::iterator, mlir::tensor::ConcatOp::inferResultType(long, mlir::TypeRange)::$_1, mlir::RankedTensorType>>&&) /home/zjgar/code/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/SmallVector.h:1313:10
#23 0x00005564cd66fda5 mlir::tensor::ConcatOp::inferResultType(long, mlir::TypeRange) /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp:525:7
#24 0x00005564cd66ff26 mlir::tensor::ConcatOp::build(mlir::OpBuilder&, mlir::OperationState&, long, mlir::ValueRange) /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp:555:44
#25 0x00005564cc9cce03 mlir::tensor::ConcatOp mlir::OpBuilder::create<mlir::tensor::ConcatOp, long&, llvm::SmallVector<mlir::Value, 6u>&>(mlir::Location, long&, llvm::SmallVector<mlir::Value, 6u>&) /home/zjgar/code/torch-mlir/externals/llvm-project/llvm/../mlir/include/mlir/IR/Builders.h:512:16
#26 0x00005564cc9cc14b mlir::Operation::getOpResultImpl(unsigned int) /home/zjgar/code/torch-mlir/externals/llvm-project/llvm/../mlir/include/mlir/IR/Operation.h:1006:5
#27 0x00005564cc9cc14b mlir::Operation::getResult(unsigned int) /home/zjgar/code/torch-mlir/externals/llvm-project/llvm/../mlir/include/mlir/IR/Operation.h:402:54
#28 0x00005564cc9cc14b mlir::OpTrait::OneTypedResult<mlir::RankedTensorType>::Impl<mlir::tensor::ConcatOp>::getResult() /home/zjgar/code/torch-mlir/externals/llvm-project/llvm/../mlir/include/mlir/IR/OpDefinition.h:699:33
#29 0x00005564cc9cc14b mlir::OpTrait::OneTypedResult<mlir::RankedTensorType>::Impl<mlir::tensor::ConcatOp>::operator mlir::detail::TypedValue<mlir::RankedTensorType>() /home/zjgar/code/torch-mlir/externals/llvm-project/llvm/../mlir/include/mlir/IR/OpDefinition.h:704:54
#30 0x00005564cc9cc14b (anonymous namespace)::ConvertAtenReplicationPad2dOp::matchAndRewrite(mlir::torch::Torch::AtenReplicationPad2dOp, mlir::torch::Torch::AtenReplicationPad2dOpAdaptor, mlir::ConversionPatternRewriter&) const /home/zjgar/code/torch-mlir/lib/Conversion/TorchToLinalg/TensorConstructors.cpp:307:18
#31 0x00005564cc9ca77d mlir::OpConversionPattern<mlir::torch::Torch::AtenReplicationPad2dOp>::matchAndRewrite(mlir::Operation*, llvm::ArrayRef<mlir::Value>, mlir::ConversionPatternRewriter&) const /home/zjgar/code/torch-mlir/externals/llvm-project/llvm/../mlir/include/mlir/Transforms/DialectConversion.h:541:3
#32 0x00005564cd4cfdab mlir::ConversionPattern::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&) const /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:1765:10
#33 0x00005564cd503f97 mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<mlir::LogicalResult (mlir::Pattern const&)>)::$_2::operator()() const /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/lib/Rewrite/PatternApplicator.cpp:212:13
#34 0x00005564cd503f97 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<mlir::LogicalResult (mlir::Pattern const&)>)::$_2>(long) /home/zjgar/code/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45:12
#35 0x00005564cd500e7f mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<mlir::LogicalResult (mlir::Pattern const&)>) /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/lib/Rewrite/PatternApplicator.cpp:233:9
#36 0x00005564cd4d0c11 (anonymous namespace)::OperationLegalizer::legalize(mlir::Operation*, mlir::ConversionPatternRewriter&) /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:0:0
#37 0x00005564cd4cfe37 mlir::OperationConverter::convert(mlir::ConversionPatternRewriter&, mlir::Operation*) /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:0:0
#38 0x00005564cd4d0e3f mlir::LogicalResult::failed() const /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/include/mlir/Support/LogicalResult.h:44:33
#39 0x00005564cd4d0e3f mlir::failed(mlir::LogicalResult) /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/include/mlir/Support/LogicalResult.h:72:58
#40 0x00005564cd4d0e3f mlir::OperationConverter::convertOperations(llvm::ArrayRef<mlir::Operation*>) /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:2551:9
#41 0x00005564cd4d6bcb mlir::applyPartialConversion(llvm::ArrayRef<mlir::Operation*>, mlir::ConversionTarget const&, mlir::FrozenRewritePatternSet const&, mlir::ConversionConfig) /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:3521:22
#42 0x00005564cd4d6bcb mlir::applyPartialConversion(mlir::Operation*, mlir::ConversionTarget const&, mlir::FrozenRewritePatternSet const&, mlir::ConversionConfig) /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:3527:10
#43 0x00005564cc91c68b (anonymous namespace)::ConvertTorchToLinalg::runOnOperation() /home/zjgar/code/torch-mlir/lib/Conversion/TorchToLinalg/TorchToLinalg.cpp:85:16
#44 0x00005564cd54d9f4 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int)::$_7::operator()() const /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:0:17
#45 0x00005564cd54d9f4 void llvm::function_ref<void ()>::callback_fn<mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int)::$_7>(long) /home/zjgar/code/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45:12
#46 0x00005564cd54d9f4 llvm::function_ref<void ()>::operator()() const /home/zjgar/code/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68:12
#47 0x00005564cd54d9f4 void mlir::MLIRContext::executeAction<mlir::PassExecutionAction, mlir::Pass&>(llvm::function_ref<void ()>, llvm::ArrayRef<mlir::IRUnit>, mlir::Pass&) /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/include/mlir/IR/MLIRContext.h:275:7
#48 0x00005564cd54d9f4 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:521:21
#49 0x00005564cd54e061 mlir::LogicalResult::failed() const /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/include/mlir/Support/LogicalResult.h:44:33
#50 0x00005564cd54e061 mlir::failed(mlir::LogicalResult) /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/include/mlir/Support/LogicalResult.h:72:58
#51 0x00005564cd54e061 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:593:9
#52 0x00005564cd55362b mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::$_15::operator()(mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo&) const /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:818:5
#53 0x00005564cd54f4db mlir::LogicalResult::failed() const /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/include/mlir/Support/LogicalResult.h:44:33
#54 0x00005564cd54f4db mlir::failed(mlir::LogicalResult) /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/include/mlir/Support/LogicalResult.h:72:58
#55 0x00005564cd54f4db mlir::LogicalResult mlir::failableParallelForEach<__gnu_cxx::__normal_iterator<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*, std::vector<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo, std::allocator<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo>>>, mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::$_15&>(mlir::MLIRContext*, __gnu_cxx::__normal_iterator<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*, std::vector<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo, std::allocator<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo>>>, __gnu_cxx::__normal_iterator<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*, std::vector<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo, std::allocator<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo>>>, mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::$_15&) /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/include/mlir/IR/Threading.h:46:11
#56 0x00005564cd54f4db mlir::LogicalResult mlir::failableParallelForEach<std::vector<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo, std::allocator<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo>>&, mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::$_15&>(mlir::MLIRContext*, std::vector<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo, std::allocator<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo>>&, mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::$_15&) /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/include/mlir/IR/Threading.h:92:10
#57 0x00005564cd54f4db mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool) /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:823:14
#58 0x00005564cd54db92 mlir::detail::OpToOpPassAdaptor::runOnOperation(bool) /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:0:5
#59 0x00005564cd54db92 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int)::$_7::operator()() const /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:525:20
#60 0x00005564cd54db92 void llvm::function_ref<void ()>::callback_fn<mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int)::$_7>(long) /home/zjgar/code/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45:12
#61 0x00005564cd54db92 llvm::function_ref<void ()>::operator()() const /home/zjgar/code/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68:12
#62 0x00005564cd54db92 void mlir::MLIRContext::executeAction<mlir::PassExecutionAction, mlir::Pass&>(llvm::function_ref<void ()>, llvm::ArrayRef<mlir::IRUnit>, mlir::Pass&) /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/include/mlir/IR/MLIRContext.h:275:7
#63 0x00005564cd54db92 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:521:21
#64 0x00005564cd5503f3 mlir::LogicalResult::failed() const /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/include/mlir/Support/LogicalResult.h:44:33
#65 0x00005564cd5503f3 mlir::failed(mlir::LogicalResult) /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/include/mlir/Support/LogicalResult.h:72:58
#66 0x00005564cd5503f3 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:593:9
#67 0x00005564cd5503f3 mlir::PassManager::runPasses(mlir::Operation*, mlir::AnalysisManager) /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:904:10
#68 0x00005564cd5503f3 mlir::PassManager::run(mlir::Operation*) /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:884:60
#69 0x00005564cc4c84b7 mlir::LogicalResult::failed() const /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/include/mlir/Support/LogicalResult.h:44:33
#70 0x00005564cc4c84b7 mlir::failed(mlir::LogicalResult) /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/include/mlir/Support/LogicalResult.h:72:58
#71 0x00005564cc4c84b7 performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:409:7
#72 0x00005564cc4c8124 processBuffer(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::MlirOptMainConfig const&, mlir::DialectRegistry&, llvm::ThreadPoolInterface*) /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:474:12
#73 0x00005564cc4c8124 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&)::$_3::operator()(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) const /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:549:12
#74 0x00005564cc4c8124 mlir::LogicalResult llvm::function_ref<mlir::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&) /home/zjgar/code/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45:12
#75 0x00005564cd96c1a9 llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::operator()(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) const /home/zjgar/code/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68:12
#76 0x00005564cd96c1a9 mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/lib/Support/ToolUtilities.cpp:28:12
#77 0x00005564cc4c1c1c mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:552:10
#78 0x00005564cc4c1ec0 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:590:14
#79 0x00005564cc4c21b2 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) /home/zjgar/code/torch-mlir/externals/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:606:10
#80 0x00005564cc4c06b0 main /home/zjgar/code/torch-mlir/tools/torch-mlir-opt/torch-mlir-opt.cpp:49:33
#81 0x00007f2958e1dd90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#82 0x00007f2958e1de40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#83 0x00005564cc4c02e5 _start (/home/zjgar/code/torch-mlir/build/bin/torch-mlir-opt+0x1742e5)
Aborted

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.