lite/common_enum_c.h

enum LiteLogLevel

The log level.

Values:

enumerator DEBUG

The lowest level and most verbose

enumerator INFO

The lowest level and most verbose

enumerator WARN

Print only warning and errors

enumerator ERROR

Print only errors

enum ErrorCode

The Error Code.

Values:

enumerator OK
enumerator LITE_INTERNAL_ERROR
enumerator LITE_UNKNOWN_ERROR
enum LiteBackend

Values:

enumerator LITE_DEFAULT
enum LiteDeviceType

Values:

enumerator LITE_CPU
enumerator LITE_CUDA
enumerator LITE_ATLAS
enumerator LITE_NPU
enumerator LITE_CAMBRICON
enumerator LITE_DEVICE_DEFAULT

when the device information is set in model, so set LITE_DEVICE_DEFAULT in lite, which equal to xpu in megengine

enum LiteDataType

Values:

enumerator LITE_FLOAT
enumerator LITE_HALF
enumerator LITE_INT
enumerator LITE_INT16
enumerator LITE_INT8
enumerator LITE_UINT8
enumerator LITE_UINT
enumerator LITE_UINT16
enumerator LITE_INT64
enum LiteTensorPhase

Values:

enumerator LITE_IO

Tensor maybe input or output.

enumerator LITE_INPUT

Tensor is input.

enumerator LITE_OUTPUT

Tensor is output.

enum LiteIOType

the input and output type, include SHAPE and VALUE sometimes user only need the shape of the output tensor

Values:

enumerator LITE_IO_VALUE
enumerator LITE_IO_SHAPE
enum LiteAlgoSelectStrategy

operation algorithm seletion strategy type, some operations have multi algorithms, different algorithm has different attribute, according to the strategy, the best algorithm will be selected.

Note: These strategies can be combined

  1. LITE_ALGO_HEURISTIC | LITE_ALGO_PROFILE means: if profile cache not valid, use heuristic instead

  2. LITE_ALGO_HEURISTIC | LITE_ALGO_REPRODUCIBLE means: heuristic choice the reproducible algo

  3. LITE_ALGO_PROFILE | LITE_ALGO_REPRODUCIBLE means: profile the best algorithm from the reproducible algorithms set

  4. LITE_ALGO_PROFILE | LITE_ALGO_OPTIMIZED means: profile the best algorithm form the optimzed algorithms, thus profile will process fast

  5. LITE_ALGO_PROFILE | LITE_ALGO_OPTIMIZED | LITE_ALGO_REPRODUCIBLE means: profile the best algorithm form the optimzed and reproducible algorithms

Values:

enumerator LITE_ALGO_HEURISTIC
enumerator LITE_ALGO_PROFILE
enumerator LITE_ALGO_REPRODUCIBLE
enumerator LITE_ALGO_OPTIMIZED
enum LiteOpenCLCacheCompatLevel

enum for cache compat level, for example: adreno 630 cache may be apply to adreno 640, if you do not want search cache for adreno 640, just config SERIES_COMPAT or VENDOR_COMPAT, adreno 506 cache may be apply to adreno 630, if you do not want search cache for adreno 630, just config VENDOR_COMPAT WARN: this config just let program_cache_io try use a old cache for device compile the cache do not means MegEngine will insure the compile will be ok! its a device CL driver behavior, if compile failed!, MegEngine will try build from source, Whats more, even though compile from binary success, this cross-use-cache may affect performance, VENDOR_COMPAT will contain SERIES_COMPAT

Values:

enumerator LITE_NOT_COMPAT
enumerator LITE_SERIES_COMPAT

default not compat for series and vendor

enumerator LITE_VENDOR_COMPAT

for scene adreno 640 use adreno 630 cache

enumerator LITE_CACHE_COMPAT_LEVEL_CNT

for scene adreno 630 use adreno 506 cache