目录

MindSpore Lite Kit Glossary

C

[h2]Context

A configuration object of the MindSpore Lite runtime, used to specify runtime parameters such as the hardware device type, number of threads, and CPU binding policy for inference or training. It is created and passed in before model loading and compilation.

D

[h2]Dynamic Shape

The capability of a model to accept variable input dimensions. A model with dynamic shape enabled can accept inputs of different sizes during inference.

F

[h2]Float16

A floating-point data type defined by the IEEE 754 standard. It is stored in 16 bits (2 bytes) in a computer, hence the name Float16 or FP16. Since it uses only half the storage bits of a single-precision floating-point number, it is also called Half. This data type is suitable for scenarios that do not require high precision, such as the field of artificial neural networks. Float16 inference mode means performing inference with half precision. It is available only on CPU/GPU devices and can reduce memory usage and computation while maintaining relatively high inference accuracy.

H

[h2]Heterogeneous Inference

An inference approach that schedules different operators in a model to different types of hardware (such as NNRt acceleration chips and CPUs) for execution. Operators are preferentially scheduled to acceleration hardware, and unsupported operators fall back to the CPU, balancing inference performance and operator compatibility.

M

[h2]Model Conversion

The first stage of the MindSpore Lite deployment process. It uses a model conversion tool to convert third-party framework models (ONNX, CAFFE, TFLITE, TF, PyTorch, and others) or MindIR models into .ms-format on-device model files for inference or training on MindSpore Lite.

[h2]MindIR

The unified intermediate representation (IR) format of models in the MindSpore training framework, with the file extension .mindir. It is used to unify the model representation for training and inference, and can be converted to the .ms format for on-device deployment through the model conversion tool.

[h2]MS Model

A device-side model format dedicated to MindSpore Lite, with the file extension .ms. It is a model format fully optimized for comprehensive metrics such as ROM, RAM, and inference latency in resource-constrained device-side scenarios. It is generated by the model conversion tool from third-party framework models (ONNX, CAFFE, TFLITE, etc.) or MindIR models, and can be directly used for MindSpore Lite inference or training.

N

[h2]NNRt

Abbreviation for Neural Network Runtime. It is HarmonyOS's cross-chip inference computing runtime for the AI domain. Serving as an intermediate bridge between upper-layer AI inference frameworks and underlying acceleration chips, it enables cross-chip inference computing of AI models. MindSpore Lite supports configuring NNRt to enable AI-dedicated chips (such as NPUs) for accelerated inference.

[h2]NPU

Abbreviation for Neural Processing Unit, that is, a neural network processor. It is a dedicated AI acceleration chip specialized in performing neural network inference computation, with strong inference capability but relatively limited operator specifications.

O

[h2]On-device Training

Trains a model on on-device devices so that the model adapts to user behavior in actual business scenarios. MindSpore Lite provides an independent training development process and API system (training configuration, training mode setting, model export, etc.), which contrasts with the inference process.

[h2]Offline Model

A model pre-converted using a hardware vendor's offline model conversion tool, which is parsed and inferred by the hardware vendor. During inference, MindSpore Lite directly passes the offline model to the AI hardware connected to NNRt, allowing it to be loaded without online graph construction and greatly reducing model loading latency.

[h2]Operator

The basic computational unit in a neural network, corresponding to a specific mathematical operation (such as convolution, pooling, and activation). It is the fundamental node that constitutes a model's computational graph. For the range of ONNX Opset18 operators supported by MindSpore Lite Kit, see the operator support list.

[h2]Operator Fusion

An optimization technique that merges multiple consecutive operators into a single fused operator during model conversion, reducing the number of nodes in the computation graph and the number of memory accesses, thereby improving inference performance. The model conversion tool supports disabling specified fused operators through configuration.

P

[h2]Post-Training Quantization

A technique that quantizes and compresses model weights and activations after model training is complete. It can convert a floating-point model into a low-precision model (such as INT8), making the model smaller and inference faster, and is suitable for on-device deployment scenarios with limited resources.

T

[h2]Tensor

Similar to arrays and matrices, a tensor is the basic data structure in MindSpore Lite network operations, used to carry the input, output, and intermediate computation results of a model.

[h2]Thread Affinity

A scheduling policy that binds runtime threads to CPU cores. Based on the physical core frequency, CPU cores are classified into big, medium, and little cores. Threads can be configured to preferentially bind to big or medium cores to optimize inference performance.