From 80a022fd103b26a03a04e0565c4d263f73d950b8 Mon Sep 17 00:00:00 2001 From: Kevin Cheng Date: Mon, 15 Nov 2021 17:07:37 -0800 Subject: First commit of tosa serialize passes Signed-off-by: Kevin Cheng Change-Id: I1551017706f6e8af604792f48cdeb49b4da7ef0d --- README.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 README.md (limited to 'README.md') diff --git a/README.md b/README.md new file mode 100644 index 0000000..46039b7 --- /dev/null +++ b/README.md @@ -0,0 +1,49 @@ +TOSA MLIR Translator +========================== + +# Introduction + +The *TOSA MLIR Translator* repository implements translators between the TOSA MLIR +dialect and serialized representations. + +The current implementation supports serialization from MLIR form to flatbuffers. +A deserializer from flatbuffers to MLIR form is in development. + +# Dependencies + +##TOSA serialization library + +The library includes a FlatBuffers schema and a C++ API for reading and writing a TOSA +graph as a flatbuffer. + +# Compiling + +This repository does not currently build standalone. It must be included within another +MLIR repository with a pass manager registering the passes implemented within this +repository. + +The included CMake rules can be used to add this repository as a submodule. +The include/SerializationPasses.h enables MLIR pass registration inclusion. + +If target "tosa_serialize" is linked correctly, you should able to see "--tosa-serialize" +and "--tosa-serialize-json" options available in your MLIR pass manager/MLIR optimizer. + +# Usage + +To serialize a TOSA MLIR graph to TOSA flatbuffer binary file: + + \ --tosa-serialize \ \ + --tosa-flatbuffer-filename \ + +To serialize a TOSA MLIR graph to TOSA flatbuffer JSON file: + + \ --tosa-serialize \ \ + --tosa-flatbuffer-schema \ \ + --tosa-flatbuffer-filename \ + + where \ is provided within the serialization library + submodule in third_party/serialization_lib/schema/tosa.fbs + +# License + +The *TOSA MLIR Translator* is licensed under Apache-2.0 with LLVM Exceptions. -- cgit v1.2.1