Issue 130076
Summary [MLIR] `-test-lower-to-arm-neon` pass : unsupported non numeric type
Labels mlir
Assignees
Reporter RiRi114
    Test on commit: 0f9720a6

steps to reproduceļ¼š
`mlir-opt  temp.mlir  -test-lower-to-arm-neon
`

test case:
```mlir
func.func @matrix_vector_neon_mul(%lhs: vector<4x16xf32>, %rhs: vector<16xf32>, %acc: vector<4xf32>) -> vector<4xf32> {
  %res = linalg.matmul ins(%lhs, %rhs: vector<4x16xf32>, vector<16xf32>) outs(%acc: vector<4xf32>) : vector<4x16xf32> -> vector<4xf32>
  return %res : vector<4xf32>
}

func.func @tensor_contract_neon_example(%lhs: tensor<3x4x8xf32>, %rhs: tensor<4x8x2xf32>, %acc: tensor<3x4x2xf32>) -> tensor<3x4x2xf32> {
  %res = linalg.contract ins(%lhs, %rhs: tensor<3x4x8xf32>, tensor<4x8x2xf32>) outs(%acc: tensor<3x4x2xf32>) : tensor<3x4x8xf32>, tensor<4x8x2xf32> -> tensor<3x4x2xf32>
  return %res : tensor<3x4x2xf32>
}
```

crash trace:
```
<unknown>:0: warning: could not cast operand of type 'vector<4x16xf32>' to 'vector<4xf32>'
<unknown>:0: warning: could not cast operand of type 'vector<16xf32>' to 'vector<4xf32>'
unsupported non numeric type
UNREACHABLE executed at /home/fuzzing/llvm-project/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:467!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: /home/fuzzing/llvm-project/build/bin/mlir-opt temp.mlir -test-lower-to-arm-neon
1.      MLIR Parser: custom op parser 'func.func'
2.      MLIR Parser: custom op parser 'linalg.matmul'
 #0 0x000000000113ce77 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x113ce77)
 #1 0x000000000113aa0e llvm::sys::RunSignalHandlers() (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x113aa0e)
 #2 0x000000000113d855 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #3 0x00007c8c69453520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #4 0x00007c8c694a79fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #5 0x00007c8c69453476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #6 0x00007c8c694397f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #7 0x0000000001124c11 (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x1124c11)
 #8 0x0000000001a1f0ac (anonymous namespace)::RegionBuilderHelper::buildBinaryFn(mlir::linalg::BinaryFn, mlir::Value, mlir::Value) LinalgOps.cpp:0:0
 #9 0x0000000001b1e35e mlir::linalg::MatmulOp::regionBuilder(mlir::ImplicitLocOpBuilder&, mlir::Block&, llvm::ArrayRef<mlir::NamedAttribute>) (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x1b1e35e)
#10 0x0000000001b3fe9d void llvm::function_ref<void (mlir::ImplicitLocOpBuilder&, mlir::Block&, llvm::ArrayRef<mlir::NamedAttribute>)>::callback_fn<std::function<void (mlir::ImplicitLocOpBuilder&, mlir::Block&, llvm::ArrayRef<mlir::NamedAttribute>)> >(long, mlir::ImplicitLocOpBuilder&, mlir::Block&, llvm::ArrayRef<mlir::NamedAttribute>) (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x1b3fe9d)
#11 0x0000000001b2a369 fillStructuredOpRegion(mlir::OpBuilder&, mlir::Region&, mlir::TypeRange, mlir::TypeRange, llvm::ArrayRef<mlir::NamedAttribute>, llvm::function_ref<void (mlir::ImplicitLocOpBuilder&, mlir::Block&, llvm::ArrayRef<mlir::NamedAttribute>)>) LinalgOps.cpp:0:0
#12 0x0000000001a12832 parseNamedStructuredOp(mlir::OpAsmParser&, mlir::OperationState&, unsigned int, llvm::function_ref<void (mlir::ImplicitLocOpBuilder&, mlir::Block&, llvm::ArrayRef<mlir::NamedAttribute>)>) LinalgOps.cpp:0:0
#13 0x0000000001b1ea25 mlir::linalg::MatmulOp::parse(mlir::OpAsmParser&, mlir::OperationState&) (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x1b1ea25)
#14 0x00000000069b881e (anonymous namespace)::OperationParser::parseOperation() Parser.cpp:0:0
#15 0x00000000069c3d01 (anonymous namespace)::OperationParser::parseBlock(mlir::Block*&) Parser.cpp:0:0
#16 0x00000000069c1b2a (anonymous namespace)::OperationParser::parseRegion(mlir::Region&, llvm::ArrayRef<mlir::OpAsmParser::Argument>, bool) Parser.cpp:0:0
#17 0x00000000069bfbf9 (anonymous namespace)::CustomOpAsmParser::parseRegion(mlir::Region&, llvm::ArrayRef<mlir::OpAsmParser::Argument>, bool) Parser.cpp:0:0
#18 0x00000000069bfc3c (anonymous namespace)::CustomOpAsmParser::parseOptionalRegion(mlir::Region&, llvm::ArrayRef<mlir::OpAsmParser::Argument>, bool) Parser.cpp:0:0
#19 0x0000000006ac872b mlir::function_interface_impl::parseFunctionOp(mlir::OpAsmParser&, mlir::OperationState&, bool, mlir::StringAttr, llvm::function_ref<mlir::Type (mlir::Builder&, llvm::ArrayRef<mlir::Type>, llvm::ArrayRef<mlir::Type>, mlir::function_interface_impl::VariadicFlag, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)>, mlir::StringAttr, mlir::StringAttr) (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x6ac872b)
#20 0x00000000017e4928 mlir::func::FuncOp::parse(mlir::OpAsmParser&, mlir::OperationState&) (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x17e4928)
#21 0x00000000069b881e (anonymous namespace)::OperationParser::parseOperation() Parser.cpp:0:0
#22 0x00000000069b7108 mlir::parseAsmSourceFile(llvm::SourceMgr const&, mlir::Block*, mlir::ParserConfig const&, mlir::AsmParserState*, mlir::AsmParserCodeCompleteContext*) (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x69b7108)
#23 0x000000000424207f mlir::parseSourceFile(std::shared_ptr<llvm::SourceMgr> const&, mlir::Block*, mlir::ParserConfig const&, mlir::LocationAttr*) (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x424207f)
#24 0x0000000004240f8e mlir::parseSourceFileForTool(std::shared_ptr<llvm::SourceMgr> const&, mlir::ParserConfig const&, bool) (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x4240f8e)
#25 0x0000000004240793 performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#26 0x0000000004240503 llvm::LogicalResult llvm::function_ref<llvm::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&) MlirOptMain.cpp:0:0
#27 0x00000000042ec4e8 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::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x42ec4e8)
#28 0x000000000423a151 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer> >, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x423a151)
#29 0x000000000423a403 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x423a403)
#30 0x000000000423a612 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x423a612)
#31 0x000000000111a8d7 main (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x111a8d7)
#32 0x00007c8c6943ad90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#33 0x00007c8c6943ae40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#34 0x000000000111a435 _start (/home/fuzzing/llvm-project/build/bin/mlir-opt+0x111a435)
Aborted (core dumped)
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to