Skip to content

SparseTensor Dialect test sparse-matmul-2-4-prune.mlir crashed with Assertion 'this->_M_is_engaged()' failed. #77052

Open
@Ag-Cu

Description

@Ag-Cu

system: Ubuntu 20.04.6 LTS (Focal Fossa)
current git head: #76697
build command:

cmake -G Ninja ../llvm \
   -DLLVM_ENABLE_PROJECTS=mlir \
   -DLLVM_BUILD_EXAMPLES=ON \
   -DLLVM_TARGETS_TO_BUILD="Native;NVPTX;AMDGPU" \
   -DCMAKE_BUILD_TYPE=Release \
   -DLLVM_ENABLE_ASSERTIONS=ON

cmake --build . --target check-mlir

reproduced with:
cd llvm-project/mlir/test/Integration/Dialect/SparseTensor/GPU/CUDA/sm80-lt

mlir-opt sparse-matmul-2-4-prune.mlir --sparsifier="enable-gpu-libgen gpu-triple=nvptx64-nvidia-cuda gpu-chip=sm_80 gpu-features=+ptx71 gpu-format=%gpu_compilation_format enable-runtime-library=true" 

will get:

/usr/include/c++/9/optional:438: constexpr _Tp& std::_Optional_base_impl<_Tp, _Dp>::_M_get() [with _Tp = mlir::gpu::CompilationTarget; _Dp = std::_Optional_base<mlir::gpu::CompilationTarget, true, true>]: Assertion 'this->_M_is_engaged()' failed.
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 sparse-matmul-2-4-prune.mlir "--sparsifier=enable-gpu-libgen gpu-triple=nvptx64-nvidia-cuda gpu-chip=sm_80 gpu-features=+ptx71 gpu-format=%gpu_compilation_format enable-runtime-library=true"
 #0 0x00005581a18a2bcf llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (.localalias) (/home/yt/llvm-project/build/bin/mlir-opt+0x1685bcf)
 #1 0x00005581a189fc24 SignalHandler(int) (/home/yt/llvm-project/build/bin/mlir-opt+0x1682c24)
 #2 0x00007fe7d4206420 __restore_rt (/usr/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
 #3 0x00007fe7d3ca300b raise (/usr/lib/x86_64-linux-gnu/libc.so.6+0x4300b)
 #4 0x00007fe7d3c82859 abort (/usr/lib/x86_64-linux-gnu/libc.so.6+0x22859)
 #5 0x00005581a201ec2b (anonymous namespace)::GpuModuleToBinaryPass::runOnOperation() (/home/yt/llvm-project/build/bin/mlir-opt+0x1e01c2b)
 #6 0x00005581a459d3ae mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (.localalias) (/home/yt/llvm-project/build/bin/mlir-opt+0x43803ae)
 #7 0x00005581a459d88a mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (.localalias) (/home/yt/llvm-project/build/bin/mlir-opt+0x438088a)
 #8 0x00005581a459e054 mlir::PassManager::run(mlir::Operation*) (/home/yt/llvm-project/build/bin/mlir-opt+0x4381054)
 #9 0x00005581a458ed43 performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) (/home/yt/llvm-project/build/bin/mlir-opt+0x4371d43)
#10 0x00005581a45902c4 processBuffer(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer> >, mlir::MlirOptMainConfig const&, mlir::DialectRegistry&, llvm::ThreadPool*) (/home/yt/llvm-project/build/bin/mlir-opt+0x43732c4)
#11 0x00005581a4590474 mlir::LogicalResult llvm::function_ref<mlir::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&)::'lambda'(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer> >, llvm::raw_ostream&)>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer> >, llvm::raw_ostream&) (/home/yt/llvm-project/build/bin/mlir-opt+0x4373474)
#12 0x00005581a468c964 mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer> >, llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer> >, llvm::raw_ostream&)>, llvm::raw_ostream&, bool, bool) (/home/yt/llvm-project/build/bin/mlir-opt+0x446f964)
#13 0x00005581a45888d7 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer> >, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (.localalias) (/home/yt/llvm-project/build/bin/mlir-opt+0x436b8d7)
#14 0x00005581a45905c1 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (.localalias) (/home/yt/llvm-project/build/bin/mlir-opt+0x43735c1)
#15 0x00005581a4590a46 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/home/yt/llvm-project/build/bin/mlir-opt+0x4373a46)
#16 0x00005581a17d9293 main (/home/yt/llvm-project/build/bin/mlir-opt+0x15bc293)
#17 0x00007fe7d3c84083 __libc_start_main (/usr/lib/x86_64-linux-gnu/libc.so.6+0x24083)
#18 0x00005581a18725fe _start (/home/yt/llvm-project/build/bin/mlir-opt+0x16555fe)
Aborted 

I don't know if this is a bug or if I'm missing some dependencies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    crashPrefer [crash-on-valid] or [crash-on-invalid]mlir:sparseSparse compiler in MLIR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions