commit | 82d08b663230c79ebfefb608f8c7b88dc63b0ea6 | [log] [tgz] |
---|---|---|
author | Tai Ly <tai.ly@arm.com> | Wed Apr 24 21:29:54 2024 +0000 |
committer | Tai Ly <tai.ly@arm.com> | Tue Apr 30 10:48:09 2024 -0700 |
tree | b5f158e4b83592f4e5e57d4deb7fb4e8c82af40f | |
parent | d448e3476e04c459c0acb664d2e3e1eecd0fe30f [diff] |
update serialization_lib for flatbuffer v24.3.7 Signed-off-by: Tai Ly <tai.ly@arm.com> Change-Id: I4b12cecf7d6e606a99ea93a31148be08ed21f3fc
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.