25 class ILocalPacketHandler;
45 bool profilingEnabled =
false,
47 bool externalMemoryManagementEnabled =
false)
204 std::string& errorMessage);
208 std::string& errorMessage,
236 std::vector<ImportedInputId> preImportedInputIds = {},
237 std::vector<ImportedOutputId> preImportedOutputIds = {});
260 IRuntime(
const IRuntime::CreationOptions& options);
306 virtual void Load(
const char* filename) = 0;
310 virtual void Save(
const char* filename)
const = 0;
Manages a set of GpuAcc parameters which have been tuned for maximum performance.
virtual void Save(const char *filename) const =0
Saves the current set of tuned parameters to the given file.
static void Destroy(IGpuAccTunedParameters *params)
virtual ~IGpuAccTunedParameters()
virtual void Load(const char *filename)=0
Loads an existing set of tuned parameters from the given file.
static IGpuAccTunedParametersPtr Create(Mode mode, TuningLevel tunerMode)
static IGpuAccTunedParameters * CreateRaw(Mode mode, TuningLevel tunerMode)
Creates an IClTunedParameters with the given mode.
const IDeviceSpec & GetDeviceSpec() const
TensorInfo GetInputTensorInfo(NetworkId networkId, LayerBindingId layerId) const
static IRuntime * CreateRaw(const CreationOptions &options)
TensorInfo GetOutputTensorInfo(NetworkId networkId, LayerBindingId layerId) const
std::vector< ImportedOutputId > ImportOutputs(NetworkId networkId, const OutputTensors &outputTensors, MemorySource forceImportMemorySource=MemorySource::Undefined)
ImportOutputs separates the importing and mapping of OutputTensors from network execution.
std::unique_ptr< RuntimeImpl > pRuntimeImpl
void RegisterDebugCallback(NetworkId networkId, const DebugCallbackFunction &func)
Registers a callback function to debug layers performing custom computations on intermediate tensors.
static void Destroy(IRuntime *runtime)
std::vector< ImportedInputId > ImportInputs(NetworkId networkId, const InputTensors &inputTensors, MemorySource forceImportMemorySource=MemorySource::Undefined)
ImportInputs separates the importing and mapping of InputTensors from network execution.
Status EnqueueWorkload(NetworkId networkId, const InputTensors &inputTensors, const OutputTensors &outputTensors, std::vector< ImportedInputId > preImportedInputIds={}, std::vector< ImportedOutputId > preImportedOutputIds={})
Evaluates a network using input in inputTensors and outputs filled into outputTensors.
static IRuntimePtr Create(const CreationOptions &options)
Status UnloadNetwork(NetworkId networkId)
Unloads a network from the IRuntime.
const std::shared_ptr< IProfiler > GetProfiler(NetworkId networkId) const
Gets the profiler corresponding to the given network id.
Status LoadNetwork(NetworkId &networkIdOut, IOptimizedNetworkPtr network)
Loads a complete network into the IRuntime.
std::shared_ptr< ILocalPacketHandler > ILocalPacketHandlerSharedPtr
Copyright (c) 2021 ARM Limited and Contributors.
MemorySource
Define the Memory Source to reduce copies.
std::unique_ptr< IRuntime, void(*)(IRuntime *runtime)> IRuntimePtr
std::function< void(LayerGuid guid, unsigned int slotIndex, ITensorHandle *tensorHandle)> DebugCallbackFunction
Define the type of callback for the Debug layer to call.
std::shared_ptr< IGpuAccTunedParameters > IGpuAccTunedParametersPtr
The following API is replaced by the backend options API.
constexpr unsigned int LOWEST_CAPTURE_PERIOD
The lowest performance data capture interval we support is 10 miliseconds.
std::unique_ptr< IOptimizedNetwork, void(*)(IOptimizedNetwork *network)> IOptimizedNetworkPtr
std::vector< std::pair< LayerBindingId, class Tensor > > OutputTensors
std::vector< std::pair< LayerBindingId, class ConstTensor > > InputTensors
int LayerBindingId
Type of identifiers for bindable layers (inputs, outputs).
ProfilingDetailsMethod
Define the behaviour of the internal profiler when outputting network details.
virtual ~INetworkProperties()
const MemorySource m_OutputSource
const bool m_ExternalMemoryManagementEnabled
const MemorySource m_InputSource
const bool m_ProfilingEnabled
INetworkProperties(MemorySource inputSource, MemorySource outputSource, bool profilingEnabled=false, ProfilingDetailsMethod detailsMethod=ProfilingDetailsMethod::Undefined, bool externalMemoryManagementEnabled=false)
const ProfilingDetailsMethod m_OutputNetworkDetailsMethod
uint32_t m_CapturePeriod
The duration at which captured profiling messages will be flushed.
bool m_EnableProfiling
Indicates whether external profiling is enabled or not.
std::string m_IncomingCaptureFile
Path to a file in which incoming timeline profiling messages will be stored.
bool m_TimelineEnabled
Indicates whether external timeline profiling is enabled or not.
std::string m_OutgoingCaptureFile
Path to a file in which outgoing timeline profiling messages will be stored.
std::vector< arm::pipe::ILocalPacketHandlerSharedPtr > m_LocalPacketHandlers
ExternalProfilingOptions()
bool m_FileOnly
Enable profiling output to file only.
std::string m_FileFormat
The format of the file used for outputting profiling data.
bool m_EnableGpuProfiling
Setting this flag will allow the user to obtain GPU profiling information from the runtime.
ExternalProfilingOptions m_ProfilingOptions
std::shared_ptr< IGpuAccTunedParameters > m_GpuAccTunedParameters
If set, uses the GpuAcc tuned parameters from the given object when executing GPU workloads.
std::map< BackendId, std::shared_ptr< IMemoryOptimizerStrategy > > m_MemoryOptimizerStrategyMap
A map to define a custom memory optimizer strategy for specific backend Ids.
std::map< BackendId, std::shared_ptr< ICustomAllocator > > m_CustomAllocatorMap
A map to define a custom memory allocator for specific backend Ids.
bool m_ProtectedMode
Setting this flag will allow the user to create the Runtime in protected mode.
std::string m_DynamicBackendsPath
Setting this value will override the paths set by the DYNAMIC_BACKEND_PATHS compiler directive Only a...
std::vector< BackendOptions > m_BackendOptions
Pass backend specific options.