aboutsummaryrefslogtreecommitdiff
path: root/src/graph/Utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/graph/Utils.cpp')
-rw-r--r--src/graph/Utils.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/graph/Utils.cpp b/src/graph/Utils.cpp
index 2835af311a..8e12689fb9 100644
--- a/src/graph/Utils.cpp
+++ b/src/graph/Utils.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2020 Arm Limited.
+ * Copyright (c) 2018-2021 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -81,9 +81,22 @@ PassManager create_default_pass_manager(Target target, const GraphConfig &cfg)
const bool is_target_gc = target == Target::GC;
// Passes that mutate graph IR
- if(cfg.convert_to_uint8)
+ if(cfg.use_synthetic_type)
{
- pm.append(std::make_unique<SyntheticDataTypeMutator>(), !is_target_gc);
+ switch(cfg.synthetic_type)
+ {
+ case DataType::QASYMM8:
+ case DataType::QASYMM8_SIGNED:
+ {
+ pm.append(std::make_unique<SyntheticDataTypeMutator>(cfg.synthetic_type), !is_target_gc);
+ break;
+ }
+ default:
+ {
+ ARM_COMPUTE_ERROR("Unsupported DataType for SyntheticDataTypeMutator");
+ break;
+ }
+ }
}
pm.append(std::make_unique<NodeFusionMutator>(), !is_target_gc);
pm.append(std::make_unique<GroupedConvolutionMutator>());