Pipeline Overview
End-to-end compiler stages and intermediate output formats
CIMFlow-Compiler provides a two-level compilation flow:
- CG-level: partition model graph and generate stage/core tasks
- OP-level: lower tasks to executable ISA sequences
A separate DSL and MLIR backend (see DSL and MLIR Backend) generates low-level ISA code for operator kernels like convolution.
Compilation Paths
cim-compiler network \
-m model.onnx \
-o output \
-c config.json \
-T 8 -K 16 -B 16 -C 64 \
--batch-size 8 --strategy dpInput: ONNX model + hardware config.
Output: unified ISA JSON (isa_instructions_*.json).
# Stage 1: CG-level
cim-compiler cg-level -m model.onnx -o output/cg -T 8 -K 16 -B 16 -C 64
# Stage 2: OP-level
cim-compiler op-level -i output/cg/instructions_*.json -o output/op -c config.jsonThis path is useful for inspecting intermediate CG IR and debugging stage partitioning.
Stage Graph
The graph below corresponds to the full cim-compiler network path.
The Model Simplify stage performs ONNX preprocessing, including operator fusion (e.g., BatchNorm folding) and shape inference. The CG IR output (instructions_<...>.json) serves directly as OP-level input — when running the two-step process, the CG output directory becomes the OP input path.
Output Files
Typical output structure for cim-compiler network:
Typical output structure for staged flow:
Last updated on