Run and CLI
Command reference for CIMFlow compiler commands and native cim-compiler tools
The compiler can be invoked through cimflow compile for standard workflows or the cim-compiler native binary for advanced use.
Which Command to Use
CIMFlow Compile Command
The cimflow compile command provides CG-level and OP-level compilation with automatic config resolution.
cimflow compile cg \
-m model.onnx \
-o output/cg \
-t 8 -k 16 -b 16 -c 64 \
--batch-size 8 --strategy dpcimflow compile op \
-i output/cg/instructions_*.json \
-o output/op \
-cf config.jsonNative Binary
The native cim-compiler binary provides additional commands and options not exposed through cimflow compile.
cim-compiler [--log-level LEVEL] COMMAND [OPTIONS]Global Options
| Option | Description |
|---|---|
--log-level | TRACE, DEBUG, VERBOSE, INFO, WARNING, ERROR |
--version, -V | Print compiler version |
Compilation Commands
These commands appear when you run cim-compiler --help.
Flag Case Difference
The native cim-compiler uses uppercase flags (-T, -K, -B, -C) while cimflow compile uses lowercase (-t, -k, -b, -c).
Developer Commands
The following commands are not shown in cim-compiler --help but are available for specialized use cases: format conversion, instruction inspection, behavioral simulation, and config template generation.
| Command | Purpose |
|---|---|
compile | Compile CIM-DSL source to final_code.json |
convert | Convert instruction formats (json/asm) |
show | Display instruction file in human-readable assembly |
simulate | Built-in behavioral simulation (distinct from the cycle-accurate cim-simulator) |
multi-core-simulate | Multi-process behavioral simulation |
op | Single-operator compilation/testing workflow |
config | Generate compiler-format config from template |
cfg_cimsim | Generate simulator-format config from template |
Advanced Examples
# DSL source -> final_code.json
cim-compiler compile -i code.cim -o output/codegen -c config.json
# JSON ISA -> ASM
cim-compiler convert --src-type json --dst-type asm --src-file isa.json --dst-file isa.asm
# Inspect instruction stream
cim-compiler show -i isa.json --type jsonLast updated on