From f466d75f85938b96dd14675ec091193bdce12122 Mon Sep 17 00:00:00 2001 From: SiCongLi Date: Mon, 1 Mar 2021 15:26:18 +0000 Subject: Add QASYMM8_SIGNED support to graph examples via graph mutator Related to COMPMID-4279 Signed-off-by: SiCongLi Change-Id: I6c737536b4e614cc9975003acca766803f55bf0b Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5206 Tested-by: Arm Jenkins Reviewed-by: Georgios Pinitas Comments-Addressed: Arm Jenkins --- src/graph/Utils.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'src/graph/Utils.cpp') 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(), !is_target_gc); + switch(cfg.synthetic_type) + { + case DataType::QASYMM8: + case DataType::QASYMM8_SIGNED: + { + pm.append(std::make_unique(cfg.synthetic_type), !is_target_gc); + break; + } + default: + { + ARM_COMPUTE_ERROR("Unsupported DataType for SyntheticDataTypeMutator"); + break; + } + } } pm.append(std::make_unique(), !is_target_gc); pm.append(std::make_unique()); -- cgit v1.2.1