Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Mlir] --affine-super-vectorizer-test="vector-shape-ratio=4,8" crashes in VectorUtils.cpp:247: bool mlir::matcher::operatesOnSuperVectorsOf #122211

Open
Emilyaxe opened this issue Jan 9, 2025 · 1 comment
Labels
crash Prefer [crash-on-valid] or [crash-on-invalid] mlir:affine

Comments

@Emilyaxe
Copy link

Emilyaxe commented Jan 9, 2025

git version: e4372c4

system: Ubuntu 18.04.6 LTS

reproduce with: mlir-opt a.mlir --affine-super-vectorizer-test="vector-shape-ratio=4,8"

a.mlir:

module {
  llvm.func @malloc(i64) -> !llvm.ptr attributes {sym_visibility = "private"}
  llvm.mlir.global private constant @__constant_1x6x6xi32(dense<0> : tensor<1x6x6xi32>) {addr_space = 0 : i32, alignment = 64 : i64, sym_visibility = "private"} : !llvm.array<1 x array<6 x array<6 x i32>>>
  llvm.mlir.global private constant @__constant_1x6x1xi32_1(dense<-331> : tensor<1x6x1xi32>) {addr_space = 0 : i32, alignment = 64 : i64, sym_visibility = "private"} : !llvm.array<1 x array<6 x array<1 x i32>>>
  llvm.mlir.global private constant @__constant_1x6x1xi32_0(dense<-6552> : tensor<1x6x1xi32>) {addr_space = 0 : i32, alignment = 64 : i64, sym_visibility = "private"} : !llvm.array<1 x array<6 x array<1 x i32>>>
  llvm.mlir.global private constant @__constant_6xf32(dense<-3.310000e+02> : tensor<6xf32>) {addr_space = 0 : i32, alignment = 64 : i64, sym_visibility = "private"} : !llvm.array<6 x f32>
  llvm.mlir.global private constant @__constant_1x6x1xi32(dense<0> : tensor<1x6x1xi32>) {addr_space = 0 : i32, alignment = 64 : i64, sym_visibility = "private"} : !llvm.array<1 x array<6 x array<1 x i32>>>
  func.func private @printMemrefI32(memref<*xi32>)
  func.func private @printMemrefF32(memref<*xf32>)
  func.func private @main() {
    %0 = llvm.mlir.constant(6 : index) : i64
    %1 = llvm.mlir.undef : !llvm.struct<(i64, ptr)>
    %2 = llvm.mlir.constant(3 : index) : i64
    %3 = llvm.mlir.constant(0 : index) : i64
    %4 = llvm.mlir.undef : !llvm.struct<(ptr, ptr, i64, array<3 x i64>, array<3 x i64>)>
    %5 = llvm.mlir.constant(64 : index) : i64
    %6 = llvm.mlir.zero : !llvm.ptr
    %7 = llvm.mlir.constant(2 : index) : i64
    %8 = llvm.mlir.constant(1 : index) : i64
    %cst = arith.constant 0.000000e+00 : f32
    %c0_i32 = arith.constant 0 : i32
    %c0 = arith.constant 0 : index
    %9 = llvm.mlir.constant(0 : i64) : i64
    %10 = builtin.unrealized_conversion_cast %9 : i64 to index
    %11 = llvm.getelementptr %6[2] : (!llvm.ptr) -> !llvm.ptr, i32
    %12 = llvm.ptrtoint %11 : !llvm.ptr to i64
    %13 = llvm.add %12, %5 : i64
    %14 = llvm.call @malloc(%13) : (i64) -> !llvm.ptr
    %15 = llvm.ptrtoint %14 : !llvm.ptr to i64
    %16 = llvm.sub %5, %8 : i64
    %17 = llvm.add %15, %16 : i64
    %18 = llvm.urem %17, %5 : i64
    %19 = llvm.sub %17, %18 : i64
    %20 = llvm.inttoptr %19 : i64 to !llvm.ptr
    %21 = llvm.insertvalue %14, %4[0] : !llvm.struct<(ptr, ptr, i64, array<3 x i64>, array<3 x i64>)> 
    %22 = llvm.insertvalue %20, %21[1] : !llvm.struct<(ptr, ptr, i64, array<3 x i64>, array<3 x i64>)> 
    %23 = llvm.insertvalue %3, %22[2] : !llvm.struct<(ptr, ptr, i64, array<3 x i64>, array<3 x i64>)> 
    %24 = llvm.insertvalue %8, %23[3, 0] : !llvm.struct<(ptr, ptr, i64, array<3 x i64>, array<3 x i64>)> 
    %25 = llvm.insertvalue %7, %24[3, 1] : !llvm.struct<(ptr, ptr, i64, array<3 x i64>, array<3 x i64>)> 
    %26 = llvm.insertvalue %8, %25[3, 2] : !llvm.struct<(ptr, ptr, i64, array<3 x i64>, array<3 x i64>)> 
    %27 = llvm.insertvalue %7, %26[4, 0] : !llvm.struct<(ptr, ptr, i64, array<3 x i64>, array<3 x i64>)> 
    %28 = llvm.insertvalue %8, %27[4, 1] : !llvm.struct<(ptr, ptr, i64, array<3 x i64>, array<3 x i64>)> 
    %29 = llvm.insertvalue %8, %28[4, 2] : !llvm.struct<(ptr, ptr, i64, array<3 x i64>, array<3 x i64>)> 
    %30 = builtin.unrealized_conversion_cast %29 : !llvm.struct<(ptr, ptr, i64, array<3 x i64>, array<3 x i64>)> to memref<1x2x1xi32>
    %31 = vector.transfer_read %30[%c0, %c0, %c0], %c0_i32 {in_bounds = [true, true, true]} : memref<1x2x1xi32>, vector<1x2x1xi32>
    return
  }
}

stack trace:

mlir-opt: /data/szy/MLIR/llvm-release/llvm-project/mlir/lib/Dialect/Vector/Utils/VectorUtils.cpp:247: bool mlir::matcher::operatesOnSuperVectorsOf(Operation &, VectorType): Assertion `(ratio || !mustDivide) && "vector.transfer operation in which super-vector size is not an" " integer multiple of sub-vector size"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
 #0 0x0000560f9d1f9ce8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x11f2ce8)
 #1 0x0000560f9d1f77fe llvm::sys::RunSignalHandlers() (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x11f07fe)
 #2 0x0000560f9d1fa67d SignalHandler(int) Signals.cpp:0:0
 #3 0x00007f4d4fa7e420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
 #4 0x00007f4d4f0bb00b raise /build/glibc-LcI20x/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
 #5 0x00007f4d4f09a859 abort /build/glibc-LcI20x/glibc-2.31/stdlib/abort.c:81:7
 #6 0x00007f4d4f09a729 get_sysdep_segment_value /build/glibc-LcI20x/glibc-2.31/intl/loadmsgcat.c:509:8
 #7 0x00007f4d4f09a729 _nl_load_domain /build/glibc-LcI20x/glibc-2.31/intl/loadmsgcat.c:970:34
 #8 0x00007f4d4f0abfd6 (/lib/x86_64-linux-gnu/libc.so.6+0x33fd6)
 #9 0x0000560f9faf823a mlir::matcher::operatesOnSuperVectorsOf(mlir::Operation&, mlir::VectorType) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x3af123a)
#10 0x0000560fa0329c40 std::_Function_handler<bool (mlir::Operation&), (anonymous namespace)::VectorizerTestPass::testVectorShapeRatio(llvm::raw_ostream&)::$_0>::_M_invoke(std::_Any_data const&, mlir::Operation&) TestVectorizationUtils.cpp:0:0
#11 0x0000560fa0104c29 mlir::affine::NestedPattern::matchOne(mlir::Operation*, llvm::SmallVectorImpl<mlir::affine::NestedMatch>*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x40fdc29)
#12 0x0000560f9d30f93e void mlir::detail::walk<mlir::ForwardIterator>(mlir::Operation*, llvm::function_ref<void (mlir::Operation*)>, mlir::WalkOrder) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x130893e)
#13 0x0000560fa0326e2a (anonymous namespace)::VectorizerTestPass::runOnOperation() TestVectorizationUtils.cpp:0:0
#14 0x0000560fa0154496 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x414d496)
#15 0x0000560fa0154dc0 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+0x414ddc0)
#16 0x0000560fa015a31e auto void mlir::parallelForEach<__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)::$_0>(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)::$_0&&)::'lambda'(__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>>>&&)::operator()<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>>>&&) const Pass.cpp:0:0
#17 0x0000560fa015b27e std::_Function_handler<void (), llvm::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>>>, void mlir::parallelForEach<__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)::$_0>(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)::$_0&&)::'lambda'(__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::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)::$_0&&)::'lambda'()>::_M_invoke(std::_Any_data const&) Pass.cpp:0:0
#18 0x0000560fa015ad18 std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<std::function<void ()>>>, void>>::_M_invoke(std::_Any_data const&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x4153d18)
#19 0x0000560fa015ac77 std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x4153c77)
#20 0x00007f4d4fa7b4df __pthread_once_slow /build/glibc-LcI20x/glibc-2.31/nptl/pthread_once.c:118:7
#21 0x0000560fa015aff9 std::__future_base::_Deferred_state<std::thread::_Invoker<std::tuple<std::function<void ()>>>, void>::_M_complete_async() (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x4153ff9)
#22 0x0000560fa015b185 std::__basic_future<void>::wait() const (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x4154185)
#23 0x0000560fa3378f75 llvm::StdThreadPool::processTasks(llvm::ThreadPoolTaskGroup*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x7371f75)
#24 0x0000560fa337a6cb void* llvm::thread::ThreadProxy<std::tuple<llvm::StdThreadPool::grow(int)::$_0>>(void*) ThreadPool.cpp:0:0
#25 0x00007f4d4fa72609 start_thread /build/glibc-LcI20x/glibc-2.31/nptl/pthread_create.c:478:7
#26 0x00007f4d4f197353 __clone /build/glibc-LcI20x/glibc-2.31/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:97:0

@Emilyaxe Emilyaxe added crash Prefer [crash-on-valid] or [crash-on-invalid] mlir:vector mlir:affine and removed mlir:vector labels Jan 9, 2025
@llvmbot
Copy link
Member

llvmbot commented Jan 9, 2025

@llvm/issue-subscribers-mlir-affine

Author: None (Emilyaxe)

git version: e4372c4

system: Ubuntu 18.04.6 LTS

reproduce with: mlir-opt a.mlir --affine-super-vectorizer-test="vector-shape-ratio=4,8"

a.mlir:

module {
  llvm.func @<!-- -->malloc(i64) -&gt; !llvm.ptr attributes {sym_visibility = "private"}
  llvm.mlir.global private constant @<!-- -->__constant_1x6x6xi32(dense&lt;0&gt; : tensor&lt;1x6x6xi32&gt;) {addr_space = 0 : i32, alignment = 64 : i64, sym_visibility = "private"} : !llvm.array&lt;1 x array&lt;6 x array&lt;6 x i32&gt;&gt;&gt;
  llvm.mlir.global private constant @<!-- -->__constant_1x6x1xi32_1(dense&lt;-331&gt; : tensor&lt;1x6x1xi32&gt;) {addr_space = 0 : i32, alignment = 64 : i64, sym_visibility = "private"} : !llvm.array&lt;1 x array&lt;6 x array&lt;1 x i32&gt;&gt;&gt;
  llvm.mlir.global private constant @<!-- -->__constant_1x6x1xi32_0(dense&lt;-6552&gt; : tensor&lt;1x6x1xi32&gt;) {addr_space = 0 : i32, alignment = 64 : i64, sym_visibility = "private"} : !llvm.array&lt;1 x array&lt;6 x array&lt;1 x i32&gt;&gt;&gt;
  llvm.mlir.global private constant @<!-- -->__constant_6xf32(dense&lt;-3.310000e+02&gt; : tensor&lt;6xf32&gt;) {addr_space = 0 : i32, alignment = 64 : i64, sym_visibility = "private"} : !llvm.array&lt;6 x f32&gt;
  llvm.mlir.global private constant @<!-- -->__constant_1x6x1xi32(dense&lt;0&gt; : tensor&lt;1x6x1xi32&gt;) {addr_space = 0 : i32, alignment = 64 : i64, sym_visibility = "private"} : !llvm.array&lt;1 x array&lt;6 x array&lt;1 x i32&gt;&gt;&gt;
  func.func private @<!-- -->printMemrefI32(memref&lt;*xi32&gt;)
  func.func private @<!-- -->printMemrefF32(memref&lt;*xf32&gt;)
  func.func private @<!-- -->main() {
    %0 = llvm.mlir.constant(6 : index) : i64
    %1 = llvm.mlir.undef : !llvm.struct&lt;(i64, ptr)&gt;
    %2 = llvm.mlir.constant(3 : index) : i64
    %3 = llvm.mlir.constant(0 : index) : i64
    %4 = llvm.mlir.undef : !llvm.struct&lt;(ptr, ptr, i64, array&lt;3 x i64&gt;, array&lt;3 x i64&gt;)&gt;
    %5 = llvm.mlir.constant(64 : index) : i64
    %6 = llvm.mlir.zero : !llvm.ptr
    %7 = llvm.mlir.constant(2 : index) : i64
    %8 = llvm.mlir.constant(1 : index) : i64
    %cst = arith.constant 0.000000e+00 : f32
    %c0_i32 = arith.constant 0 : i32
    %c0 = arith.constant 0 : index
    %9 = llvm.mlir.constant(0 : i64) : i64
    %10 = builtin.unrealized_conversion_cast %9 : i64 to index
    %11 = llvm.getelementptr %6[2] : (!llvm.ptr) -&gt; !llvm.ptr, i32
    %12 = llvm.ptrtoint %11 : !llvm.ptr to i64
    %13 = llvm.add %12, %5 : i64
    %14 = llvm.call @<!-- -->malloc(%13) : (i64) -&gt; !llvm.ptr
    %15 = llvm.ptrtoint %14 : !llvm.ptr to i64
    %16 = llvm.sub %5, %8 : i64
    %17 = llvm.add %15, %16 : i64
    %18 = llvm.urem %17, %5 : i64
    %19 = llvm.sub %17, %18 : i64
    %20 = llvm.inttoptr %19 : i64 to !llvm.ptr
    %21 = llvm.insertvalue %14, %4[0] : !llvm.struct&lt;(ptr, ptr, i64, array&lt;3 x i64&gt;, array&lt;3 x i64&gt;)&gt; 
    %22 = llvm.insertvalue %20, %21[1] : !llvm.struct&lt;(ptr, ptr, i64, array&lt;3 x i64&gt;, array&lt;3 x i64&gt;)&gt; 
    %23 = llvm.insertvalue %3, %22[2] : !llvm.struct&lt;(ptr, ptr, i64, array&lt;3 x i64&gt;, array&lt;3 x i64&gt;)&gt; 
    %24 = llvm.insertvalue %8, %23[3, 0] : !llvm.struct&lt;(ptr, ptr, i64, array&lt;3 x i64&gt;, array&lt;3 x i64&gt;)&gt; 
    %25 = llvm.insertvalue %7, %24[3, 1] : !llvm.struct&lt;(ptr, ptr, i64, array&lt;3 x i64&gt;, array&lt;3 x i64&gt;)&gt; 
    %26 = llvm.insertvalue %8, %25[3, 2] : !llvm.struct&lt;(ptr, ptr, i64, array&lt;3 x i64&gt;, array&lt;3 x i64&gt;)&gt; 
    %27 = llvm.insertvalue %7, %26[4, 0] : !llvm.struct&lt;(ptr, ptr, i64, array&lt;3 x i64&gt;, array&lt;3 x i64&gt;)&gt; 
    %28 = llvm.insertvalue %8, %27[4, 1] : !llvm.struct&lt;(ptr, ptr, i64, array&lt;3 x i64&gt;, array&lt;3 x i64&gt;)&gt; 
    %29 = llvm.insertvalue %8, %28[4, 2] : !llvm.struct&lt;(ptr, ptr, i64, array&lt;3 x i64&gt;, array&lt;3 x i64&gt;)&gt; 
    %30 = builtin.unrealized_conversion_cast %29 : !llvm.struct&lt;(ptr, ptr, i64, array&lt;3 x i64&gt;, array&lt;3 x i64&gt;)&gt; to memref&lt;1x2x1xi32&gt;
    %31 = vector.transfer_read %30[%c0, %c0, %c0], %c0_i32 {in_bounds = [true, true, true]} : memref&lt;1x2x1xi32&gt;, vector&lt;1x2x1xi32&gt;
    return
  }
}

stack trace:

mlir-opt: /data/szy/MLIR/llvm-release/llvm-project/mlir/lib/Dialect/Vector/Utils/VectorUtils.cpp:247: bool mlir::matcher::operatesOnSuperVectorsOf(Operation &amp;, VectorType): Assertion `(ratio || !mustDivide) &amp;&amp; "vector.transfer operation in which super-vector size is not an" " integer multiple of sub-vector size"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
 #<!-- -->0 0x0000560f9d1f9ce8 llvm::sys::PrintStackTrace(llvm::raw_ostream&amp;, int) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x11f2ce8)
 #<!-- -->1 0x0000560f9d1f77fe llvm::sys::RunSignalHandlers() (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x11f07fe)
 #<!-- -->2 0x0000560f9d1fa67d SignalHandler(int) Signals.cpp:0:0
 #<!-- -->3 0x00007f4d4fa7e420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
 #<!-- -->4 0x00007f4d4f0bb00b raise /build/glibc-LcI20x/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
 #<!-- -->5 0x00007f4d4f09a859 abort /build/glibc-LcI20x/glibc-2.31/stdlib/abort.c:81:7
 #<!-- -->6 0x00007f4d4f09a729 get_sysdep_segment_value /build/glibc-LcI20x/glibc-2.31/intl/loadmsgcat.c:509:8
 #<!-- -->7 0x00007f4d4f09a729 _nl_load_domain /build/glibc-LcI20x/glibc-2.31/intl/loadmsgcat.c:970:34
 #<!-- -->8 0x00007f4d4f0abfd6 (/lib/x86_64-linux-gnu/libc.so.6+0x33fd6)
 #<!-- -->9 0x0000560f9faf823a mlir::matcher::operatesOnSuperVectorsOf(mlir::Operation&amp;, mlir::VectorType) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x3af123a)
#<!-- -->10 0x0000560fa0329c40 std::_Function_handler&lt;bool (mlir::Operation&amp;), (anonymous namespace)::VectorizerTestPass::testVectorShapeRatio(llvm::raw_ostream&amp;)::$_0&gt;::_M_invoke(std::_Any_data const&amp;, mlir::Operation&amp;) TestVectorizationUtils.cpp:0:0
#<!-- -->11 0x0000560fa0104c29 mlir::affine::NestedPattern::matchOne(mlir::Operation*, llvm::SmallVectorImpl&lt;mlir::affine::NestedMatch&gt;*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x40fdc29)
#<!-- -->12 0x0000560f9d30f93e void mlir::detail::walk&lt;mlir::ForwardIterator&gt;(mlir::Operation*, llvm::function_ref&lt;void (mlir::Operation*)&gt;, mlir::WalkOrder) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x130893e)
#<!-- -->13 0x0000560fa0326e2a (anonymous namespace)::VectorizerTestPass::runOnOperation() TestVectorizationUtils.cpp:0:0
#<!-- -->14 0x0000560fa0154496 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x414d496)
#<!-- -->15 0x0000560fa0154dc0 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&amp;, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x414ddc0)
#<!-- -->16 0x0000560fa015a31e auto void mlir::parallelForEach&lt;__gnu_cxx::__normal_iterator&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*, std::vector&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo, std::allocator&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo&gt;&gt;&gt;, mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::$_0&gt;(mlir::MLIRContext*, __gnu_cxx::__normal_iterator&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*, std::vector&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo, std::allocator&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo&gt;&gt;&gt;, __gnu_cxx::__normal_iterator&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*, std::vector&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo, std::allocator&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo&gt;&gt;&gt;, mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::$_0&amp;&amp;)::'lambda'(__gnu_cxx::__normal_iterator&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*, std::vector&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo, std::allocator&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo&gt;&gt;&gt;&amp;&amp;)::operator()&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo&amp;&gt;(__gnu_cxx::__normal_iterator&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*, std::vector&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo, std::allocator&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo&gt;&gt;&gt;&amp;&amp;) const Pass.cpp:0:0
#<!-- -->17 0x0000560fa015b27e std::_Function_handler&lt;void (), llvm::LogicalResult mlir::failableParallelForEach&lt;__gnu_cxx::__normal_iterator&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*, std::vector&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo, std::allocator&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo&gt;&gt;&gt;, void mlir::parallelForEach&lt;__gnu_cxx::__normal_iterator&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*, std::vector&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo, std::allocator&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo&gt;&gt;&gt;, mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::$_0&gt;(mlir::MLIRContext*, __gnu_cxx::__normal_iterator&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*, std::vector&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo, std::allocator&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo&gt;&gt;&gt;, __gnu_cxx::__normal_iterator&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*, std::vector&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo, std::allocator&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo&gt;&gt;&gt;, mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::$_0&amp;&amp;)::'lambda'(__gnu_cxx::__normal_iterator&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*, std::vector&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo, std::allocator&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo&gt;&gt;&gt;&amp;&amp;)&gt;(mlir::MLIRContext*, __gnu_cxx::__normal_iterator&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*, std::vector&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo, std::allocator&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo&gt;&gt;&gt;, __gnu_cxx::__normal_iterator&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*, std::vector&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo, std::allocator&lt;mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo&gt;&gt;&gt;, mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::$_0&amp;&amp;)::'lambda'()&gt;::_M_invoke(std::_Any_data const&amp;) Pass.cpp:0:0
#<!-- -->18 0x0000560fa015ad18 std::_Function_handler&lt;std::unique_ptr&lt;std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter&gt; (), std::__future_base::_Task_setter&lt;std::unique_ptr&lt;std::__future_base::_Result&lt;void&gt;, std::__future_base::_Result_base::_Deleter&gt;, std::thread::_Invoker&lt;std::tuple&lt;std::function&lt;void ()&gt;&gt;&gt;, void&gt;&gt;::_M_invoke(std::_Any_data const&amp;) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x4153d18)
#<!-- -->19 0x0000560fa015ac77 std::__future_base::_State_baseV2::_M_do_set(std::function&lt;std::unique_ptr&lt;std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter&gt; ()&gt;*, bool*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x4153c77)
#<!-- -->20 0x00007f4d4fa7b4df __pthread_once_slow /build/glibc-LcI20x/glibc-2.31/nptl/pthread_once.c:118:7
#<!-- -->21 0x0000560fa015aff9 std::__future_base::_Deferred_state&lt;std::thread::_Invoker&lt;std::tuple&lt;std::function&lt;void ()&gt;&gt;&gt;, void&gt;::_M_complete_async() (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x4153ff9)
#<!-- -->22 0x0000560fa015b185 std::__basic_future&lt;void&gt;::wait() const (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x4154185)
#<!-- -->23 0x0000560fa3378f75 llvm::StdThreadPool::processTasks(llvm::ThreadPoolTaskGroup*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x7371f75)
#<!-- -->24 0x0000560fa337a6cb void* llvm::thread::ThreadProxy&lt;std::tuple&lt;llvm::StdThreadPool::grow(int)::$_0&gt;&gt;(void*) ThreadPool.cpp:0:0
#<!-- -->25 0x00007f4d4fa72609 start_thread /build/glibc-LcI20x/glibc-2.31/nptl/pthread_create.c:478:7
#<!-- -->26 0x00007f4d4f197353 __clone /build/glibc-LcI20x/glibc-2.31/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:97:0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash Prefer [crash-on-valid] or [crash-on-invalid] mlir:affine
Projects
None yet
Development

No branches or pull requests

2 participants