Function Snpe_SNPE_ExecuteUserBuffersForNetwork¶
Defined in File SNPE.h
Function Documentation¶
-
Snpe_ErrorCode_t Snpe_SNPE_ExecuteUserBuffersForNetwork(Snpe_SNPE_Handle_t snpeHandle, const char *networkName, Snpe_UserBufferMap_Handle_t inputHandle, Snpe_UserBufferMap_Handle_t outputHandle)¶
Processes the input data and returns the output, using user-supplied buffers.
Caller must guarantee that for the duration of execute(), the buffer stored in UserBuffer would remain valid. For more detail on buffer ownership and lifetime requirements, please refer to zdl::DlSystem::UserBuffer documentation.
- Parameters
snpeHandle – [in] Handle to access the SNPE object
networkName – [in] Network name.
inputHandle – [in] A map of UserBuffers that contains the input data for each input. The names of UserBuffers needs to be matched with names retrieved through getInputTensorNames()
outputHandle – [inout] A map of UserBuffers that will hold the output data of potentially multiple layers (the key in the map is the UserBuffer name)
- Returns
SNPE_SUCCESS upon successful execution
Note
input and output UserBuffer maps must be fully pre-populated. with dimensions matching what the network expects. For example, if there are 5 output UserBuffers they all have to be present in map.