diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2019-12-02 11:58:19 +0000 |
---|---|---|
committer | Michele Di Giorgio <michele.digiorgio@arm.com> | 2019-12-06 14:54:19 +0000 |
commit | f4261adf78bdb9f8b2d6f2970636125096c173cb (patch) | |
tree | a2cf7abd84787720bdc286f09422336691d6fa95 /src/graph/PassManager.cpp | |
parent | 6f58b37a18cfade5dbec38638926f7bd368756d9 (diff) | |
download | ComputeLibrary-f4261adf78bdb9f8b2d6f2970636125096c173cb.tar.gz |
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>
Diffstat (limited to 'src/graph/PassManager.cpp')
-rw-r--r-- | src/graph/PassManager.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
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); } } |