[Mlir-commits] [mlir] [mlir][sparsifier] fix `isAdmissibleBSR` (PR #72195)

Maksim Levental llvmlistbot at llvm.org
Mon Nov 13 18:44:39 PST 2023


https://github.com/makslevental created https://github.com/llvm/llvm-project/pull/72195

Fixes https://github.com/llvm/llvm-project/issues/72194.

>From 8ceef91544452de44d355bfb6936d6ef2c447095 Mon Sep 17 00:00:00 2001
From: max <maksim.levental at gmail.com>
Date: Mon, 13 Nov 2023 20:44:08 -0600
Subject: [PATCH] [mlir][sparsifier] fix `isAdmissibleBSR`

---
 mlir/lib/Dialect/SparseTensor/Transforms/SparseGPUCodegen.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/SparseGPUCodegen.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/SparseGPUCodegen.cpp
index fb090890a46dfd5..927fc71f84a85a8 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/SparseGPUCodegen.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/SparseGPUCodegen.cpp
@@ -436,7 +436,7 @@ static bool isAdmissibleBSR(SparseTensorType &aTp) {
     // CuSparse only supports "square" blocks currently.
     SmallVector<unsigned> dims = getBlockSize(aTp.getDimToLvl());
     assert(dims.size() == 2);
-    return dims[0] = dims[1] && dims[0] > 1;
+    return dims[0] == dims[1] && dims[0] > 1;
   }
   return false;
 }



More information about the Mlir-commits mailing list