[Mlir-commits] [mlir] 1c7ffe0 - [mlir][sparse] add test that combines sparse codegen and lowering to llvm struct
Aart Bik
llvmlistbot at llvm.org
Wed Jan 4 12:12:40 PST 2023
Author: Aart Bik
Date: 2023-01-04T12:12:31-08:00
New Revision: 1c7ffe0c38ebbda5ee272e47ec2154f445d8f82e
URL: https://github.com/llvm/llvm-project/commit/1c7ffe0c38ebbda5ee272e47ec2154f445d8f82e
DIFF: https://github.com/llvm/llvm-project/commit/1c7ffe0c38ebbda5ee272e47ec2154f445d8f82e.diff
LOG: [mlir][sparse] add test that combines sparse codegen and lowering to llvm struct
Reviewed By: bixia
Differential Revision: https://reviews.llvm.org/D141006
Added:
mlir/test/Dialect/SparseTensor/codegen_to_llvm.mlir
Modified:
Removed:
################################################################################
diff --git a/mlir/test/Dialect/SparseTensor/codegen_to_llvm.mlir b/mlir/test/Dialect/SparseTensor/codegen_to_llvm.mlir
new file mode 100644
index 0000000000000..50e3a444b5758
--- /dev/null
+++ b/mlir/test/Dialect/SparseTensor/codegen_to_llvm.mlir
@@ -0,0 +1,14 @@
+// RUN: mlir-opt %s --sparse-tensor-codegen --sparse-storage-specifier-to-llvm | FileCheck %s
+
+#SparseVector = #sparse_tensor.encoding<{ dimLevelType = ["compressed"] }>
+
+// CHECK-LABEL: func @sparse_nop(
+// CHECK-SAME: %[[A0:.*0]]: memref<?xindex>,
+// CHECK-SAME: %[[A1:.*1]]: memref<?xindex>,
+// CHECK-SAME: %[[A2:.*2]]: memref<?xf64>,
+// CHECK-SAME: %[[A3:.*3]]: !llvm.struct<(array<1 x i64>, array<3 x i64>)>)
+// CHECK: return %[[A0]], %[[A1]], %[[A2]], %[[A3]] :
+// CHECK-SAME: memref<?xindex>, memref<?xindex>, memref<?xf64>, !llvm.struct<(array<1 x i64>, array<3 x i64>)>
+func.func @sparse_nop(%arg0: tensor<?xf64, #SparseVector>) -> tensor<?xf64, #SparseVector> {
+ return %arg0 : tensor<?xf64, #SparseVector>
+}
More information about the Mlir-commits
mailing list