From e083771a1f28c34485f0d0054e2645070df98846 Mon Sep 17 00:00:00 2001 From: Giorgio Arena Date: Tue, 12 Jun 2018 11:30:50 +0100 Subject: COMPMID-1160 Turn Graph hints into heuristics Change-Id: Id24c2f07c59d863f8e1af6a1afbf6a542b2b9954 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/135142 Tested-by: Jenkins Reviewed-by: Pablo Tello Reviewed-by: Anthony Barbier --- examples/graph_vgg16.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'examples/graph_vgg16.cpp') diff --git a/examples/graph_vgg16.cpp b/examples/graph_vgg16.cpp index 72e724025b..d70c56eadd 100644 --- a/examples/graph_vgg16.cpp +++ b/examples/graph_vgg16.cpp @@ -51,13 +51,9 @@ public: std::unique_ptr preprocessor = arm_compute::support::cpp14::make_unique(mean_rgb); // Set target. 0 (NEON), 1 (OpenCL), 2 (OpenCL with Tuner). By default it is NEON - const int target = argc > 1 ? std::strtol(argv[1], nullptr, 10) : 0; - Target target_hint = set_target_hint(target); - const bool is_opencl = target_hint == Target::CL; - - ConvolutionMethod first_convolution3x3_hint = is_opencl ? ConvolutionMethod::DIRECT : ConvolutionMethod::GEMM; - ConvolutionMethod convolution3x3_hint = ConvolutionMethod::DEFAULT; - FastMathHint fast_math_hint = FastMathHint::DISABLED; + const int target = argc > 1 ? std::strtol(argv[1], nullptr, 10) : 0; + Target target_hint = set_target_hint(target); + FastMathHint fast_math_hint = FastMathHint::DISABLED; // Parse arguments if(argc < 2) @@ -102,7 +98,6 @@ public: graph << target_hint << fast_math_hint - << first_convolution3x3_hint << InputLayer(TensorDescriptor(TensorShape(224U, 224U, 3U, 1U), DataType::F32), get_input_accessor(image, std::move(preprocessor))) // Layer 1 @@ -113,7 +108,6 @@ public: PadStrideInfo(1, 1, 1, 1)) .set_name("conv1_1") << ActivationLayer(ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU)).set_name("conv1_1/Relu") - << convolution3x3_hint // Layer 2 << ConvolutionLayer( 3U, 3U, 64U, -- cgit v1.2.1