summaryrefslogtreecommitdiffstats
path: root/mlir/test/mlir-cpu-runner/include/mlir_runner_utils.h
Commit message (Collapse)AuthorAgeFilesLines
* [mlir] mlir-cpu-runner test's cblas_interface should export functions on WindowsKern Handa2020-01-091-3/+3
| | | | | | | | | | | | This change fixes the build on Windows, so that cblas_interface.dll exports functions correctly and an implib is created and installed correctly. Currently, LLVM cannot be consumed on Windows after it has been installed in a location because cblas_interface.lib is not created/installed, thus failing the import check in `LLVMExports.cmake`. Differential Revision: https://reviews.llvm.org/D72384
* [mlir] Fix -Wunneeded-internal-declarationFangrui Song2019-12-241-1/+1
|
* Adjust License.txt file to use the LLVM licenseMehdi Amini2019-12-231-13/+4
| | | | PiperOrigin-RevId: 286906740
* Add runtime utils support for print_memref_i8Nicolas Vasilache2019-12-181-5/+8
| | | | | | This CL adds print_memref_i8 along with a unit test. PiperOrigin-RevId: 286299237
* [VectorOps] Add vector.print definition, with lowering supportAart Bik2019-12-181-0/+8
| | | | | | | | | | | | | | | | Examples: vector.print %f : f32 vector.print %x : vector<4xf32> vector.print %y : vector<3x4xf32> vector.print %z : vector<2x3x4xf32> LLVM lowering replaces these with fully unrolled calls into a small runtime support library that provides some basic printing operations (single value, opening closing bracket, comma, newline). PiperOrigin-RevId: 286230325
* Move cpu runner utils templates to .hNicolas Vasilache2019-12-121-17/+164
| | | | | | | | This allows reusing the implementation in various places by just including and permits more easily writing test functions without explicit template instantiations. This also modifies UnrankedMemRefType to take a template type parameter since it cannot be type agnostic atm. PiperOrigin-RevId: 285187711
* Add UnrankedMemRef Typenmostafa2019-12-051-0/+15
| | | | | | | Closes tensorflow/mlir#261 COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/261 from nmostafa:nmostafa/unranked 96b6e918f6ed64496f7573b2db33c0b02658ca45 PiperOrigin-RevId: 284037040
* Add StridedMemRef<>::operator[] - NFCNicolas Vasilache2019-11-201-0/+29
| | | | | | This operator is used for internal debugging purposes. PiperOrigin-RevId: 281544152
* Add support for alignment attribute in std.alloc.Nicolas Vasilache2019-11-121-0/+2
| | | | | | | | | | | | This CL adds an extra pointer to the memref descriptor to allow specifying alignment. In a previous implementation, we used 2 types: `linalg.buffer` and `view` where the buffer type was the unit of allocation/deallocation/alignment and `view` was the unit of indexing. After multiple discussions it was decided to use a single type, which conflates both, so the memref descriptor now needs to carry both pointers. This is consistent with the [RFC-Proposed Changes to MemRef and Tensor MLIR Types](https://groups.google.com/a/tensorflow.org/forum/#!searchin/mlir/std.view%7Csort:date/mlir/-wKHANzDNTg/4K6nUAp8AAAJ). PiperOrigin-RevId: 279959463
* Add conversion for splat of vectors of 2+DNicolas Vasilache2019-10-151-0/+15
| | | | | | | This CL adds a missing lowering for splat of multi-dimensional vectors. Additional support is also added to the runtime utils library to allow printing memrefs with such vectors. PiperOrigin-RevId: 274794723
* Fix Windows linkage errorNicolas Vasilache2019-10-091-10/+10
| | | | | | | This CL fixes bad macro names usage in mlir_runner_utils.h. The macro mlir_runner_utils_EXPORTS now matches what is defined in CMakeLists.txt. PiperOrigin-RevId: 273773931
* Start a minimal mlir_utils runtime library for testing debugging purposesNicolas Vasilache2019-10-071-0/+80
Now that MLIR has a standardized StridedMemRef descriptor, it becomes very easy to interact with external library functions and build utilities directly in C++. This CL introduces basic printing support in a libmlir_utils.so. Unit tests are rewritten using this feature and also to improve coverage. For now, C mandates that we have a unique function for each MemRef element type and rank. In a future a simple unranked descriptor can be introduced to only require uniqu'ing by element type. PiperOrigin-RevId: 273304741
OpenPOWER on IntegriCloud