From e70ebc17658840f2099facca72e2194ae593f820 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Mon, 10 Sep 2018 19:53:06 +0100 Subject: COMPMID-1451: Add QASYMM8 in DragonBench Change-Id: I7a4ae45c5b18ffda1a6d3fbe6304814cc1d3f288 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/147628 Tested-by: Jenkins Reviewed-by: Anthony Barbier --- tests/benchmark/CL/DragonBench.cpp | 2 +- tests/benchmark/NEON/DragonBench.cpp | 4 ++-- tests/benchmark/fixtures/DragonBenchFixture.h | 11 ++++++----- 3 files changed, 9 insertions(+), 8 deletions(-) (limited to 'tests/benchmark') diff --git a/tests/benchmark/CL/DragonBench.cpp b/tests/benchmark/CL/DragonBench.cpp index 6e047a5fa1..d83878fa21 100644 --- a/tests/benchmark/CL/DragonBench.cpp +++ b/tests/benchmark/CL/DragonBench.cpp @@ -47,7 +47,7 @@ namespace benchmark namespace { // Common DragonBench parameters -auto CommonParams = combine(combine(framework::dataset::make("DataType", { DataType::F16, DataType::F32 }), +auto CommonParams = combine(combine(framework::dataset::make("DataType", { DataType::QASYMM8, DataType::F16, DataType::F32 }), framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), framework::dataset::make("HasBias", { true, false })); } // namespace diff --git a/tests/benchmark/NEON/DragonBench.cpp b/tests/benchmark/NEON/DragonBench.cpp index 5544b8a9e7..31bf6efb70 100644 --- a/tests/benchmark/NEON/DragonBench.cpp +++ b/tests/benchmark/NEON/DragonBench.cpp @@ -47,9 +47,9 @@ namespace benchmark namespace { #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC -const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32 }); +const auto data_types = framework::dataset::make("DataType", { DataType::QASYMM8, DataType::F16, DataType::F32 }); #else /* __ARM_FEATURE_FP16_VECTOR_ARITHMETIC */ -const auto data_types = framework::dataset::make("DataType", { DataType::F32 }); +const auto data_types = framework::dataset::make("DataType", { DataType::QASYMM8, DataType::F32 }); #endif /* __ARM_FEATURE_FP16_VECTOR_ARITHMETIC */ // Common DragonBench parameters diff --git a/tests/benchmark/fixtures/DragonBenchFixture.h b/tests/benchmark/fixtures/DragonBenchFixture.h index b9b3a180ac..526a798154 100644 --- a/tests/benchmark/fixtures/DragonBenchFixture.h +++ b/tests/benchmark/fixtures/DragonBenchFixture.h @@ -68,13 +68,14 @@ public: } // Determine bias data type - DataType bias_data_type = is_data_type_quantized_asymmetric(data_type) ? DataType::S32 : data_type; + DataType bias_data_type = is_data_type_quantized_asymmetric(data_type) ? DataType::S32 : data_type; + const QuantizationInfo q_info(2.f, 10); // Create tensors - src = create_tensor(src_shape, data_type, 1, QuantizationInfo(), data_layout); - weights = create_tensor(weights_shape, data_type, 1, QuantizationInfo(), data_layout); - biases = create_tensor(biases_shape, bias_data_type, 1, QuantizationInfo(), data_layout); - dst = create_tensor(dst_shape, data_type, 1, QuantizationInfo(), data_layout); + src = create_tensor(src_shape, data_type, 1, q_info, data_layout); + weights = create_tensor(weights_shape, data_type, 1, q_info, data_layout); + biases = create_tensor(biases_shape, bias_data_type, 1, q_info, data_layout); + dst = create_tensor(dst_shape, data_type, 1, q_info, data_layout); // Create and configure function conv_layer.configure(&src, &weights, has_bias ? &biases : nullptr, &dst, info); -- cgit v1.2.1