[Mlir-commits] [mlir] [mlir][sparse] update COO buffer reader doc (PR #69664)
Aart Bik
llvmlistbot at llvm.org
Thu Oct 19 17:30:18 PDT 2023
https://github.com/aartbik created https://github.com/llvm/llvm-project/pull/69664
None
>From 67542259f7ad5ca64f887cb861458a83d9e8a66c Mon Sep 17 00:00:00 2001
From: Aart Bik <ajcbik at google.com>
Date: Thu, 19 Oct 2023 17:24:12 -0700
Subject: [PATCH 1/2] [mlir][sparse] update COO buffer reader doc
---
mlir/include/mlir/ExecutionEngine/SparseTensorRuntime.h | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/mlir/include/mlir/ExecutionEngine/SparseTensorRuntime.h b/mlir/include/mlir/ExecutionEngine/SparseTensorRuntime.h
index 8955b79f091977b..5b3d96606607636 100644
--- a/mlir/include/mlir/ExecutionEngine/SparseTensorRuntime.h
+++ b/mlir/include/mlir/ExecutionEngine/SparseTensorRuntime.h
@@ -120,15 +120,16 @@ MLIR_CRUNNERUTILS_EXPORT void _mlir_ciface_getSparseTensorReaderDimSizes(
StridedMemRefType<index_type, 1> *out, void *p);
/// Reads the sparse tensor, stores the coordinates and values to the given
-/// memrefs. Returns a boolean to indicate whether the COO elements are sorted.
-#define DECL_GETNEXT(VNAME, V, CNAME, C) \
+/// memrefs of a (non-permuted) COO in AoS format. Returns a boolean to
+/// indicate whether the COO elements are sorted.
+#define DECL_READTOBUFFERS(VNAME, V, CNAME, C) \
MLIR_CRUNNERUTILS_EXPORT bool \
_mlir_ciface_getSparseTensorReaderReadToBuffers##CNAME##VNAME( \
void *p, StridedMemRefType<index_type, 1> *dim2lvlRef, \
StridedMemRefType<index_type, 1> *lvl2dimRef, \
StridedMemRefType<C, 1> *cref, StridedMemRefType<V, 1> *vref) \
- MLIR_SPARSETENSOR_FOREVERY_V_O(DECL_GETNEXT)
-#undef DECL_GETNEXT
+ MLIR_SPARSETENSOR_FOREVERY_V_O(DECL_READTOBUFFERS)
+#undef DECL_READTOBUFFERS
/// Outputs the sparse tensor dim-rank, nse, and dim-shape.
MLIR_CRUNNERUTILS_EXPORT void _mlir_ciface_outSparseTensorWriterMetaData(
>From eea2ebe4e23f81c1c7a415509ab65384cb0e6963 Mon Sep 17 00:00:00 2001
From: Aart Bik <ajcbik at google.com>
Date: Thu, 19 Oct 2023 17:28:16 -0700
Subject: [PATCH 2/2] edit
---
mlir/include/mlir/ExecutionEngine/SparseTensorRuntime.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mlir/include/mlir/ExecutionEngine/SparseTensorRuntime.h b/mlir/include/mlir/ExecutionEngine/SparseTensorRuntime.h
index 5b3d96606607636..5a620807f15ff7e 100644
--- a/mlir/include/mlir/ExecutionEngine/SparseTensorRuntime.h
+++ b/mlir/include/mlir/ExecutionEngine/SparseTensorRuntime.h
@@ -120,8 +120,8 @@ MLIR_CRUNNERUTILS_EXPORT void _mlir_ciface_getSparseTensorReaderDimSizes(
StridedMemRefType<index_type, 1> *out, void *p);
/// Reads the sparse tensor, stores the coordinates and values to the given
-/// memrefs of a (non-permuted) COO in AoS format. Returns a boolean to
-/// indicate whether the COO elements are sorted.
+/// memrefs of a COO in AoS format. Returns a boolean to indicate whether
+/// the COO elements are sorted.
#define DECL_READTOBUFFERS(VNAME, V, CNAME, C) \
MLIR_CRUNNERUTILS_EXPORT bool \
_mlir_ciface_getSparseTensorReaderReadToBuffers##CNAME##VNAME( \
More information about the Mlir-commits
mailing list