Skip to content

Commit afef716

Browse files
[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.
1 parent 59354a8 commit afef716

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mlir/lib/Transforms/Utils/DialectConversion.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ namespace {
103103

104104
/// Helper class to make it possible to use `ValueVector` as a key in DenseMap.
105105
struct ValueVectorMapInfo {
106-
static ValueVector getEmptyKey() { return ValueVector{}; }
107-
static ValueVector getTombstoneKey() { return ValueVector{}; }
106+
static ValueVector getEmptyKey() { return ValueVector{Value()}; }
107+
static ValueVector getTombstoneKey() { return ValueVector{Value(), Value()}; }
108108
static ::llvm::hash_code getHashValue(const ValueVector &val) {
109109
return ::llvm::hash_combine_range(val.begin(), val.end());
110110
}

0 commit comments

Comments
 (0)