Intel GNA specific properties

Overview

Set of Intel GNA specific properties. More…

// enums

enum ov::intel_gna::ExecutionMode;
enum ov::intel_gna::HWGeneration;
enum ov::intel_gna::PWLDesignAlgorithm;

// global variables

static constexpr Property<std::string, PropertyMutability::RO> ov::intel_gna::library_full_version {"GNA_LIBRARY_FULL_VERSION"};
static constexpr Property<std::map<std::string, float>> ov::intel_gna::scale_factors_per_input {"GNA_SCALE_FACTOR_PER_INPUT"};
static constexpr Property<std::string> ov::intel_gna::firmware_model_image_path {"GNA_FIRMWARE_MODEL_IMAGE"};
static constexpr Property<ExecutionMode> ov::intel_gna::execution_mode {"GNA_DEVICE_MODE"};
static constexpr Property<HWGeneration> ov::intel_gna::execution_target {"GNA_HW_EXECUTION_TARGET"};
static constexpr Property<HWGeneration> ov::intel_gna::compile_target {"GNA_HW_COMPILE_TARGET"};
static constexpr Property<bool> ov::intel_gna::memory_reuse {"GNA_COMPACT_MODE"};
static constexpr Property<PWLDesignAlgorithm> ov::intel_gna::pwl_design_algorithm {"GNA_PWL_DESIGN_ALGORITHM"};
static constexpr Property<float> ov::intel_gna::pwl_max_error_percent {"GNA_PWL_MAX_ERROR_PERCENT"};

Detailed Documentation

Set of Intel GNA specific properties.

Global Variables

static constexpr Property<std::string, PropertyMutability::RO> ov::intel_gna::library_full_version {"GNA_LIBRARY_FULL_VERSION"}

Property to get an std::string of GNA Library version, usually in the form <API_REVISION>.<RELEASE_LINE>.<RELEASE>.<BUILD>

static constexpr Property<std::map<std::string, float>> ov::intel_gna::scale_factors_per_input {"GNA_SCALE_FACTOR_PER_INPUT"}

Scale factor provided by the user to use static quantization. This option should be used with floating point value serialized to string with . (dot) as a decimal separator.

In the case of multiple inputs, individual scale factors can be provided using the map where key is layer name and value is scale factor Example:

ov::Core core;
auto model = core.read_model(model_path);
std::map<std::string, float> scale_factors;
for (auto& input : model->inputs()) {
    scale_factors[input.get_any_name()] = 1.0f;
}
core.set_property("GNA", ov::intel_gna::scale_factors_per_input(scale_factors));
static constexpr Property<std::string> ov::intel_gna::firmware_model_image_path {"GNA_FIRMWARE_MODEL_IMAGE"}

if turned on, dump GNA firmware model into specified file

static constexpr Property<ExecutionMode> ov::intel_gna::execution_mode {"GNA_DEVICE_MODE"}

GNA proc_type setting that should be one of AUTO, HW, GNA_HW_WITH_SW_FBACK, GNA_SW_EXACT or SW_FP32.

static constexpr Property<HWGeneration> ov::intel_gna::execution_target {"GNA_HW_EXECUTION_TARGET"}

The option to override the GNA HW execution target. May be one of GNA_2_0, GNA_3_0. By default (in case of no value set) the behavior depends on GNA HW availability: If GNA HW is present, use the option corresponding to this HW. If HW is not present, use the option corresponding to the latest fully supported GNA HW generation. A fully supported GNA HW generation means it must be supported by both the OV GNA Plugin and the core GNA Library. Currently, the latest supported GNA HW generation corresponds to GNA_3_0.

static constexpr Property<HWGeneration> ov::intel_gna::compile_target {"GNA_HW_COMPILE_TARGET"}

The option to override the GNA HW compile target. May be one of GNA_2_0, GNA_3_0. By default the same as execution_target.

static constexpr Property<bool> ov::intel_gna::memory_reuse {"GNA_COMPACT_MODE"}

if enabled produced minimum memory footprint for compiled model in GNA memory, default value is true

static constexpr Property<PWLDesignAlgorithm> ov::intel_gna::pwl_design_algorithm {"GNA_PWL_DESIGN_ALGORITHM"}

The option to set PWL design algorithm. By default the optimized algorithm called “Recursive Descent Algorithm for Finding the Optimal Minimax Piecewise Linear Approximation of Convex Functions” is used. If value is UNIFORM_DISTRIBUTION then simple uniform distribution is used to create PWL approximation of activation functions. Uniform distribution usually gives poor approximation with the same number of segments.

static constexpr Property<float> ov::intel_gna::pwl_max_error_percent {"GNA_PWL_MAX_ERROR_PERCENT"}

The option to allow to specify the maximum error percent that the optimized algorithm finding will be used to find PWL functions. By default (in case of NO value set), 1.0 value is used.