From f4261adf78bdb9f8b2d6f2970636125096c173cb Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Mon, 2 Dec 2019 11:58:19 +0000 Subject: 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 Reviewed-on: https://review.mlplatform.org/c/2418 Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Michele Di Giorgio --- src/graph/PassManager.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/graph/PassManager.cpp') diff --git a/src/graph/PassManager.cpp b/src/graph/PassManager.cpp index 92860e2987..99d979842a 100644 --- a/src/graph/PassManager.cpp +++ b/src/graph/PassManager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 ARM Limited. + * Copyright (c) 2018-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -70,7 +70,19 @@ void PassManager::run_all(Graph &g) } } -void PassManager::run(Graph &g, size_t index) +void PassManager::run_type(Graph &g, IGraphMutator::MutationType type) +{ + for(auto &pass : _passes) + { + if(pass && (pass->type() == type)) + { + ARM_COMPUTE_LOG_GRAPH_INFO("Running mutating pass : " << pass->name() << std::endl); + pass->mutate(g); + } + } +} + +void PassManager::run_index(Graph &g, size_t index) { if(index >= _passes.size()) { @@ -78,9 +90,9 @@ void PassManager::run(Graph &g, size_t index) } auto &pass = _passes.at(index); - if(pass != nullptr) { + ARM_COMPUTE_LOG_GRAPH_INFO("Running mutating pass : " << pass->name() << std::endl); pass->mutate(g); } } -- cgit v1.2.1