[Mlir-commits] [mlir] [mlir][sparse] try fix flanky test. (PR #71845)

Peiming Liu llvmlistbot at llvm.org
Thu Nov 9 11:04:58 PST 2023


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

None

>From 53e2014f21787c8eed4551eb99c25c6c7aad884e Mon Sep 17 00:00:00 2001
From: Peiming Liu <peiming at google.com>
Date: Thu, 9 Nov 2023 19:04:30 +0000
Subject: [PATCH] [mlir][sparse] try fix flanky test.

---
 .../Dialect/SparseTensor/CPU/sparse_block_matmul.mlir         | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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>) {



More information about the Mlir-commits mailing list