[Mlir-commits] [mlir] 5711eaf - [mlir] Added support for f64 memref printing in runner utils
Jakub Lichman
llvmlistbot at llvm.org
Wed Sep 23 05:39:41 PDT 2020
Author: Jakub Lichman
Date: 2020-09-23T12:38:58Z
New Revision: 5711eaf608addccc5a23f0ea00630aa30280ea13
URL: https://github.com/llvm/llvm-project/commit/5711eaf608addccc5a23f0ea00630aa30280ea13
DIFF: https://github.com/llvm/llvm-project/commit/5711eaf608addccc5a23f0ea00630aa30280ea13.diff
LOG: [mlir] Added support for f64 memref printing in runner utils
Added print_memref_f64 function to runner utils.
Differential Revision: https://reviews.llvm.org/D88143
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 7729b9c88796..045e69557056 100644
--- a/mlir/include/mlir/ExecutionEngine/RunnerUtils.h
+++ b/mlir/include/mlir/ExecutionEngine/RunnerUtils.h
@@ -220,11 +220,15 @@ extern "C" MLIR_RUNNERUTILS_EXPORT void
_mlir_ciface_print_memref_i8(UnrankedMemRefType<int8_t> *M);
extern "C" MLIR_RUNNERUTILS_EXPORT void
_mlir_ciface_print_memref_f32(UnrankedMemRefType<float> *M);
+extern "C" MLIR_RUNNERUTILS_EXPORT void
+_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_f32(int64_t rank,
void *ptr);
+extern "C" MLIR_RUNNERUTILS_EXPORT void print_memref_f64(int64_t rank,
+ void *ptr);
extern "C" MLIR_RUNNERUTILS_EXPORT void
_mlir_ciface_print_memref_0d_f32(StridedMemRefType<float, 0> *M);
diff --git a/mlir/lib/ExecutionEngine/RunnerUtils.cpp b/mlir/lib/ExecutionEngine/RunnerUtils.cpp
index 7497ebdacf68..6df88b2e11ac 100644
--- a/mlir/lib/ExecutionEngine/RunnerUtils.cpp
+++ b/mlir/lib/ExecutionEngine/RunnerUtils.cpp
@@ -36,6 +36,10 @@ extern "C" void _mlir_ciface_print_memref_f32(UnrankedMemRefType<float> *M) {
impl::printMemRef(*M);
}
+extern "C" void _mlir_ciface_print_memref_f64(UnrankedMemRefType<double> *M) {
+ impl::printMemRef(*M);
+}
+
extern "C" void print_memref_i32(int64_t rank, void *ptr) {
UnrankedMemRefType<int32_t> descriptor = {rank, ptr};
_mlir_ciface_print_memref_i32(&descriptor);
@@ -46,6 +50,11 @@ extern "C" void print_memref_f32(int64_t rank, void *ptr) {
_mlir_ciface_print_memref_f32(&descriptor);
}
+extern "C" void print_memref_f64(int64_t rank, void *ptr) {
+ UnrankedMemRefType<double> descriptor = {rank, ptr};
+ _mlir_ciface_print_memref_f64(&descriptor);
+}
+
extern "C" void
_mlir_ciface_print_memref_0d_f32(StridedMemRefType<float, 0> *M) {
impl::printMemRef(*M);
More information about the Mlir-commits
mailing list