aboutsummaryrefslogtreecommitdiff
path: root/src/graph/Utils.cpp
diff options
context:
space:
mode:
authorSiCongLi <sicong.li@arm.com>2021-03-01 15:26:18 +0000
committerSiCong Li <sicong.li@arm.com>2021-03-03 10:45:00 +0000
commitf466d75f85938b96dd14675ec091193bdce12122 (patch)
treeb4dcb0f1c5e2bf15ba129525d0271e48a9b0f2a6 /src/graph/Utils.cpp
parent793daa138aee628bf80289191061ec8c81421bd2 (diff)
downloadComputeLibrary-f466d75f85938b96dd14675ec091193bdce12122.tar.gz
Add QASYMM8_SIGNED support to graph examples via graph mutator
Related to COMPMID-4279 Signed-off-by: SiCongLi <sicong.li@arm.com> Change-Id: I6c737536b4e614cc9975003acca766803f55bf0b Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5206 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
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>());