summaryrefslogtreecommitdiffstats
path: root/mlir/test/mlir-cpu-runner/mlir_runner_utils.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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-10/+26
| | | | | | This CL adds print_memref_i8 along with a unit test. PiperOrigin-RevId: 286299237
* [VectorOps] Replace iostream with stdio in support lib for vector.printAart Bik2019-12-181-6/+8
| | | | PiperOrigin-RevId: 286252829
* [VectorOps] Add vector.print definition, with lowering supportAart Bik2019-12-181-0/+11
| | | | | | | | | | | | | | | | 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-141/+8
| | | | | | | | 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-7/+28
| | | | | | | Closes tensorflow/mlir#261 COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/261 from nmostafa:nmostafa/unranked 96b6e918f6ed64496f7573b2db33c0b02658ca45 PiperOrigin-RevId: 284037040
* Fix pretty printer corner case in mlir_runner_utils.cpp.Nicolas Vasilache2019-11-191-13/+8
| | | | | | | In the particular case where the size of a memref dimension is 1, double printing would happen because printLast was called unconditionally. This CL fixes the print and updates an incorrect test that should have caught this in the first place. PiperOrigin-RevId: 281345142
* Consistent use of int in mlir_runner_utils.cppNicolas Vasilache2019-10-151-1/+1
| | | | | | This should fix the OSS build by only using int in template types. PiperOrigin-RevId: 274843584
* Add conversion for splat of vectors of 2+DNicolas Vasilache2019-10-151-39/+103
| | | | | | | 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
* Start a minimal mlir_utils runtime library for testing debugging purposesNicolas Vasilache2019-10-071-0/+118
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