Struct QnnSaver_Config_t

Nested Relationships

Struct Documentation

struct QnnSaver_Config_t

A struct that provides configuration for Saver.

Public Members

QnnSaver_ConfigOption_t option

Type of Saver configuration option.

union unnamed

Union of mutually exclusive config values based on the type specified by ‘option’.

Public Members

const char *outputDirectory

Path to a directory where Saver output should be stored. The directory will be created if it doesn’t exist already. If a relative filepath is given, the location is relative to the current working directory. Defaults to “./saver_output/” if not provided.

uint8_t appendTimestamp

Boolean flag to indicate if a timestamp should be appended to the filename of Saver outputs to prevent them from being overwritten during consecutive uses of Saver. Note that all input tensor data is dumped into params.bin, so this setting may use lots of storage over time. Any nonzero value will enable the timestamp. Defaults to 0 (false) if not provided.

uint32_t backendId

Backend identifier indicating which backend to interpret custom configs as. These identifiers are defined by each backend in a Qnn<Backend>Common.h file included with the SDK.

QnnSaver_FileConfig_t fileConfig

Alternative filenames for Saver outputs.

uint8_t writeOutputHeader

Boolean flag to indicate if the saver output header should be written or not. The ‘header’ refers to the static text at the top of the output file before any APIs are recorded (header includes, beginning of main(), command line parsing, etc.) This config would be used when writing to a pre-existing saver output file created from a previous call to QnnSaver_initialize(), providing a fileConfig (QNN_SAVER_CONFIG_OPTION_FILE_CONFIG) and writeOutputFooter == 0. Because the output files already exist, the they will be opened in append mode. Defaults to 1 (true) if not provided.

uint8_t writeOutputFooter

Boolean flag to indicate if the saver output footer should be written or not. The ‘footer’ refers to the static text at the bottom of the output file after all APIs have been recorded (misc. cleanup, the end of main(), etc.) This config would be used when writing to a saver output file that will be appended to at later point with a subsequent call to QnnSaver_initialize(), providing a fileConfig (QNN_SAVER_CONFIG_OPTION_FILE_CONFIG) and writeOutputHeader == 0 Defaults to 1 (true) if not provided.