<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/64491>64491</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[mlir] `sparse-compiler` pass with `mlir-timing` option crashed with assertion failure "zero-copy transfer not supported with GPU libgen"
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Colloportus0
</td>
</tr>
</table>
<pre>
MLIR built at commit 1d9f77f5
Reproduced with:
`mlir-opt "--sparse-compiler=parallelization-strategy=dense-outer-loop enable-arm-neon enable-arm-sve enable-runtime-library enable-gpu-libgen gpu-data-transfer-strategy=zero-copy enable-index-optimizations" --mlir-timing temp.mlir`
temp.mlir:
``` milr
%c2 = arith.constant 2 : index
```
trace:
```console
Assertion failed: (gpuDataTransfer != GPUDataTransferStrategy::kZeroCopy && "zero-copy transfer not supported with GPU libgen"), function runOnOperation, file SparseTensorPasses.cpp, line 85.
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-compiler=parallelization-strategy=dense-outer-loop enable-arm-neon enable-arm-sve enable-runtime-library enable-gpu-libgen gpu-data-transfer-strategy=zero-copy enable-index-optimizations" --mlir-timing reduce_temp.mlir
#0 0x00000001030e44ac llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/workspace/build/bin/mlir-opt+0x1002f44ac)
#1 0x00000001030e2748 llvm::sys::RunSignalHandlers() (/workspace/build/bin/mlir-opt+0x1002f2748)
#2 0x00000001030e4b58 SignalHandler(int) (/workspace/build/bin/mlir-opt+0x1002f4b58)
#3 0x0000000189bbd4c4 (/usr/lib/system/libsystem_platform.dylib+0x1803414c4)
#4 0x0000000189ba5ee0 (/usr/lib/system/libsystem_pthread.dylib+0x180329ee0)
#5 0x0000000189ae0340 (/usr/lib/system/libsystem_c.dylib+0x180264340)
#6 0x0000000189adf754 (/usr/lib/system/libsystem_c.dylib+0x180263754)
#7 0x00000001073afbb4 mlir::detail::PassOptions::Option<bool, llvm::cl::parser<bool>>::Option<llvm::cl::desc, llvm::cl::initializer<bool>>(mlir::detail::PassOptions&, llvm::StringRef, llvm::cl::desc&&, llvm::cl::initializer<bool>&&) (.cold.1) (/workspace/build/bin/mlir-opt+0x1045bfbb4)
#8 0x000000010476d070 (anonymous namespace)::SparsificationPass::runOnOperation() (/workspace/build/bin/mlir-opt+0x10197d070)
#9 0x0000000105782fcc mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/workspace/build/bin/mlir-opt+0x102992fcc)
#10 0x00000001057836bc mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/workspace/build/bin/mlir-opt+0x1029936bc)
#11 0x000000010479929c mlir::sparse_tensor::SparsificationAndBufferizationPass::runOnOperation() (/workspace/build/bin/mlir-opt+0x1019a929c)
#12 0x0000000105782fcc mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/workspace/build/bin/mlir-opt+0x102992fcc)
#13 0x00000001057836bc mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/workspace/build/bin/mlir-opt+0x1029936bc)
#14 0x0000000105785554 mlir::PassManager::run(mlir::Operation*) (/workspace/build/bin/mlir-opt+0x102995554)
#15 0x000000010577d9a0 performActions(llvm::raw_ostream&, std::__1::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) (/workspace/build/bin/mlir-opt+0x10298d9a0)
#16 0x000000010577cec8 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+0x10298cec8)
#17 0x00000001057fbd78 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+0x102a0bd78)
#18 0x000000010577787c 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+0x10298787c)
#19 0x0000000105777cec mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/workspace/build/bin/mlir-opt+0x102987cec)
#20 0x0000000102df323c main (/workspace/build/bin/mlir-opt+0x10000323c)
#21 0x000000010e5a5088
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsWVtv2zoS_jX0C2FDpu4PfnCTerdAgwRJ92VfDIocydxSpJakTuv--gUp-SI7zbbG2QtOT2DEFi8z33wzQ41G1FrRKIAVSt-h9H5Ge7fTZnWnpdSdNq630azSfL96-PjhGVe9kA5Th5luW-EwXvKyzvM6RdE9itbP0BnNewYcfxFuh-I1xsMMyqJWCjPXncOIkPncdtRYmDPddkKCQfF9Rw2VEqT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