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>
diff --git a/src/graph/Utils.cpp b/src/graph/Utils.cpp
index 2835af3..8e12689 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 @@
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>());