The application discloses a bilingual semantic neural network compiling
system and method, relates to the technical field of
deep learning, and can receive an ONNX model derived from multiple
deep learning frameworks, automatically generate an MLIRScript representation of a Python static subset, and provide
executable debugging and MLIR conversion functions in an execution semantic mode and a compiling semantic mode respectively; in the execution semantic mode, intermediate
tensor values, shapes and numerical distributions can be observed in real time, and model debugging and
verification can be realized; in the compiling semantic mode, a standard MLIR high-level dialect representation is generated through
static analysis, the operator topology,
tensor types, shapes and parameters are kept consistent with the original ONNX model, and a basis is provided for subsequent multi-hardware platform optimization. The application realizes a neural network compiling path with unified input of multiple front ends and efficient deployment of multiple back ends, solves problems, such as difficult debugging and
verification, framework binding limitation and model semantic loss, in the prior art, and improves the debuggability and portability of
deep learning models across frameworks and hardware.