tag | 3d3c2b5e5197cc6e95f4fb1d09a14a9309998a5e | |
---|---|---|
tagger | Eric Kunze <eric.kunze@arm.com> | Tue Oct 03 16:40:16 2023 -0700 |
object | edc04e0ef1a93d1bf4578308d620dd49c10e1ad4 |
Start of work on TOSA v0.90
commit | edc04e0ef1a93d1bf4578308d620dd49c10e1ad4 | [log] [tgz] |
---|---|---|
author | Jerry Ge <jerry.ge@arm.com> | Mon Sep 19 21:07:38 2022 -0700 |
committer | Tai Ly <tai.ly@arm.com> | Thu Sep 07 13:17:16 2023 -0700 |
tree | 1044165c16528a17337f81aa15361c7b77aafe7f | |
parent | 7566d1235cb646e46531c2eb34757cb4b3efa933 [diff] |
[tosa_mlir_translator] Support Tosa StatefulOps Signed-off-by: Jerry Ge <jerry.ge@arm.com> Change-Id: I6ce5a917cada436f6a80e6d85e670d6cd44e01e9
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.