# Enabling Dual‑NPU Execution in SNPE (HTP Device Selection)

SNPE supports execution on the Hexagon Tensor Processor (HTP). On platforms where only one NPU is present, SNPE automatically selects the default HTP device and no additional configuration is required.

On platforms equipped with dual NPUs or multiple HTP/NSP devices, SNPE allows explicit selection of the target device through platform options. The primary option used for device selection is:

deviceId:<DEVICE_ID>
    Copy to clipboard

This option directs SNPE to run inference on the specified HTP/NSP device (for example, device 0 or device 1 on dual‑NPU systems).

## API Usage for Dual‑NPU Selection

The SNPE C++ and C APIs provide a PlatformConfig interface that allows specifying platform options programmatically. By setting the `deviceId` in the PlatformConfig, inference is executed on the selected NPU.

C++ API:

zdl::DlSystem::PlatformConfig platformConfig;
    platformConfig.setPlatformOptions("deviceId:<DEVICE_ID>");
    zdl::SNPE::SNPEBuilder builder;
    builder.setPlatformConfig(platformConfig);
    Copy to clipboard

C API:

Snpe_PlatformConfig_Handle_t cfg = Snpe_PlatformConfig_Create();
    Snpe_PlatformConfig_SetPlatformOptions(cfg, "deviceId:<DEVICE_ID>");
    Snpe_SNPEBuilder_Handle_t builder = Snpe_SNPEBuilder_Create(containerHandle);
    Snpe_SNPEBuilder_SetPlatformConfig(builder, cfg);
    Copy to clipboard

## SNPE Tools Supporting deviceId

Several SNPE command‑line tools allow explicit NPU selection using the same platform option:

snpe-throughput-net-run --platform_options="deviceId:<DEVICE_ID>"
    snpe-parallel-run       --platform_options="deviceId:<DEVICE_ID>"
    snpe-benchmark          --platform_options="deviceId:<DEVICE_ID>"
    Copy to clipboard

Example usage with snpe-net-run:

snpe-net-run \
        --container <MODEL>.dlc \
        --input_list <INPUT_LIST> \
        --use_dsp \
        --platform_options="deviceId:<DEVICE_ID>"
    Copy to clipboard

Last Published: Jun 04, 2026

[Previous Topic
Signed PD and Unsigned PD at Runtime](https://docs.qualcomm.com/bundle/publicresource/80-63442-10/topics/signed_unsigned_pd.md) [Next Topic
Application Tips](https://docs.qualcomm.com/bundle/publicresource/80-63442-10/topics/usergroup9.md)