[Mlir-commits] [mlir] [mlir][sparse] fix crash due to different std::sort implementation. (PR #69236)

Peiming Liu llvmlistbot at llvm.org
Mon Oct 16 11:28:23 PDT 2023


https://github.com/PeimingLiu created https://github.com/llvm/llvm-project/pull/69236

None

>From 7cff31502fb66a8dacd5880791f50e9b61569f79 Mon Sep 17 00:00:00 2001
From: Peiming Liu <peiming at google.com>
Date: Mon, 16 Oct 2023 18:26:47 +0000
Subject: [PATCH] [mlir][sparse] fix crash due to different std::sort
 implementation.

---
 mlir/include/mlir/ExecutionEngine/SparseTensor/Storage.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mlir/include/mlir/ExecutionEngine/SparseTensor/Storage.h b/mlir/include/mlir/ExecutionEngine/SparseTensor/Storage.h
index 0d95c60a08689d2..5e57facaf2376f6 100644
--- a/mlir/include/mlir/ExecutionEngine/SparseTensor/Storage.h
+++ b/mlir/include/mlir/ExecutionEngine/SparseTensor/Storage.h
@@ -531,7 +531,7 @@ class SparseTensorStorage final : public SparseTensorStorageBase {
                     continue;
                   return coordinates[l][lhs] < coordinates[l][rhs];
                 }
-                assert(false && "duplicate coordinates");
+                assert(lhs == rhs && "duplicate coordinates");
                 return false;
               });
 



More information about the Mlir-commits mailing list