2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
7 #include "armnn/IRuntime.hpp"
9 #include <arm_compute/runtime/CL/CLTuner.h>
14 // ARM Compute OpenCL context control.
15 class ClContextControl
19 ClContextControl(arm_compute::CLTuner* = nullptr,
20 bool profilingEnabled = false);
22 virtual ~ClContextControl();
24 void LoadOpenClRuntime();
26 // Users should call this (after freeing all of the cl::Context objects they use)
27 // to release the cached memory used by the compute library.
28 void UnloadOpenClRuntime();
30 // Clear the CL cache, without losing the tuned parameter settings.
35 void DoLoadOpenClRuntime(bool updateTunedParameters);
37 arm_compute::CLTuner* m_Tuner;
39 bool m_ProfilingEnabled;
42 class ClTunedParameters : public IGpuAccTunedParameters
45 ClTunedParameters(armnn::IGpuAccTunedParameters::Mode mode, armnn::IGpuAccTunedParameters::TuningLevel tuningLevel);
47 virtual void Load(const char* filename);
48 virtual void Save(const char* filename) const;
51 TuningLevel m_TuningLevel;
53 arm_compute::CLTuner m_Tuner;