Function Snpe_SNPEBuilder_SetMemoryLimitHint

Function Documentation

Snpe_ErrorCode_t Snpe_SNPEBuilder_SetMemoryLimitHint(Snpe_SNPEBuilder_Handle_t snpeBuilderHandle, uint64_t memoryLimitHintInMb)

Sets memoryLimitHint for DSP Based on the memory limit provided graphs will be switched from cache blob when execute is invoked.

Parameters
  • snpeBuilderHandle[in] Handle to access the SNPEBuilder object

  • memoryLimitHintInMb[in] Sets the peak memory limit hint of a cache in megabytes.

Note

Memory footprint is reduced at the cost of slower first execution after graph switching. Default is set to 0, set to any non zero value to enter low memory mode with multi graph init. User must first load the largest graph inside the cache to avoid undefined behaviors. User can strategically specify Snpe_SNPEBuilder_NetworkInit to ensure the first graph is the largest graph if it has not been serialized as the first graph in the cache. Currently any non zero value would enable graph switching.