24.02
|
#include <ArmnnPreparedModel.hpp>
Public Member Functions | |
ArmnnPreparedModel (armnn::NetworkId networkId, armnn::IRuntime *runtime, const Model &model, const std::string &requestInputsAndOutputsDumpDir, const bool gpuProfilingEnabled, Priority priority=Priority::MEDIUM) | |
ArmnnPreparedModel (armnn::NetworkId networkId, armnn::IRuntime *runtime, const std::string &requestInputsAndOutputsDumpDir, const bool gpuProfilingEnabled, Priority priority=Priority::MEDIUM, const bool prepareModelFromCache=false) | |
virtual | ~ArmnnPreparedModel () |
ExecutionResult< std::pair< std::vector< OutputShape >, Timing > > | execute (const Request &request, MeasureTiming measureTiming, const OptionalTimePoint &deadline, const OptionalDuration &loopTimeoutDuration, const std::vector< android::nn::TokenValuePair > &hints, const std::vector< android::nn::ExtensionNameAndPrefix > &extensionNameToPrefix) const override |
GeneralResult< std::pair< SyncFence, ExecuteFencedInfoCallback > > | executeFenced (const Request &request, const std::vector< SyncFence > &waitFor, MeasureTiming measureTiming, const OptionalTimePoint &deadline, const OptionalDuration &loopTimeoutDuration, const OptionalDuration &timeoutDurationAfterFence, const std::vector< android::nn::TokenValuePair > &hints, const std::vector< android::nn::ExtensionNameAndPrefix > &extensionNameToPrefix) const override |
GeneralResult< android::nn::SharedExecution > | createReusableExecution (const Request &request, MeasureTiming measureTiming, const OptionalDuration &loopTimeoutDuration, const std::vector< android::nn::TokenValuePair > &hints, const std::vector< android::nn::ExtensionNameAndPrefix > &extensionNameToPrefix) const override |
GeneralResult< SharedBurst > | configureExecutionBurst () const override |
std::any | getUnderlyingResource () const override |
ErrorStatus | ExecuteGraph (std::shared_ptr< std::vector< android::nn::RunTimePoolInfo >> &pMemPools, armnn::InputTensors &inputTensors, armnn::OutputTensors &outputTensors, CanonicalExecutionContext callback, const bool pointerMemory=false) const |
execute the graph prepared from the request More... | |
Priority | GetModelPriority () const |
bool | ExecuteWithDummyInputs (unsigned int numInputs, unsigned int numOutputs) const |
Executes this model with dummy inputs (e.g. More... | |
Definition at line 38 of file ArmnnPreparedModel.hpp.
ArmnnPreparedModel | ( | armnn::NetworkId | networkId, |
armnn::IRuntime * | runtime, | ||
const Model & | model, | ||
const std::string & | requestInputsAndOutputsDumpDir, | ||
const bool | gpuProfilingEnabled, | ||
Priority | priority = Priority::MEDIUM |
||
) |
Definition at line 126 of file ArmnnPreparedModel.cpp.
ArmnnPreparedModel | ( | armnn::NetworkId | networkId, |
armnn::IRuntime * | runtime, | ||
const std::string & | requestInputsAndOutputsDumpDir, | ||
const bool | gpuProfilingEnabled, | ||
Priority | priority = Priority::MEDIUM , |
||
const bool | prepareModelFromCache = false |
||
) |
Definition at line 143 of file ArmnnPreparedModel.cpp.
|
virtual |
Definition at line 626 of file ArmnnPreparedModel.cpp.
References armnn_driver::DumpJsonProfilingIfRequired(), IRuntime::GetProfiler(), and IRuntime::UnloadNetwork().
|
override |
Definition at line 599 of file ArmnnPreparedModel.cpp.
|
override |
Definition at line 585 of file ArmnnPreparedModel.cpp.
|
override |
Definition at line 294 of file ArmnnPreparedModel.cpp.
References armnn_driver::ComputeShape(), CanonicalExecutionContext::driverStart, ArmnnPreparedModel::ExecuteGraph(), BaseTensor< MemoryType >::GetInfo(), armnn_driver::GetModelSummary(), and CanonicalExecutionContext::measureTimings.
|
override |
Definition at line 477 of file ArmnnPreparedModel.cpp.
References CanonicalExecutionContext::deviceEnd, CanonicalExecutionContext::deviceStart, CanonicalExecutionContext::driverEnd, CanonicalExecutionContext::driverStart, ArmnnPreparedModel::ExecuteGraph(), armnn_driver::GetModelSummary(), and CanonicalExecutionContext::measureTimings.
ErrorStatus ExecuteGraph | ( | std::shared_ptr< std::vector< android::nn::RunTimePoolInfo >> & | pMemPools, |
armnn::InputTensors & | inputTensors, | ||
armnn::OutputTensors & | outputTensors, | ||
CanonicalExecutionContext | callback, | ||
const bool | pointerMemory = false |
||
) | const |
execute the graph prepared from the request
Definition at line 374 of file ArmnnPreparedModel.cpp.
References armnn_driver::CommitPools(), CanonicalExecutionContext::deviceEnd, CanonicalExecutionContext::deviceStart, CanonicalExecutionContext::driverEnd, CanonicalExecutionContext::driverStart, IRuntime::EnqueueWorkload(), IRuntime::ImportInputs(), IRuntime::ImportOutputs(), armnn::Malloc, CanonicalExecutionContext::measureTimings, armnn::Success, and Exception::what().
Referenced by ArmnnPreparedModel::execute(), ArmnnPreparedModel::executeFenced(), and ArmnnPreparedModel::ExecuteWithDummyInputs().
bool ExecuteWithDummyInputs | ( | unsigned int | numInputs, |
unsigned int | numOutputs | ||
) | const |
Executes this model with dummy inputs (e.g.
all zeroes).
Definition at line 646 of file ArmnnPreparedModel.cpp.
References ArmnnPreparedModel::ExecuteGraph(), IRuntime::GetInputTensorInfo(), TensorInfo::GetNumBytes(), IRuntime::GetOutputTensorInfo(), CanonicalExecutionContext::measureTimings, and TensorInfo::SetConstant().
Priority GetModelPriority | ( | ) | const |
Definition at line 471 of file ArmnnPreparedModel.cpp.
|
override |
Definition at line 604 of file ArmnnPreparedModel.cpp.