Signed PD and Unsigned PD at Runtime¶
SNPE now defaults to using Unsigned PD for the DSP.
To set SNPE to use Signed PD:
Net run:
snpe-net-run .... --platform_options="unsignedPD:OFF"
C++ API :
zdl::DlSystem::PlatformConfig platformConfig;
platformConfig.setPlatformOptions("unsignedPD:OFF");
zdl::SNPE::SNPEBuilder snpeBuilder;
snpeBuilder.setPlatformConfig(platformConfig);
C API:
Snpe_PlatformConfig_Handle_t platformConfigHandle = Snpe_PlatformConfig_Create();
Snpe_PlatformConfig_SetPlatformOptions(platformConfigHandle, "unsignedPD:OFF");
Snpe_SNPEBuilder_Handle_t snpeBuilderHandle = Snpe_SNPEBuilder_Create(containerHandle);
Snpe_SNPEBuilder_SetPlatformConfig(snpeBuilderHandle, platformConfigHandle);
The skels delivered with SNPE2 are not signed. They will need to be signed by the customer to use them with a signed PD.
SNPEFactory::isRuntimeAvailable() / Snpe_Util_IsRuntimeAvailableCheckOption() performs a runtime check to determine whether signed DSP skel libraries are being used.
C++ API:
SNPEFactory::isRuntimeAvailable(DlSystem::Runtime_t runtime, DlSystem::RuntimeCheckOption_t option,
uint32_t deviceId = 0);
C API:
Snpe_Util_IsRuntimeAvailableCheckOption(Snpe_Runtime_t runtime,
Snpe_RuntimeCheckOption_t runtimeCheckOption);
Snpe_Util_IsRuntimeAvailableCheckOptionForDevice(Snpe_Runtime_t runtime,
Snpe_RuntimeCheckOption_t runtimeCheckOption,
uint32_t deviceId);
SDK TYPE |
UNSIGNEDPD_CHECK |
NORMAL_CHECK |
BASIC_CHECK |
|---|---|---|---|
Unsigned |
Pass |
Fail |
Fail |
Signed |
Fail |
Pass |
Pass |