Skip to content

[mlir][sparsifier] fix isAdmissibleBSR #72195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 14, 2023
Merged

Conversation

makslevental
Copy link
Contributor

Fixes #72194.

@makslevental makslevental requested a review from aartbik November 14, 2023 02:44
@llvmbot llvmbot added mlir:sparse Sparse compiler in MLIR mlir labels Nov 14, 2023
@llvmbot
Copy link
Member

llvmbot commented Nov 14, 2023

@llvm/pr-subscribers-mlir-sparse

@llvm/pr-subscribers-mlir

Author: Maksim Levental (makslevental)

Changes

Fixes #72194.


Full diff: https://github.com/llvm/llvm-project/pull/72195.diff

1 Files Affected:

  • (modified) mlir/lib/Dialect/SparseTensor/Transforms/SparseGPUCodegen.cpp (+1-1)
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;
 }

@aartbik
Copy link
Contributor

aartbik commented Nov 14, 2023

Thanks for fixing this! Not sure how this slipped through ;-)

@makslevental makslevental merged commit e35b606 into llvm:main Nov 14, 2023
@makslevental makslevental deleted the fix_sparse branch November 14, 2023 22:56
zahiraam pushed a commit to zahiraam/llvm-project that referenced this pull request Nov 20, 2023
Guzhu-AMD pushed a commit to GPUOpen-Drivers/llvm-project that referenced this pull request Nov 23, 2023
Local branch amd-gfx b59526a Merged main:410f130bb99b into amd-gfx:c44543097cba
Remote branch main e35b606 [mlir][sparsifier] fix `isAdmissibleBSR` (llvm#72195)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mlir:sparse Sparse compiler in MLIR mlir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[mlir][sparsifier] potential bug in isAdmissibleBSR
3 participants