aboutsummaryrefslogtreecommitdiff
path: root/include/DeserializationPasses.h
AgeCommit message (Collapse)Author
2023-05-06Add BuildMlirFromTosaFile APITai Ly
This BuildMlirFromTosaFile API deserializes a tosa fbs or json file and returns a mlir module as OwningOpRef<ModuleOp> This also refactors the existing deserialization passes to use the new API, and then copy the deserialized module's main function into the existing function, and copy all attributes of the new function and new module into the existing function and module. This allows testing of the new API by running deserialization passes. Here is an example showing the attributes on the deserialized module and functions: module attributes {tf_saved_model.semantics, tosa.description = "Tosa FBS Converted", tosa.fbs_version = "0.70.0d"} { func.func @main(%arg0: tensor<1x256x256x3xui8> {tf_saved_model.index_path = ["input_0"]}) -> (tensor<1x1x17x3xf32> {tf_saved_model.index_path = ["output_0"]}) attributes {tf.entry_function = {inputs = "tosa_de serialized_input_0:0", outputs = "tosa_deserialized_output_0:0"}, tf_saved_model.exported_names = ["tosa_deserialized"]} { Signed-off-by: Tai Ly <tai.ly@arm.com> Change-Id: Ia6c0202ef43ce5d37788cd459ed7c3f8424dd619
2023-03-06Add Tosa DeserializationTai Ly
Signed-off-by: Tai Ly <tai.ly@arm.com> Change-Id: I8b0220a8465e75b1accf6b0854e911a425730da6