ArmNN
 20.08
ClTunedParameters Class Reference

#include <ClContextControl.hpp>

Inheritance diagram for ClTunedParameters:
IGpuAccTunedParameters

Public Member Functions

 ClTunedParameters (armnn::IGpuAccTunedParameters::Mode mode, armnn::IGpuAccTunedParameters::TuningLevel tuningLevel)
 
virtual void Load (const char *filename)
 Loads an existing set of tuned parameters from the given file. More...
 
virtual void Save (const char *filename) const
 Saves the current set of tuned parameters to the given file. More...
 

Public Attributes

Mode m_Mode
 
TuningLevel m_TuningLevel
 
arm_compute::CLTuner m_Tuner
 

Additional Inherited Members

- Public Types inherited from IGpuAccTunedParameters
enum  Mode { UseTunedParameters, UpdateTunedParameters }
 
enum  TuningLevel { Rapid = 0, Normal = 1, Exhaustive = 2 }
 
- Static Public Member Functions inherited from IGpuAccTunedParameters
static void Destroy (IGpuAccTunedParameters *params)
 
static IGpuAccTunedParametersCreateRaw (Mode mode, TuningLevel tunerMode)
 Creates an IClTunedParameters with the given mode. More...
 
static IGpuAccTunedParametersPtr Create (Mode mode, TuningLevel tunerMode)
 
- Protected Member Functions inherited from IGpuAccTunedParameters
virtual ~IGpuAccTunedParameters ()
 

Detailed Description

Definition at line 42 of file ClContextControl.hpp.

Constructor & Destructor Documentation

◆ ClTunedParameters()

Member Function Documentation

◆ Load()

void Load ( const char *  filename)
virtual

Loads an existing set of tuned parameters from the given file.

If there is an error loading the file, an armnn::Exception is thrown.

Implements IGpuAccTunedParameters.

Definition at line 192 of file ClContextControl.cpp.

References ClTunedParameters::m_Tuner.

193 {
194  try
195  {
196  m_Tuner.load_from_file(filename);
197  }
198  catch (const std::exception& e)
199  {
200  throw armnn::Exception(std::string("Failed to load tuned parameters file '") + filename + "': " +
201  e.what());
202  }
203 }
arm_compute::CLTuner m_Tuner
Base class for all ArmNN exceptions so that users can filter to just those.
Definition: Exceptions.hpp:46

◆ Save()

void Save ( const char *  filename) const
virtual

Saves the current set of tuned parameters to the given file.

If there is an error saving to the file, an armnn::Exception is thrown.

Implements IGpuAccTunedParameters.

Definition at line 205 of file ClContextControl.cpp.

References ClTunedParameters::m_Tuner.

206 {
207  try
208  {
209  m_Tuner.save_to_file(filename);
210  }
211  catch (const std::exception& e)
212  {
213  throw armnn::Exception(std::string("Failed to save tuned parameters file to '") + filename + "': " +
214  e.what());
215  }
216 }
arm_compute::CLTuner m_Tuner
Base class for all ArmNN exceptions so that users can filter to just those.
Definition: Exceptions.hpp:46

Member Data Documentation

◆ m_Mode

Mode m_Mode

Definition at line 50 of file ClContextControl.hpp.

◆ m_Tuner

arm_compute::CLTuner m_Tuner

Definition at line 53 of file ClContextControl.hpp.

Referenced by ClTunedParameters::Load(), and ClTunedParameters::Save().

◆ m_TuningLevel

TuningLevel m_TuningLevel

Definition at line 51 of file ClContextControl.hpp.


The documentation for this class was generated from the following files: