Skip to content

[mlir][sparse] try fix flanky test. #71845

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 9, 2023
Merged

Conversation

PeimingLiu
Copy link
Member

No description provided.

@llvmbot llvmbot added mlir:sparse Sparse compiler in MLIR mlir labels Nov 9, 2023
@llvmbot
Copy link
Member

llvmbot commented Nov 9, 2023

@llvm/pr-subscribers-mlir-sparse

@llvm/pr-subscribers-mlir

Author: Peiming Liu (PeimingLiu)

Changes

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

1 Files Affected:

  • (modified) mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_block_matmul.mlir (+2-2)
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_block_matmul.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_block_matmul.mlir
index 52a698e79086b22..7e9c0ae71a7b7e6 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_block_matmul.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_block_matmul.mlir
@@ -57,7 +57,7 @@ module {
 
 func.func @mul(%arg0: tensor<4x6xf64>,
                %arg1: tensor<4x6xf64, #BSR>) -> tensor<4x4xf64> {
-  %out = tensor.empty() : tensor<4x4xf64>
+  %out = arith.constant dense<0.0> : tensor<4x4xf64>
   %0 = linalg.generic #trait_mul
     ins(%arg0, %arg1: tensor<4x6xf64>, tensor<4x6xf64, #BSR>)
     outs(%out: tensor<4x4xf64>) {
@@ -71,7 +71,7 @@ func.func @mul(%arg0: tensor<4x6xf64>,
 
 func.func @mul_dense(%arg0: tensor<4x6xf64>,
                      %arg1: tensor<4x6xf64>) -> tensor<4x4xf64> {
-  %out = tensor.empty() : tensor<4x4xf64>
+  %out = arith.constant dense<0.0> : tensor<4x4xf64>
   %0 = linalg.generic #trait_mul
     ins(%arg0, %arg1: tensor<4x6xf64>, tensor<4x6xf64>)
     outs(%out: tensor<4x4xf64>) {

@PeimingLiu PeimingLiu merged commit 30e4b09 into llvm:main Nov 9, 2023
@PeimingLiu PeimingLiu deleted the try-fix branch November 9, 2023 19:11
PeimingLiu added a commit that referenced this pull request Nov 9, 2023
Should have been fixed by initializing output tensor to zeros in
#71845
zahiraam pushed a commit to zahiraam/llvm-project that referenced this pull request Nov 20, 2023
zahiraam pushed a commit to zahiraam/llvm-project that referenced this pull request Nov 20, 2023
Should have been fixed by initializing output tensor to zeros in
llvm#71845
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.

3 participants