| Issue |
203219
|
| Summary |
[mlir] <unknown>:0: error: vector types must have positive constant sizes but got -9223372036854775808
|
| Labels |
mlir
|
| Assignees |
|
| Reporter |
Anonymous7i0em3yd
|
git version: aec0da1e9455356a32ec797430794025628b4210
system: `Ubuntu 18.04.6 LTS`
reproduce with: `mlir-opt -xegpu-blocking a.mlir`
a.mlir:
```mlir
module {
func.func private @scf_for_yield_non_equivalent(%arg0: tensor<?xf32>, %arg1: tensor<?xf32> {bufferization.writable = true}, %arg2: tensor<5xf32>, %arg3: index, %arg4: index, %arg5: index) -> (f32, f32) {
%0:3 = scf.while (%arg6 = %arg3, %arg7 = %arg0, %arg8 = %arg1) : (index, tensor<?xf32>, tensor<?xf32>) -> (index, tensor<?xf32>, tensor<?xf32>) {
%1 = arith.cmpi slt, %arg6, %arg4 : index
scf.condition(%1) %arg6, %arg8, %arg7 : index, tensor<?xf32>, tensor<?xf32>
} do {
^bb0(%arg6: index, %arg7: tensor<?xf32>, %arg8: tensor<?xf32>):
%1 = arith.addi %arg6, %arg5 : index
%inserted_slice = tensor.insert_slice %arg2 into %arg7[0] [5] [1] : tensor<5xf32> into tensor<?xf32>
%inserted_slice_1 = tensor.insert_slice %arg2 into %arg8[0] [5] [1] : tensor<5xf32> into tensor<?xf32>
scf.yield %1, %inserted_slice_1, %inserted_slice : index, tensor<?xf32>, tensor<?xf32>
}
%extracted = tensor.extract %0#1[%arg5] : tensor<?xf32>
%extracted_0 = tensor.extract %0#2[%arg5] : tensor<?xf32>
return %extracted, %extracted_0 : f32, f32
}
}
```
stack trace:
```
<unknown>:0: error: vector types must have positive constant sizes but got -9223372036854775808
mlir-opt: /data/szy/MLIR/llvm-release/llvm-project/mlir/include/mlir/IR/StorageUniquerSupport.h:180: static ConcreteT mlir::detail::StorageUserBase<mlir::VectorType, mlir::Type, mlir::detail::VectorTypeStorage, mlir::detail::TypeUniquer, mlir::ShapedType::Trait, mlir::ValueSemantics>::get(MLIRContext *, Args &&...) [ConcreteT = mlir::VectorType, BaseT = mlir::Type, StorageT = mlir::detail::VectorTypeStorage, UniquerT = mlir::detail::TypeUniquer, Traits = <mlir::ShapedType::Trait, mlir::ValueSemantics>, Args = <llvm::ArrayRef<long> &, mlir::Type &, llvm::ArrayRef<bool> &>]: 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 and instructions to reproduce the bug.
Stack dump:
0. Program arguments: /data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt -xegpu-blocking 5.mlir
#0 0x0000555a5d654658 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x1fda658)
#1 0x0000555a5d6514f1 llvm::sys::RunSignalHandlers() (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x1fd74f1)
#2 0x0000555a5d655776 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
#3 0x00007f5086823420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
#4 0x00007f5085e6000b raise /build/glibc-LcI20x/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
#5 0x00007f5085e3f859 abort /build/glibc-LcI20x/glibc-2.31/stdlib/abort.c:81:7
#6 0x00007f5085e3f729 get_sysdep_segment_value /build/glibc-LcI20x/glibc-2.31/intl/loadmsgcat.c:509:8
#7 0x00007f5085e3f729 _nl_load_domain /build/glibc-LcI20x/glibc-2.31/intl/loadmsgcat.c:970:34
#8 0x00007f5085e50fd6 (/lib/x86_64-linux-gnu/libc.so.6+0x33fd6)
#9 0x0000555a6621ab37 (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xaba0b37)
#10 0x0000555a6621a9e8 mlir::VectorType::get(llvm::ArrayRef<long>, mlir::Type, llvm::ArrayRef<bool>) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xaba09e8)
#11 0x0000555a61e711f9 std::_Function_handler<std::optional<llvm::LogicalResult> (llvm::PointerUnion<mlir::Type, mlir::Value>, llvm::SmallVectorImpl<mlir::Type>&), std::enable_if<std::is_invocable_v<(anonymous namespace)::XeGPUBlockingPass::runOnOperation()::$_1, mlir::RankedTensorType, llvm::SmallVectorImpl<mlir::Type>&> && std::is_base_of_v<mlir::Type, mlir::RankedTensorType>, std::function<std::optional<llvm::LogicalResult> (llvm::PointerUnion<mlir::Type, mlir::Value>, llvm::SmallVectorImpl<mlir::Type>&)>>::type mlir::TypeConverter::wrapCallback<mlir::RankedTensorType, (anonymous namespace)::XeGPUBlockingPass::runOnOperation()::$_1>((anonymous namespace)::XeGPUBlockingPass::runOnOperation()::$_1&&) const::'lambda'(llvm::PointerUnion<mlir::Type, mlir::Value>, llvm::SmallVectorImpl<mlir::Type>&)>::_M_invoke(std::_Any_data const&, llvm::PointerUnion<mlir::Type, mlir::Value>&&, llvm::SmallVectorImpl<mlir::Type>&) XeGPUBlocking.cpp:0:0
#12 0x0000555a65edc9d4 mlir::TypeConverter::convertTypeImpl(llvm::PointerUnion<mlir::Type, mlir::Value>, llvm::SmallVectorImpl<mlir::Type>&) const (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xa8629d4)
#13 0x0000555a65edd00b mlir::TypeConverter::isLegal(mlir::Value) const (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xa86300b)
#14 0x0000555a6376913b llvm::detail::indexed_accessor_range_base<mlir::ValueRange, llvm::PointerUnion<mlir::Value const*, mlir::OpOperand*, mlir::detail::OpResultImpl*, llvm::Repeated<mlir::Value> const*>, mlir::Value, mlir::Value, mlir::Value>::iterator std::__find_if<llvm::detail::indexed_accessor_range_base<mlir::ValueRange, llvm::PointerUnion<mlir::Value const*, mlir::OpOperand*, mlir::detail::OpResultImpl*, llvm::Repeated<mlir::Value> const*>, mlir::Value, mlir::Value, mlir::Value>::iterator, __gnu_cxx::__ops::_Iter_negate<mlir::TypeConverter::isLegal(mlir::ValueRange) const::'lambda'(mlir::Value)>>(llvm::detail::indexed_accessor_range_base<mlir::ValueRange, llvm::PointerUnion<mlir::Value const*, mlir::OpOperand*, mlir::detail::OpResultImpl*, llvm::Repeated<mlir::Value> const*>, mlir::Value, mlir::Value, mlir::Value>::iterator, llvm::detail::indexed_accessor_range_base<mlir::ValueRange, llvm::PointerUnion<mlir::Value const*, mlir::OpOperand*, mlir::detail::OpResultImpl*, llvm::Repeated<mlir::Value> const*>, mlir::Value, mlir::Value, mlir::Value>::iterator, __gnu_cxx::__ops::_Iter_negate<mlir::TypeConverter::isLegal(mlir::ValueRange) const::'lambda'(mlir::Value)>, std::random_access_iterator_tag) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x80ef13b)
#15 0x0000555a65edd0ba mlir::TypeConverter::isLegal(mlir::Operation*) const (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xa8630ba)
#16 0x0000555a63e7964c std::_Function_handler<std::optional<bool> (mlir::Operation*), mlir::scf::populateSCFStructuralTypeConversionTarget(mlir::TypeConverter const&, mlir::ConversionTarget&)::$_2>::_M_invoke(std::_Any_data const&, mlir::Operation*&&) StructuralTypeConversions.cpp:0:0
#17 0x0000555a65ede81e mlir::ConversionTarget::isLegal(mlir::Operation*) const (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xa86481e)
#18 0x0000555a65eefe3f mlir::WalkResult llvm::function_ref<mlir::WalkResult (mlir::Operation*)>::callback_fn<llvm::LogicalResult mlir::OperationConverter::legalizeOperations<mlir::OperationConverter::applyConversion(llvm::ArrayRef<mlir::Operation*>)::$_0>(llvm::ArrayRef<mlir::Operation*>, mlir::OperationConverter::applyConversion(llvm::ArrayRef<mlir::Operation*>)::$_0, bool)::'lambda'(mlir::Operation*)>(long, mlir::Operation*) DialectConversion.cpp:0:0
#19 0x0000555a65ee686b mlir::WalkResult mlir::detail::walk<mlir::ForwardDominanceIterator<false>>(mlir::Operation*, llvm::function_ref<mlir::WalkResult (mlir::Operation*)>, mlir::WalkOrder) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xa86c86b)
#20 0x0000555a65ee6767 mlir::WalkResult mlir::detail::walk<mlir::ForwardDominanceIterator<false>>(mlir::Operation*, llvm::function_ref<mlir::WalkResult (mlir::Operation*)>, mlir::WalkOrder) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xa86c767)
#21 0x0000555a65ee6767 mlir::WalkResult mlir::detail::walk<mlir::ForwardDominanceIterator<false>>(mlir::Operation*, llvm::function_ref<mlir::WalkResult (mlir::Operation*)>, mlir::WalkOrder) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xa86c767)
#22 0x0000555a65eda479 mlir::OperationConverter::applyConversion(llvm::ArrayRef<mlir::Operation*>) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xa860479)
#23 0x0000555a65ee8669 void llvm::function_ref<void ()>::callback_fn<applyConversion(llvm::ArrayRef<mlir::Operation*>, mlir::ConversionTarget const&, mlir::FrozenRewritePatternSet const&, mlir::ConversionConfig, (anonymous namespace)::OpConversionMode)::$_0>(long) DialectConversion.cpp:0:0
#24 0x0000555a65edf7a7 applyConversion(llvm::ArrayRef<mlir::Operation*>, mlir::ConversionTarget const&, mlir::FrozenRewritePatternSet const&, mlir::ConversionConfig, (anonymous namespace)::OpConversionMode) DialectConversion.cpp:0:0
#25 0x0000555a65edf88b mlir::applyPartialConversion(mlir::Operation*, mlir::ConversionTarget const&, mlir::FrozenRewritePatternSet const&, mlir::ConversionConfig) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xa86588b)
#26 0x0000555a61edf983 mlir::xegpu::doSCFStructuralTypeConversionWithTensorType(mlir::Operation*, mlir::TypeConverter) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x6865983)
#27 0x0000555a61e708fa (anonymous namespace)::XeGPUBlockingPass::runOnOperation() XeGPUBlocking.cpp:0:0
#28 0x0000555a65f80f42 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)
#29 0x0000555a65f81d84 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)
#30 0x0000555a65f88c9a mlir::PassManager::runPasses(mlir::Operation*, mlir::AnalysisManager) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xa90ec9a)
#31 0x0000555a65f885cf mlir::PassManager::run(mlir::Operation*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xa90e5cf)
#32 0x0000555a5d70656b performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#33 0x0000555a5d7057a6 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
#34 0x0000555a662d5815 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)
#35 0x0000555a5d6fb3a6 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)
#36 0x0000555a5d6fb785 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x2081785)
#37 0x0000555a5d6fbae5 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x2081ae5)
#38 0x0000555a5d63a0e2 main (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x1fc00e2)
#39 0x00007f5085e41083 __libc_start_main /build/glibc-LcI20x/glibc-2.31/csu/../csu/libc-start.c:342:3
#40 0x0000555a5d639c1e _start (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x1fbfc1e)
Aborted (core dumped)
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs