ArmNN
 25.02
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
IGpuAccTunedParameters Class Referenceabstract

Manages a set of GpuAcc parameters which have been tuned for maximum performance. More...

#include <IRuntime.hpp>

Inheritance diagram for IGpuAccTunedParameters:
[legend]

Public Types

enum class  Mode { UseTunedParameters , UpdateTunedParameters }
 
enum class  TuningLevel { Rapid = 1 , Normal = 2 , Exhaustive = 3 }
 

Public Member Functions

virtual void Load (const char *filename)=0
 Loads an existing set of tuned parameters from the given file. More...
 
virtual void Save (const char *filename) const =0
 Saves the current set of tuned parameters to the given file. More...
 

Static Public Member Functions

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

virtual ~IGpuAccTunedParameters ()
 

Detailed Description

Manages a set of GpuAcc parameters which have been tuned for maximum performance.

Passes an instance of this object to the IRuntime::Create() method (via IRuntime::CreationOptions) to use it for all GPU workload execution.

Can be created in two modes:

  • In UseTunedParameters mode, the parameters stored in this object are used to execute GPU workloads.
  • In UpdateTunedParameters mode, additionally, whenever a GPU workload is executed for the first time, the optimum parameters will be found and stored in this object. WARNING - This tuning can be slow.

The parameters can be loaded from and saved to a file so that you can first run a slow initial read-write execution, save the parameters for later and then run fast read-only executions using the optimised parameters.

Definition at line 281 of file IRuntime.hpp.

Member Enumeration Documentation

◆ Mode

enum Mode
strong
Enumerator
UseTunedParameters 
UpdateTunedParameters 

Definition at line 284 of file IRuntime.hpp.

285  {
286  UseTunedParameters,
287  UpdateTunedParameters
288  };

◆ TuningLevel

enum TuningLevel
strong
Enumerator
Rapid 
Normal 
Exhaustive 

Definition at line 290 of file IRuntime.hpp.

291  {
292  Rapid = 1,
293  Normal = 2,
294  Exhaustive = 3
295  };

Constructor & Destructor Documentation

◆ ~IGpuAccTunedParameters()

virtual ~IGpuAccTunedParameters ( )
inlineprotectedvirtual

Definition at line 313 of file IRuntime.hpp.

313 {};

Member Function Documentation

◆ Create()

Definition at line 17 of file ArmComputeTuningUtils.cpp.

19 {
21 }
static void Destroy(IGpuAccTunedParameters *params)
static IGpuAccTunedParameters * CreateRaw(Mode mode, TuningLevel tunerMode)
Creates an IClTunedParameters with the given mode.
std::shared_ptr< IGpuAccTunedParameters > IGpuAccTunedParametersPtr
The following API is replaced by the backend options API.
Definition: IRuntime.hpp:268

References IGpuAccTunedParameters::CreateRaw(), and IGpuAccTunedParameters::Destroy().

◆ CreateRaw()

Creates an IClTunedParameters with the given mode.

Definition at line 11 of file ArmComputeTuningUtils.cpp.

13 {
14  return new ClTunedParameters(mode, tuningLevel);
15 }

Referenced by IGpuAccTunedParameters::Create().

◆ Destroy()

void Destroy ( IGpuAccTunedParameters params)
static

Definition at line 23 of file ArmComputeTuningUtils.cpp.

24 {
25  delete params;
26 }

Referenced by IGpuAccTunedParameters::Create().

◆ Load()

virtual void Load ( const char *  filename)
pure 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.

Implemented in ClTunedParameters.

◆ Save()

virtual void Save ( const char *  filename) const
pure 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.

Implemented in ClTunedParameters.


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