| Issue |
208198
|
| Summary |
[mlir][vector](test-emulate-narrow-int=memref-load-bitwidth=32) mlir-opt crashes at VectorEmulateNarrowType.cpp:1277 with assertion `subByteBits < 8 && "Not a sub-byte scalar type!"' failed
|
| Labels |
mlir
|
| Assignees |
|
| Reporter |
Aran-414
|
git version: e7195d5d23adf9336555e7244e2fcf397111c57e
MLIR Program:
```mlir
module {
func.func @m(%arg0: memref<4x?x16xf16>, %arg1: index, %arg2: index, %arg3: index) -> () {
%5 = llvm.mlir.constant(3.000000e+00 : f16) : f16
%27 = vector.transfer_read %arg0[%arg1, %arg2, %arg3], %5 : memref<4x?x16xf16>, vector<8xf16>
return
}
}
```
Reproduce Command: `mlir-opt --test-emulate-narrow-int=memref-load-bitwidth=32 --cse a.mlir`
StackTrace:
```
mlir-opt: /data2/dependency/dev/llvm-project/mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp:1277: bool {anonymous}::fitsInMultiByteContainerTy(mlir::VectorType, mlir::Type): Assertion `subByteBits < 8 && "Not a sub-byte scalar type!"' 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: /data2/dependency/dev/llvm-project/build/bin/mlir-opt --test-emulate-narrow-int=memref-load-bitwidth=32 a.mlir
#0 0x00005653335a23ff llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x256e3ff)
#1 0x000056533359ebdc llvm::sys::RunSignalHandlers() (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x256abdc)
#2 0x000056533359ed77 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
#3 0x00007f8f09cfa420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
#4 0x00007f8f097e500b raise (/lib/x86_64-linux-gnu/libc.so.6+0x4300b)
#5 0x00007f8f097c4859 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22859)
#6 0x00007f8f097c4729 (/lib/x86_64-linux-gnu/libc.so.6+0x22729)
#7 0x00007f8f097d5fd6 (/lib/x86_64-linux-gnu/libc.so.6+0x33fd6)
#8 0x000056533a5d5093 (anonymous namespace)::fitsInMultiByteContainerTy(mlir::VectorType, mlir::Type) VectorEmulateNarrowType.cpp:0:0
#9 0x000056533a5e31a6 (anonymous namespace)::ConvertVectorTransferRead::matchAndRewrite(mlir::vector::TransferReadOp, mlir::vector::TransferReadOpAdaptor, mlir::ConversionPatternRewriter&) const VectorEmulateNarrowType.cpp:0:0
#10 0x000056533a5e14a5 llvm::LogicalResult mlir::ConversionPattern::dispatchTo1To1<mlir::OpConversionPattern<mlir::vector::TransferReadOp>, mlir::vector::TransferReadOp>(mlir::OpConversionPattern<mlir::vector::TransferReadOp> const&, mlir::vector::TransferReadOp, mlir::vector::TransferReadOp::GenericAdaptor<llvm::ArrayRef<mlir::ValueRange>>, mlir::ConversionPatternRewriter&) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x95ad4a5)
#11 0x0000565334dbb4b1 mlir::OpConversionPattern<mlir::vector::TransferReadOp>::matchAndRewrite(mlir::Operation*, llvm::ArrayRef<mlir::ValueRange>, mlir::ConversionPatternRewriter&) const (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x3d874b1)
#12 0x000056533c3d5d38 mlir::ConversionPattern::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&) const (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb3a1d38)
#13 0x000056533c41c9a2 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&)>)::'lambda'()::operator()() const PatternApplicator.cpp:0:0
#14 0x000056533c41df08 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&)>) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb3e9f08)
#15 0x000056533c3d087b (anonymous namespace)::OperationLegalizer::legalize(mlir::Operation*) DialectConversion.cpp:0:0
#16 0x000056533c3d0d66 mlir::OperationConverter::convert(mlir::Operation*, bool) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb39cd66)
#17 0x000056533c3dbd3a mlir::OperationConverter::applyConversion(llvm::ArrayRef<mlir::Operation*>) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb3a7d3a)
#18 0x000056533c3dd5f8 applyConversion(llvm::ArrayRef<mlir::Operation*>, mlir::ConversionTarget const&, mlir::FrozenRewritePatternSet const&, mlir::ConversionConfig, (anonymous namespace)::OpConversionMode) DialectConversion.cpp:0:0
#19 0x000056533c3dd7d6 mlir::applyPartialConversion(mlir::Operation*, mlir::ConversionTarget const&, mlir::FrozenRewritePatternSet const&, mlir::ConversionConfig) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb3a97d6)
#20 0x00005653336d6df6 (anonymous namespace)::TestEmulateNarrowTypePass::runOnOperation() (.part.0) TestEmulateNarrowType.cpp:0:0
#21 0x000056533c488641 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb454641)
#22 0x000056533c4889d0 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb4549d0)
#23 0x000056533c4892ae mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::'lambda12'(mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo&)::operator()(mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo&) const Pass.cpp:0:0
#24 0x000056533c4875f0 mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb4535f0)
#25 0x000056533c48851b mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb45451b)
#26 0x000056533c4889d0 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb4549d0)
#27 0x000056533c48aa84 mlir::PassManager::runPasses(mlir::Operation*, mlir::AnalysisManager) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb456a84)
#28 0x000056533c48bb01 mlir::PassManager::run(mlir::Operation*) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb457b01)
#29 0x000056533366847b performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#30 0x0000565333668f03 processBuffer(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::MemoryBufferRef, mlir::MlirOptMainConfig const&, mlir::DialectRegistry&, mlir::SourceMgrDiagnosticVerifierHandler*, llvm::ThreadPoolInterface*) MlirOptMain.cpp:0:0
#31 0x000056533366918b 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&)::'lambda'(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::MemoryBufferRef, llvm::raw_ostream&)>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::MemoryBufferRef const&, llvm::raw_ostream&) MlirOptMain.cpp:0:0
#32 0x000056533c85b685 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) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb827685)
#33 0x000056533365f1d4 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (.part.0) MlirOptMain.cpp:0:0
#34 0x00005653336696a7 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x26356a7)
#35 0x00005653336698e3 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x26358e3)
#36 0x00005653334e6abc main (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x24b2abc)
#37 0x00007f8f097c6083 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24083)
#38 0x000056533357ea4e _start (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x254aa4e)
Aborted (core dumped)
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs