ArmNN
 24.02
IRuntime::CreationOptions Struct Reference

#include <IRuntime.hpp>

Collaboration diagram for IRuntime::CreationOptions:
[legend]

Classes

struct  ExternalProfilingOptions
 

Public Member Functions

 CreationOptions ()
 

Public Attributes

std::shared_ptr< IGpuAccTunedParametersm_GpuAccTunedParameters
 If set, uses the GpuAcc tuned parameters from the given object when executing GPU workloads. More...
 
bool m_EnableGpuProfiling
 Setting this flag will allow the user to obtain GPU profiling information from the runtime. More...
 
std::string m_DynamicBackendsPath
 Setting this value will override the paths set by the DYNAMIC_BACKEND_PATHS compiler directive Only a single path is allowed for the override It defines the path to search for any dynamic backend libraries. More...
 
bool m_ProtectedMode
 Setting this flag will allow the user to create the Runtime in protected mode. More...
 
std::map< BackendId, std::shared_ptr< ICustomAllocator > > m_CustomAllocatorMap
 A map to define a custom memory allocator for specific backend Ids. More...
 
std::map< BackendId, std::shared_ptr< IMemoryOptimizerStrategy > > m_MemoryOptimizerStrategyMap
 A map to define a custom memory optimizer strategy for specific backend Ids. More...
 
ExternalProfilingOptions m_ProfilingOptions
 
std::vector< BackendOptionsm_BackendOptions
 Pass backend specific options. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ CreationOptions()

CreationOptions ( )
inline

Definition at line 80 of file IRuntime.hpp.

81  : m_GpuAccTunedParameters(nullptr)
82  , m_EnableGpuProfiling(false)
84  , m_ProtectedMode(false)
87  {}

Member Data Documentation

◆ m_BackendOptions

std::vector<BackendOptions> m_BackendOptions

Pass backend specific options.

For example, to enable GpuAcc tuning add the following

m_BackendOption.emplace_back(
BackendOptions{"GpuAcc",
{
{"TuningLevel", 2},
{"TuningFile", filename}
{"MemoryOptimizerStrategy", strategyname}
}
});

Execute representative workloads through the runtime to generate tuning data. The tuning file is written once the runtime is destroyed To execute with the tuning data, start up with just the tuning file specified.

m_BackendOption.emplace_back(
BackendOptions{"GpuAcc",
{
{"TuningFile", filename}
}
});

The following backend options are available: AllBackends: "MemoryOptimizerStrategy" : string [stategynameString] (Existing Memory Optimizer Strategies: ConstantMemoryStrategy) GpuAcc: "TuningLevel" : int [0..3] (0=UseOnly(default) | 1=RapidTuning | 2=NormalTuning | 3=ExhaustiveTuning) "TuningFile" : string [filenameString] "KernelProfilingEnabled" : bool [true | false]

Definition at line 190 of file IRuntime.hpp.

Referenced by ClBackendContext::ClBackendContext(), GpuFsaBackendContext::GpuFsaBackendContext(), and RuntimeImpl::RuntimeImpl().

◆ m_CustomAllocatorMap

std::map<BackendId, std::shared_ptr<ICustomAllocator> > m_CustomAllocatorMap

A map to define a custom memory allocator for specific backend Ids.

A Custom Allocator is used for allocation of working memory in the backends. Set this if you need to take control of how memory is allocated on a backend. Required for Protected Mode in order to correctly allocate Protected Memory

Note
Only supported for GpuAcc
Examples
CustomMemoryAllocatorSample.cpp.

Definition at line 115 of file IRuntime.hpp.

Referenced by RuntimeImpl::RuntimeImpl().

◆ m_DynamicBackendsPath

std::string m_DynamicBackendsPath

Setting this value will override the paths set by the DYNAMIC_BACKEND_PATHS compiler directive Only a single path is allowed for the override It defines the path to search for any dynamic backend libraries.

Definition at line 99 of file IRuntime.hpp.

Referenced by RuntimeImpl::RuntimeImpl().

◆ m_EnableGpuProfiling

bool m_EnableGpuProfiling

Setting this flag will allow the user to obtain GPU profiling information from the runtime.

Definition at line 94 of file IRuntime.hpp.

Referenced by ArmnnDevice::ArmnnDevice(), ClBackendContext::ClBackendContext(), and GpuFsaBackendContext::GpuFsaBackendContext().

◆ m_GpuAccTunedParameters

std::shared_ptr<IGpuAccTunedParameters> m_GpuAccTunedParameters

If set, uses the GpuAcc tuned parameters from the given object when executing GPU workloads.

It will also be updated with new tuned parameters if it is configured to do so.

Definition at line 91 of file IRuntime.hpp.

Referenced by ArmnnDevice::ArmnnDevice(), ClBackendContext::ClBackendContext(), and GpuFsaBackendContext::GpuFsaBackendContext().

◆ m_MemoryOptimizerStrategyMap

std::map<BackendId, std::shared_ptr<IMemoryOptimizerStrategy> > m_MemoryOptimizerStrategyMap

A map to define a custom memory optimizer strategy for specific backend Ids.

A Memory Optimizer Strategy provides a solution to an abstract representation of a network's memory requirements. This can also be used to return a pre-computed solution for a specific network. Set this if you want to implement a Custom Memory Optimizer Strategy for a given backend.

Definition at line 123 of file IRuntime.hpp.

Referenced by RuntimeImpl::RuntimeImpl().

◆ m_ProfilingOptions

ExternalProfilingOptions m_ProfilingOptions

Definition at line 154 of file IRuntime.hpp.

Referenced by RuntimeImpl::RuntimeImpl().

◆ m_ProtectedMode

bool m_ProtectedMode

Setting this flag will allow the user to create the Runtime in protected mode.

It will run all the inferences on protected memory and will make sure that INetworkProperties::m_ImportEnabled set to true with MemorySource::DmaBufProtected option This requires that the backend supports Protected Memory and has an allocator capable of allocating Protected Memory associated with it.

Definition at line 106 of file IRuntime.hpp.

Referenced by RuntimeImpl::RuntimeImpl().


The documentation for this struct was generated from the following file:
armnn::IRuntime::CreationOptions::m_DynamicBackendsPath
std::string m_DynamicBackendsPath
Setting this value will override the paths set by the DYNAMIC_BACKEND_PATHS compiler directive Only a...
Definition: IRuntime.hpp:99
armnn::IRuntime::CreationOptions::m_ProtectedMode
bool m_ProtectedMode
Setting this flag will allow the user to create the Runtime in protected mode.
Definition: IRuntime.hpp:106
armnn::IRuntime::CreationOptions::m_MemoryOptimizerStrategyMap
std::map< BackendId, std::shared_ptr< IMemoryOptimizerStrategy > > m_MemoryOptimizerStrategyMap
A map to define a custom memory optimizer strategy for specific backend Ids.
Definition: IRuntime.hpp:123
armnn::IRuntime::CreationOptions::m_GpuAccTunedParameters
std::shared_ptr< IGpuAccTunedParameters > m_GpuAccTunedParameters
If set, uses the GpuAcc tuned parameters from the given object when executing GPU workloads.
Definition: IRuntime.hpp:91
armnn::IRuntime::CreationOptions::m_CustomAllocatorMap
std::map< BackendId, std::shared_ptr< ICustomAllocator > > m_CustomAllocatorMap
A map to define a custom memory allocator for specific backend Ids.
Definition: IRuntime.hpp:115
armnn::IRuntime::CreationOptions::m_EnableGpuProfiling
bool m_EnableGpuProfiling
Setting this flag will allow the user to obtain GPU profiling information from the runtime.
Definition: IRuntime.hpp:94