[Mlir-commits] [mlir] afef716 - [mlir][Transforms] Fix build after #116524 (part 2) (#121662)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Sat Jan 4 12:29:03 PST 2025
Author: Matthias Springer
Date: 2025-01-04T21:28:59+01:00
New Revision: afef716e839bf7dd96ebce5264779b1d316db58e
URL: https://github.com/llvm/llvm-project/commit/afef716e839bf7dd96ebce5264779b1d316db58e
DIFF: https://github.com/llvm/llvm-project/commit/afef716e839bf7dd96ebce5264779b1d316db58e.diff
LOG: [mlir][Transforms] Fix build after #116524 (part 2) (#121662)
Since #116524, an integration test started to become flaky (failure rate
~15%).
```
bin/mlir-opt mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_block_matmul.mlir --sparsifier="enable-arm-sve=true enable-runtime-library=false vl=2 reassociate-fp-reductions=true enable-index-optimizations=true" | mlir-cpu-runner --march=aarch64 --mattr="+sve" -e main -entry-point-result=void -shared-libs=./lib/libmlir_runner_utils.so,./lib/libmlir_c_runner_utils.so | bin/FileCheck mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_block_matmul.mlir
# executed command: bin/mlir-opt mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_block_matmul.mlir '--sparsifier=enable-arm-sve=true enable-runtime-library=false vl=2 reassociate-fp-reductions=true enable-index-optimizations=true'
# .---command stderr------------
# | mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_block_matmul.mlir:71:10: error: null operand found
# | %0 = linalg.generic #trait_mul
# | ^
# | mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_block_matmul.mlir:71:10: note: see current operation: %70 = "arith.mulf"(<<NULL VALUE>>, %69) <{fastmath = #arith.fastmath<none>}> : (<<NULL TYPE>>, vector<[2]xf64>) -> vector<[2]xf64>
# `-----------------------------
# error: command failed with exit status: 1
```
I traced the issue back to the `DenseMap<ValueVector, ValueVector,
ValueVectorMapInfo> mapping;` data structure: previously, some
`mapping.erase(foo)` calls were unsuccessful (returning `false`), even
though the `mapping` contains `foo` as a key.
Added:
Modified:
mlir/lib/Transforms/Utils/DialectConversion.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Transforms/Utils/DialectConversion.cpp b/mlir/lib/Transforms/Utils/DialectConversion.cpp
index 0e577d2d39de3d..48b8c727a78285 100644
--- a/mlir/lib/Transforms/Utils/DialectConversion.cpp
+++ b/mlir/lib/Transforms/Utils/DialectConversion.cpp
@@ -103,8 +103,8 @@ namespace {
/// Helper class to make it possible to use `ValueVector` as a key in DenseMap.
struct ValueVectorMapInfo {
- static ValueVector getEmptyKey() { return ValueVector{}; }
- static ValueVector getTombstoneKey() { return ValueVector{}; }
+ static ValueVector getEmptyKey() { return ValueVector{Value()}; }
+ static ValueVector getTombstoneKey() { return ValueVector{Value(), Value()}; }
static ::llvm::hash_code getHashValue(const ValueVector &val) {
return ::llvm::hash_combine_range(val.begin(), val.end());
}
More information about the Mlir-commits
mailing list