COMPMID-2779: Add support for generating synthetic int8 graphs.
Adds SyntheticDataTypeMutator, which is responsible for mutating graphs
to int8 and thus enable performance analysis on a wider range of models.
Change-Id: I9a00f0ae59421ab11952660f5115b5dcd9314aaf
Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com>
Reviewed-on: https://review.mlplatform.org/c/2418
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
diff --git a/src/graph/Utils.cpp b/src/graph/Utils.cpp
index 4c34dd8..3bf0cac 100644
--- a/src/graph/Utils.cpp
+++ b/src/graph/Utils.cpp
@@ -74,13 +74,17 @@
}
}
-PassManager create_default_pass_manager(Target target)
+PassManager create_default_pass_manager(Target target, const GraphConfig &cfg)
{
PassManager pm;
const bool is_target_gc = target == Target::GC;
// Passes that mutate graph IR
+ if(cfg.convert_to_uint8)
+ {
+ pm.append(support::cpp14::make_unique<SyntheticDataTypeMutator>(), !is_target_gc);
+ }
pm.append(support::cpp14::make_unique<NodeFusionMutator>(), !is_target_gc);
pm.append(support::cpp14::make_unique<GroupedConvolutionMutator>());
pm.append(support::cpp14::make_unique<InPlaceOperationMutator>(), !is_target_gc);