Main Content

hexagon.ENPU

Interface to predict responses of eNPU using a compiled eAI model

Since R2025a

Description

The hexagon.ENPU System object is an interface to predict responses of eNPU using a compiled eAI model.

To create the interface to predict responses of eNPU:

  1. Create the hexagon.ENPU object and set its properties.

  2. Call the object with arguments, as if it were a function.

To learn more about how System objects work, see What Are System Objects?

Creation

Description

enpu = hexagon.ENPU(EAINetworkFile=EAINetworkFile) creates an eNPU interface to predict responses by using a compiled embedded Artificial Intelligence (eAI) model designed for Qualcomm® eNPU.

enpu = hexagon.ENPU(EAINetworkFile=CompiledEAIModel,Name=Value) sets Properties using one or more name-value arguments.

Input Arguments

expand all

Compiled eAI (embedded Artificial Intelligence) model designed for Qualcomm eNPU, specified as a string. The deep learning network represented as an eAI model (eAI network file) must be generated using the LPAI SDK Addon for Qualcomm Hexagon® SDK.

If the EAI model is not present in the Current Folder in MATLAB, specify the absolute path along with <filename>.eai

Data Types: string

Name-Value Arguments

expand all

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: hexagon.ENPU(EAINetworkFile='model_eNPU_on_v3.eai', InputQuantizationRange=[[0, 255])

Properties

expand all

Unless otherwise indicated, properties are nontunable, which means you cannot change their values after calling the object. Objects lock when you call them, and the release function unlocks them.

If a property is tunable, you can change its value at any time.

For more information on changing property values, see System Design in MATLAB Using System Objects.

Minimum and maximum range of input values for quantization of floating-point input, specified as an M-by-2 array containing M number of [min,max] values, where M is the count of input layers. To know about the count of input layer used in the eAI model, use the hexagon.ENPU.getEAIProperties function.

The System object supports both symmetric quantization (absolute value of minimum and maximum values are same) and asymmetric quantization (absolute value of minimum and maximum values are different).

Example: For predicting responses of a tensor layout with two inputs and quantize both inputs, use the command: hexagon.ENPU(EAINetworkFile='model_eNPU_on_v3.eai', InputQuantizationRange=[[0, 255];[0,255]])

Data Types: struct

Enable quantization of output, to allow specifying the output quantization range, if input quantization is enabled.

Data Types: logical

Minimum and maximum range of output values for quantization of floating-point output, specified as an M-by-2 array containing M number of [min,max] values, where M is the count of output layers.

The System object supports both symmetric quantization (absolute of minimum and maximum values are same) and asymmetric quantization (absolute of minimum and maximum values are different).

Example: For predicting responses of a tensor layout with two inputs and two outputs, and quantize both inputs and outputs, use this command: hexagon.ENPU(EAINetworkFile='model_eNPU_on_v3.eai', InputQuantizationRange=[[0, 255];[0,255]],DequantizeOutput=true, OutputQuantizationRange=[[0, 255];[0, 255]])

Dependencies

To enable this property, set DequantizeOutput property to true.

Data Types: struct

Specifies if the selected eAI network uses default client performance configuration while obtaining response. The default values as per the LPAI SDK Addon documentation are:

  • Frames per second: 1

  • Faster Than Real Time (FTRT) ratio: 10

  • Priority level: 3

.

Data Types: logical

Number of frames to be processed per second while predicting response using the eAI model. For more information, refer to Qualcomm LPAI SDK documentation.

Dependencies

To enable this property, set UseDefaultClientPerformanceConfig to false.

Ratio to be considered for faster than real-time performance while predicting response using the eAI model. For more information, refer to Qualcomm LPAI SDK documentation.

Dependencies

To enable this property, set UseDefaultClientPerformanceConfig to false.

Client priority level for eNPU scheduling while predicting response using the eAI model. The corresponding priorities for these values are:

  • 3 – Very low

  • 2 – Low

  • 1 – Medium

  • 0 – High

For more information, refer to Qualcomm LPAI SDK documentation.

Dependencies

To enable this property, set UseDefaultClientPerformanceConfig to false.

Specify if real-time processing of input data is required while predicting response using the eAI model.

Dependencies

To enable this property, set UseDefaultClientPerformanceConfig to false.

Object Functions

To use an object function, specify the System object™ as the first input argument. For example, to release system resources of a System object named obj, use this syntax:

release(obj)

expand all

hexagon.ENPU.getEAIPropertiesRead values for properties defined in eAI network file
predictPredict response of eNPU based on given data
releaseRelease resources and allow changes to System object property values and input characteristics
cloneCreate duplicate System object

Examples

collapse all

  1. Prepare the eAI network file (eAI model). To create interface to eNPU by using eAI model, it is recommended that you copy the file to the Current Folder in MATLAB. Alternatively, you can note the absolute path of the file.

  2. Run this command to create the interface object, if the eAI network file (for example, model_eNPU_on_v3.eai) is present in the Current Folder in MATLAB.

    hexagon.ENPU(EAINetworkFile='model_eNPU_on_v3.eai')

  1. Prepare the eAI network file (eAI model). To create interface to eNPU by using eAI model, it is recommended that you copy the file to the Current Folder in MATLAB. Alternatively, you can note the absolute path of the file.

  2. Run this command to create the interface object by also mentioning the input quantization range, if the eAI network file (for example, model_eNPU_on_v3.eai) is present in the Current Folder in MATLAB .

    hexagon.ENPU(EAINetworkFile='model_eNPU_on_v3.eai', InputQuantizationRange=[[0, 255];[0,255]]

Version History

Introduced in R2025a