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

Differential Revision: https://reviews.llvm.org/D91070
This commit is contained in:
Alexander Belyaev 2020-11-23 15:55:42 +01:00
parent 590aaa5077
commit c6b2c17e9c
2 changed files with 11 additions and 0 deletions

View File

@ -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,

View File

@ -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);