commit | ff9966e44e32f16065c6057c1288fb635a9c99ca | [log] [tgz] |
---|---|---|
author | Eric Kunze <eric.kunze@arm.com> | Thu May 25 16:45:09 2023 -0700 |
committer | Eric Kunze <eric.kunze@arm.com> | Thu May 25 20:56:45 2023 -0700 |
tree | 508342eda54850c9ab3337891f3e69197da70f60 | |
parent | 32c1ebb96acef4f467e8468f84815e0d6bf9effb [diff] |
Update serialization library to 0.70 release Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I5a8df06bc07718e6245bf2b1739bba1e26d54b4a
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.
##TOSA serialization library https://review.mlplatform.org/plugins/gitiles/tosa/serialization_lib The library includes a FlatBuffers schema and a C++ API for reading and writing a TOSA graph as a flatbuffer.
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.
To serialize a TOSA MLIR graph to TOSA flatbuffer binary file:
<YOUR_MLIR_OPTIMIZER> --tosa-serialize <TOSA_MLIR_GRAPH>
--tosa-flatbuffer-filename <TOSA_FLATBUFFER_FILENAME>
To serialize a TOSA MLIR graph to TOSA flatbuffer JSON file:
<YOUR_MLIR_OPTIMIZER> --tosa-serialize <TOSA_MLIR_GRAPH>
--tosa-flatbuffer-schema <PATH_TO_TOSA_FLATBUFFER_SCHEMA>
--tosa-flatbuffer-filename <TOSA_FLATBUFFER_FILENAME>
where <PATH_TO_TOSA_FLATBUFFER_SCHEMA> is provided within the serialization library submodule in third_party/serialization_lib/schema/tosa.fbs
The TOSA MLIR Translator is licensed under Apache-2.0 with LLVM Exceptions.