From 36a0a4608bf413fc1fd65eb335bfb736ef602149 Mon Sep 17 00:00:00 2001 From: Gian Marco Date: Fri, 12 Jan 2018 10:21:40 +0000 Subject: COMPMID-748 - Integrating optimized SGEMM for bifrost This patch introduces a new GEMM capable to improve the mac utilisation of 10% compared to the GEMM without reshape. However this implementation is not faster in all cases as we need to take into account the time for reshaping the matrices. For this reason an heuristic solution to select the optimal GEMM to use has been added to the function. More information about the heuristic implementation can be found at COMPMID-852. With this new patch, GoogleNet, MobileNet, VGG16 and SqueezeNet can improved the performance of 1.5x. More information about the performance uplift can be found here: https://confluence.arm.com/display/MLENG/GEMM+FP32+performance%3A+ACL+18.02 Change-Id: I024563c06b9aed02a211a974e452bae5c233b04c Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/117140 Reviewed-by: Pablo Tello Tested-by: Jenkins Reviewed-by: Anthony Barbier --- src/graph/Graph.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/graph') diff --git a/src/graph/Graph.cpp b/src/graph/Graph.cpp index ac5316f55e..e14bea0846 100644 --- a/src/graph/Graph.cpp +++ b/src/graph/Graph.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -215,11 +215,25 @@ void Graph::add_tensor_object(std::unique_ptr tensor) _pimpl->_graph_output->allocate(); } } + bool Graph::opencl_is_available() { return arm_compute::opencl_is_available(); } +arm_compute::GPUTarget Graph::gpu_target() +{ + // Check if OpenCL is available before returning the GPU target + if(opencl_is_available()) + { + return arm_compute::CLScheduler::get().target(); + } + else + { + return GPUTarget::MIDGARD; + } +} + void Graph::set_temp(TensorInfo &&tmp) { ARM_COMPUTE_ERROR_ON(_pimpl->_graph_input == nullptr); -- cgit v1.2.1