ArmNN
 23.08
ClTunedParameters Class Reference

#include <ArmComputeTuningUtils.hpp>

Inheritance diagram for ClTunedParameters:
[legend]
Collaboration diagram for ClTunedParameters:
[legend]

Public Member Functions

 ClTunedParameters (IGpuAccTunedParameters::Mode mode, 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
 
arm_compute::CLGEMMHeuristicsHandle m_HeuristicsHandle
 

Additional Inherited Members

- Public Types inherited from IGpuAccTunedParameters
enum  Mode { UseTunedParameters, UpdateTunedParameters }
 
enum  TuningLevel { Rapid = 1, Normal = 2, Exhaustive = 3 }
 
- 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 69 of file ArmComputeTuningUtils.hpp.

Constructor & Destructor Documentation

◆ ClTunedParameters()

Definition at line 28 of file ArmComputeTuningUtils.cpp.

30  : m_Mode(mode)
31  , m_TuningLevel(tuningLevel)
33 {
34 }

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 36 of file ArmComputeTuningUtils.cpp.

37 {
38  try
39  {
40  m_Tuner.load_from_file(filename);
41  }
42  catch (const std::exception& e)
43  {
44  throw Exception(std::string("Failed to load tuned parameters file '") + filename + "': " + e.what());
45  }
46 }

References ClTunedParameters::m_Tuner.

◆ 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 48 of file ArmComputeTuningUtils.cpp.

49 {
50  try
51  {
52  m_Tuner.save_to_file(filename);
53  }
54  catch (const std::exception& e)
55  {
56  throw Exception(std::string("Failed to save tuned parameters file to '") + filename + "': " + e.what());
57  }
58 }

References ClTunedParameters::m_Tuner.

Member Data Documentation

◆ m_HeuristicsHandle

arm_compute::CLGEMMHeuristicsHandle m_HeuristicsHandle

Definition at line 81 of file ArmComputeTuningUtils.hpp.

◆ m_Mode

Mode m_Mode

Definition at line 77 of file ArmComputeTuningUtils.hpp.

◆ m_Tuner

arm_compute::CLTuner m_Tuner

Definition at line 80 of file ArmComputeTuningUtils.hpp.

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

◆ m_TuningLevel

TuningLevel m_TuningLevel

Definition at line 78 of file ArmComputeTuningUtils.hpp.


The documentation for this class was generated from the following files:
armnn::ClTunedParameters::m_Mode
Mode m_Mode
Definition: ArmComputeTuningUtils.hpp:77
armnn::ClTunedParameters::m_Tuner
arm_compute::CLTuner m_Tuner
Definition: ArmComputeTuningUtils.hpp:80
armnn::IGpuAccTunedParameters::Mode::UpdateTunedParameters
@ UpdateTunedParameters
armnn::ClTunedParameters::m_TuningLevel
TuningLevel m_TuningLevel
Definition: ArmComputeTuningUtils.hpp:78