-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
Description
MLIR built at commit b4c54b2
Reproduced with:
mlir-opt "--convert-vector-to-scf=full-unroll target-rank=0" temp.mlir
temp.mlir:
func.func private @func2(%arg0: vector<22xf16>, %arg1: vector<22xf16>, %arg2: vector<22x22x22xf16>) {
%c1_i64 = arith.constant 1774520363 : i64
%c1_i32 = arith.constant 1268727148 : i32
%c1 = arith.constant 1 : index
%c31 = arith.constant 31 : index
%6 = tensor.empty(%c1, %c31, %c1) : tensor<?x?x?xf16>
%alloc_17 = memref.alloc(%c1) : memref<?x22xi32>
%42 = affine.if affine_set<(d0) : ((d0 + 64) ceildiv 64 >= 0, (d0 - (d0 + 64) - d0 ceildiv 64) floordiv 128 == 0)>(%c31) -> i64 {
%136 = tensor.empty() : tensor<i1>
%141 = vector.broadcast %c1_i32 : i32 to vector<3xi32>
vector.transfer_write %141, %alloc_17[%c1, %c1] {permutation_map = affine_map<(d0, d1) -> (d0)>} : vector<3xi32>, memref<?x22xi32>
affine.yield %c1_i64 : i64
} else {
affine.yield %c1_i64 : i64
}
%43 = math.log %6 : tensor<?x?x?xf16>
return
}
trace:
Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file Casting.h, line 566.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: mlir-opt "--convert-vector-to-scf=full-unroll target-rank=0" temp.mlir
#0 0x00000001024b0548 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/workspace/build/bin/mlir-opt+0x1002f8548)
#1 0x00000001024ae7e4 llvm::sys::RunSignalHandlers() (/workspace/build/bin/mlir-opt+0x1002f67e4)
#2 0x00000001024b0bf4 SignalHandler(int) (/workspace/build/bin/mlir-opt+0x1002f8bf4)
#3 0x00000001a46cd4c4 (/usr/lib/system/libsystem_platform.dylib+0x1803414c4)
#4 0x00000001a46b5ee0 (/usr/lib/system/libsystem_pthread.dylib+0x180329ee0)
#5 0x00000001a45f0340 (/usr/lib/system/libsystem_c.dylib+0x180264340)
#6 0x00000001a45ef754 (/usr/lib/system/libsystem_c.dylib+0x180263754)
#7 0x00000001068a64dc mlir::vector::TransferWriteOp::getSource() (.cold.1) (/workspace/build/bin/mlir-opt+0x1046ee4dc)
#8 0x000000010418854c mlir::vector::TransferWriteOp::getSource() (/workspace/build/bin/mlir-opt+0x101fd054c)
#9 0x00000001045e0498 (anonymous namespace)::lowering_n_d_unrolled::UnrollTransferWriteConversion::matchAndRewrite(mlir::vector::TransferWriteOp, mlir::PatternRewriter&) const (/workspace/build/bin/mlir-opt+0x102428498)
#10 0x0000000106153b74 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 (/workspace/build/bin/mlir-opt+0x103f9bb74)
#11 0x0000000106150e70 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&)>) (/workspace/build/bin/mlir-opt+0x103f98e70)
#12 0x0000000104b992b4 (anonymous namespace)::GreedyPatternRewriteDriver::processWorklist() (/workspace/build/bin/mlir-opt+0x1029e12b4)
#13 0x0000000104b96ae4 mlir::applyPatternsAndFoldGreedily(mlir::Region&, mlir::FrozenRewritePatternSet const&, mlir::GreedyRewriteConfig, bool*) (/workspace/build/bin/mlir-opt+0x1029deae4)
#14 0x00000001045e79c4 (anonymous namespace)::ConvertVectorToSCFPass::runOnOperation() (/workspace/build/bin/mlir-opt+0x10242f9c4)
#15 0x0000000104b39e34 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/workspace/build/bin/mlir-opt+0x102981e34)
#16 0x0000000104b3a524 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/workspace/build/bin/mlir-opt+0x102982524)
#17 0x0000000104b3c3bc mlir::PassManager::run(mlir::Operation*) (/workspace/build/bin/mlir-opt+0x1029843bc)
#18 0x0000000104b34808 performActions(llvm::raw_ostream&, std::__1::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) (/workspace/build/bin/mlir-opt+0x10297c808)
#19 0x0000000104b33d30 mlir::LogicalResult llvm::function_ref<mlir::LogicalResult (std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::callback_fn<mlir::MlirOptMain(llvm::raw_ostream&, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&)::$_1>(long, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) (/workspace/build/bin/mlir-opt+0x10297bd30)
#20 0x0000000104bb2be0 mlir::splitAndProcessBuffer(std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, bool, bool) (/workspace/build/bin/mlir-opt+0x1029fabe0)
#21 0x0000000104b2e6e4 mlir::MlirOptMain(llvm::raw_ostream&, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (/workspace/build/bin/mlir-opt+0x1029766e4)
#22 0x0000000104b2eb54 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/workspace/build/bin/mlir-opt+0x102976b54)
#23 0x00000001021bb58c main (/workspace/build/bin/mlir-opt+0x10000358c)
#24 0x000000010d879088