[llvm-branch-commits] [mlir] c6b2c17 - [mlir] Add a print function for memref<*xi64>.

Alexander Belyaev via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Nov 23 07:23:04 PST 2020


Author: Alexander Belyaev
Date: 2020-11-23T16:17:41+01:00
New Revision: c6b2c17e9c28afec7ec6ea10d78d7705d2ec49ea

URL: https://github.com/llvm/llvm-project/commit/c6b2c17e9c28afec7ec6ea10d78d7705d2ec49ea
DIFF: https://github.com/llvm/llvm-project/commit/c6b2c17e9c28afec7ec6ea10d78d7705d2ec49ea.diff

LOG: [mlir] Add a print function for memref<*xi64>.

Differential Revision: https://reviews.llvm.org/D91070

Added: 
    

Modified: 
    mlir/include/mlir/ExecutionEngine/RunnerUtils.h
    mlir/lib/ExecutionEngine/RunnerUtils.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/ExecutionEngine/RunnerUtils.h b/mlir/include/mlir/ExecutionEngine/RunnerUtils.h
index 02e5c153bdbd..4f3cc7753a48 100644
--- a/mlir/include/mlir/ExecutionEngine/RunnerUtils.h
+++ b/mlir/include/mlir/ExecutionEngine/RunnerUtils.h
@@ -225,6 +225,8 @@ _mlir_ciface_print_memref_f64(UnrankedMemRefType<double> *M);
 
 extern "C" MLIR_RUNNERUTILS_EXPORT void print_memref_i32(int64_t rank,
                                                          void *ptr);
+extern "C" MLIR_RUNNERUTILS_EXPORT void print_memref_i64(int64_t rank,
+                                                         void *ptr);
 extern "C" MLIR_RUNNERUTILS_EXPORT void print_memref_f32(int64_t rank,
                                                          void *ptr);
 extern "C" MLIR_RUNNERUTILS_EXPORT void print_memref_f64(int64_t rank,

diff  --git a/mlir/lib/ExecutionEngine/RunnerUtils.cpp b/mlir/lib/ExecutionEngine/RunnerUtils.cpp
index 6df88b2e11ac..19315d7d1e6d 100644
--- a/mlir/lib/ExecutionEngine/RunnerUtils.cpp
+++ b/mlir/lib/ExecutionEngine/RunnerUtils.cpp
@@ -32,6 +32,10 @@ extern "C" void _mlir_ciface_print_memref_i32(UnrankedMemRefType<int32_t> *M) {
   impl::printMemRef(*M);
 }
 
+extern "C" void _mlir_ciface_print_memref_i64(UnrankedMemRefType<int64_t> *M) {
+  impl::printMemRef(*M);
+}
+
 extern "C" void _mlir_ciface_print_memref_f32(UnrankedMemRefType<float> *M) {
   impl::printMemRef(*M);
 }
@@ -45,6 +49,11 @@ extern "C" void print_memref_i32(int64_t rank, void *ptr) {
   _mlir_ciface_print_memref_i32(&descriptor);
 }
 
+extern "C" void print_memref_i64(int64_t rank, void *ptr) {
+  UnrankedMemRefType<int64_t> descriptor = {rank, ptr};
+  _mlir_ciface_print_memref_i64(&descriptor);
+}
+
 extern "C" void print_memref_f32(int64_t rank, void *ptr) {
   UnrankedMemRefType<float> descriptor = {rank, ptr};
   _mlir_ciface_print_memref_f32(&descriptor);


        


More information about the llvm-branch-commits mailing list