CompileCommand Flag Catalog — the 147-Flag Surface
All flag literals, help strings, defaults, and offsets on this page apply to
neuronx_cc2.24.5133.0+58f8de22 (cp310 Cython moduleneuronxcc/driver/commands/CompileCommand.cpython-310-x86_64-linux-gnu.so). Other wheels differ; treat every address as version-pinned. Offsets in[...]are.rodatabyte offsets read from the IDA string table /_rodata.bin.
Abstract
This page is the complete user-facing option reference for the neuronx-cc compile subcommand: every --flag the parser recognizes, with its argument type, default value, visibility class, and a concise (byte-verbatim where present) help string, in one master catalog table. It is the authoritative grammar — a reader who wants to know "does --X exist, what does it take, and will --help show it" should be able to answer that here without touching the binary.
The flag surface is registered in exactly one Cython function — CompileCommand.__init__ (__pyx_pw_..._CompileCommand_1__init__ @ file-off 0x36290, ~30 564 decompiled lines, 717 add_argument/-- references) — and its pipeline effects are assembled in CompileCommand.buildPipeline (0x619d0, ~16 616 lines), which constructs the tensorizer_options string and the Job list. Every add_argument call is intercepted by _AddArgumentCallInterceptor (in driver/Arguments.cpython-310-...so) and recorded in _ArgumentRegistry keyed by an ArgKind (PUBLIC/INTERNAL/HIDDEN/EARG/Harg); that ArgKind decides which --help* surface a flag appears on (see 3.9 for the registry mechanics, 3.2 for the two-parser architecture).
The exact literal set was re-derived for this page by extracting every .rodata string beginning -- from the binary's string table: 147 distinct -- literals (CONFIRMED — jq -r '.[].value' …_strings.json | rg '^--' | sort -u | wc -l ⇒ 147). That is the "147-flag surface." Note what the count includes: a handful of flags appear twice — once as the bare flag and once as a defaulted =value form (e.g. --internal-dma-qos-class-count and --internal-dma-qos-class-count=) — and four --no-* negation companions are separate literals. So 147 ≠ 147 user-distinct features; the base-name count (=value/--no-/short companions folded into their parent) is ~140. Both numbers are reported, and the table below collapses the duplicate =value literals into one row while keeping the --no-* companions visible.
| Registration site | CompileCommand.__init__ @ 0x36290 (one function, 717 --/add_argument refs) |
| Pipeline effects | CompileCommand.buildPipeline @ 0x619d0; validateArgs @ 0x2d690 |
| Visibility model | _ArgumentRegistry keyed by ArgKind {PUBLIC, INTERNAL, HIDDEN, EARG, Harg} (driver/Arguments.so) |
Distinct -- literals | 147 (CONFIRMED, includes =value dup forms + --no-* companions) |
| Base-name count | ~140 (dup/=value/negation/short companions folded) |
| Shared driver flags | --logfile · --logfile-verbose · --verbose · --version/-V (in CommandDriver.so, on every subcommand) |
| Short aliases | -O → --optlevel, -o → --output, -V → --version (Cython string_tab[111]/[613]) |
| Help surfaces | --help (PUBLIC) · --help-hidden (+HIDDEN/EARG) · --help-hidden-list (+INTERNAL, dumps defaults) |
CORRECTION — there is no
--Mflag. A rawstrings | rg '^--'sweep once suggested a--Mflag; no byte-exact--Mliteral exists inCompileCommand.so(verified:rg -x -- '--M'over the 147-literal set ⇒ ABSENT). The "layers per module" knob is--meta-module(metavarM, help "Number of layers to be clustered into a module (partition). Set this to zero to treat the entire graph as a single module."[0x85b60], CONFIRMED present). The apparent--Mwas a multi-line/x86-fragment artifact; its candidate help string belongs to--meta-module. The catalog uses--meta-module.
How to read the catalog
Columns. flag (byte-verbatim literal) · argtype · default · Vis (visibility / ArgKind) · help (concise; quoted text is byte-verbatim .rodata, offset in []).
argtype legend. bool = store_true/store_false; ED = EnableDisableArgumentAction pair (auto-registers a --no-/--disable companion); NO = NoableArgumentAction pair (auto --no-<flag>); DEP = DeprecatedArgumentAction (still parsed, warns); int/float/str/list; enum(...) = fixed choice set; =N/=value = literal stored with its default token (Cython idiom for a defaulted opt).
Vis legend. PUB = shown by compile --help. HID = shown only by --help-hidden (HelpHiddenAction). INT = shown only by --help-hidden-list (HelpHiddenListAction); by convention every --internal-* / --enable-internal-* flag. EARG = experimental ArgKind (the --enable-experimental-* / --experimental-* family; help-suppressed from --help, listed by --help-hidden). DEP = deprecated. Where the page writes PUB(/HID) the ArgKind byte was not resolvable to a single constant from the deeply-nested __init__ decompilation (see honesty note).
Confidence. C = CONFIRMED (literal + help/dest both in .rodata and consistent, or a decompiled equality/SetAttr proves the default/effect). S = STRONG (literal + dest present; default/effect inferred from adjacent dest + buildPipeline/validateArgs use, no literal default constant). I = INFERRED (literal present; type/default/visibility reasoned from naming convention + Action class only). Cells whose value is computed at runtime from --arch/--target are tagged (per-target) and are not a static token.
NOTE — defaults honesty.
(per-target)/(none)defaults are computed invalidateArgs/buildPipelinefrom--arch/--target; they are not single rodata constants and are never guessed here. Plainboolstore_trueflags defaultFalse.ED/NOflags expose a--no-/--disablecompanion.
Master catalog — A–Z
Shared top-level driver flags
Registered in driver/CommandDriver.cpython-310-...so, not in CompileCommand — they appear on every subcommand including compile. Verbatim from the embedded usage block (0x37c02–0x37d4f) + help strings (0x37840–0x37940).
| flag | argtype | default | Vis | help | Cf |
|---|---|---|---|---|---|
--logfile <logfile> | str | log-neuron-cc.txt | PUB | "Name of the logfile. (Default: %(default)s)" — file sink for neuronxlogger via setup_logfile_logging() | C |
--logfile-verbose | enum(debug,info,warning,user) | info | PUB | "Specify the verbosity level of the logfile. (Default: %(default)s)" | C |
--verbose | enum(debug,info,warning,user) | user | PUB | "Specify the verbosity level of console output. (Default: %(default)s)" → stdout handler level | C |
--version, -V | flag | n/a | PUB | "Print version information and exit" — VersionAction → getVersionString(); prints NeuronX Compiler version <...>, exits | C |
--fork-subcommand | int | (internal) | HID | (no help / SUPPRESS) — re-exec helper for the --fork worker model | S |
CompileCommand flags A–F
| flag | argtype | default | Vis | help | Cf |
|---|---|---|---|---|---|
--allocator <value> | enum(coloring, linear_scan) | coloring | HID | (no help) — selects walrus register/memory allocator; bad value raises "Unsupported allocator= %s" [0x88c30] | S |
--arch <value> | enum(inf1,inf2,trn1,trn1n,trn2,trn2n,trn3,sunda) | (from --target) | PUB | "Target MLA architecture" [0x88c50] — sets NeuronCore generation; gates LNC default (arch!="sunda" or lnc==1 [0x871a0]) | C |
--auto-cast <cast mode> | enum(none, matmult, all) | none | PUB | "Automatically cast FP32 operators to a lower-precision type for increased performance. (Default: %(default)s)" [0x866e0]; → fp32-cast policy in tensorizer_options (3.14) | C |
--auto-cast-type <data-type> | enum(fp16, bf16, tf32, fp8_e4m3) | bf16 | PUB | "When auto-cast mode is enabled, set the lower-precision data type to which the selected FP32 operations are cast. (Default: %(default)s)" [0x85280] (fp8_e4m3 canonicalizes to fp8e4 in buildPipeline; fp32r reachable only via --fast-math macros — see CORRECTION below) | C |
--auto-compare-mismatch | bool | False | HID | (no help) — golden-compare debug toggle; feeds XLAInferGoldens numerical-compare path | S |
--cc-pipeline-tiling-factor=2 | int(=N) | 2 | HID | (no help; literal carries default =2 [0x88550]) — collective-compute pipeline tiling factor | S |
--cnn-training-model | bool | False | HID | (no help) [0x89510] — marks graph as CNN-training; cousin of --model-type cnn-training | S |
--cpu-arch <value> | enum(skylake-avx512, skylake) | (host/native) | HID | "Target CPU architecture" [0x88c70] — CPU/simulator target for BIRSim/qemu host execution | C |
--disable-concat-delinearizer | bool | False | HID | (no help) [0x88530] — turns OFF the concat-delinearizer penguin pass | S |
--disable-degraded-fusion | bool | False | HID | (no help) [0x88bd0] — disables the "degraded fusion" heuristic | S |
--disable-prefer-par-on-non-broadcast | bool | False | HID | (no help) [0x87120] — disables the "prefer parallel on non-broadcast" layout/tiling heuristic (dest in BP use-list) | S |
--disable-stream-shuffle | bool | False | HID | (no help) [0x88e10] — disables stream-shuffle DMA optimization | S |
--disable-stream-transpose-small | bool | False | HID | (no help) [0x87fa0] — disables stream-transpose for small tensors | S |
--disable-tiling-of-non-overlapping-mem-access | bool | False | HID | (no help) [0x870e0] — disables tiling for non-overlapping memory accesses | S |
--distribution-strategy <name> | str/enum(fsdp, nemo, llm-training) | (none) | INT | "Enable compiler optimizations for best performance with specific distribution strategy" [0x84b80] — BP branches to FSDP/NeMo/LLM-training sharding (Part 2.27 / D-AB08) | C |
--distribution-type-llm-training | bool | False | INT | (no help) [0x87f60] — shorthand that sets distribution_strategy=="llm-training" (BP compares the literal) | C |
--enable-arch-legalize | bool | False | PUB(/HID) | (no help) [0x89170] — public face of --enable-internal-arch-legalize | S |
--enable-bir-vnsplitter | bool | False | HID | (no help) [0x89010]; dest enable_bir_vnsplitter [0x88b90] — enables BIR virtual-node splitter | S |
--enable-ccop-compute-overlap | bool | False | HID | (no help) [0x88510] — overlaps collective-compute (CCOP) with compute | S |
--enable-dge | ED | ON for levels {io, scalar_dynamic_offset} | PUB | "Enable DGE [levels enabled by default: io, scalar_dynamic_offset]" [0x86240] — Dynamic Generation Engine descriptors; fine-tune via --internal-enable/disable-dge-levels | C |
--enable-explicit-bwd-convs-padding | bool | False | PUB(/HID) | (no help) [0x86f60] — emits explicit padding for backward convolutions | S |
--enable-fast-context-switch | bool | False | PUB | "Optimize for faster model switching rather than execution latency." [0x85660] | C |
--enable-fast-loading-neuron-binaries | bool | False | PUB | "This option will defer loading some weight constants until the start of model execution. This results in overall faster system performance when your application switches between models frequently on the same neuron core (or set of cores)." [0x856a4] — conflicts with --static-weights [0x85620] | C |
--enable-native-kernel | bool | False | PUB(/HID) | (no help) [0x89150] — enables native-kernel lowering path | S |
--enable-native-kernel-select-and-scatter | bool | False | HID | (no help) [0x86cc0] — routes select_and_scatter through the native-kernel impl | S |
--enable-parallel-queues | bool | False | PUB | "Enable parallel DMA queues to improve memory bandwidth utilization" [0x86140] | C |
--enable-p-to-pp-broadcast | bool | False | HID | (no help) [0x88970] — partition→partition-pipeline broadcast optimization (dest in BP use-list) | S |
--expand-batch-norm-training | bool | False | HID | (no help) [0x88650] — expands BatchNorm-training ops into primitives in the Frontend | S |
--expand-batch-norm-training-and-grad | bool | False | HID | (no help) [0x87e80] — as above plus the gradient computation | S |
--experimental-convolution-kernel-match | bool/str | False | HID(EARG) | (no help) [0x86c80] — experimental conv kernel-matching | S |
--experimental-unsafe-fp8e4m3fn-as-fp8e4m3 | bool | False | HID(EARG) | "Convert fp8e4m3fn types to fp8e4m3" [0x864a0] — unsafe; internal twin --internal-experimental-unsafe-fp8e4m3fn-as-fp8e4m3 | C |
--fast-math <cast-method> | list (nargs='+', 16-token macro set) | [] (empty) | INT | "Controls how the compiler makes tradeoffs between performance and accuracy for fp32 operations. (Default: %(default)s)" [0x87380] — master precision/relayout knob; macro set → tensorizer_options (3.14) | C |
--fork | bool/int | False/0 | HID | (no help) — run compilation in a forked worker model (distinct from --enable-internal-fork-backend, which forks only the backend) | I |
--framework <value> | enum (XLA) | XLA (auto: "XLA detected" [0x89e58]) | PUB | "Framework used to generate training model." [0x85d80] — selects input-graph frontend (XLAInterface); HLO vs other ingest | C |
CORRECTION — the precision-flag
argparsedefaults are--auto-cast=noneand--fast-math=[], notmatmult/fp32-cast-matmult. Earlier rows on this page gave--auto-castdefaultmatmultand--fast-mathdefaultfp32-cast-matmult. Those describe the behaviour selected when auto-cast is enabled, not the registeredargparse default=literals. Byte-anchored inCompileCommand.__init__(0x36290): the--auto-castkwargs buildPyDict_SetItem(default, __pyx_n_u_none)(mov rdx, __pyx_n_u_none @ 0x39a7b→mov rsi, __pyx_n_s_default @ 0x39a82), and--fast-mathbuildsdefault=fromPyList_New(0)(xor edi, edi; call _PyList_New @ 0x3a6ec→n_s_default @ 0x3a702) — i.e. an empty list. So the genuine defaults are no casting until the user asks for it.--fast-mathis additionallykind=ArgKind.INTERNAL(.INTERNALfetched @0x3a833),nargs='+'. The rows above and the choice appendix below are corrected accordingly; 3.14 precision-flag-marshalling §2.1/§2.3 is authoritative on this axis. (CONFIRMED — disasm at the cited offsets.)
CORRECTION —
--auto-cast-typehas FOUR choices, includingfp8_e4m3. An earlier version of this row listed onlyenum(fp16, bf16, tf32)and claimedfp8e4was "reachable only via--fast-mathmacros". That is wrong:fp8_e4m3is a genuine direct choice of--auto-cast-type. Byte-anchored inCompileCommand.so.rodata: the choice literalfp8_e4m3is interned__pyx_n_u_fp8_e4m3at[0x8a560], and its per-choice doc line"fp8_e4m3: floating point with 4 bits exponent and 3 bits mantissa"sits at[0x8536e], contiguous with thefp16:/bf16:/tf32:doc lines at[0x85320]/[0x85346]/[0x85357]— the four-choice description block.buildPipelinethen canonicalizes the user spellingfp8_e4m3 → fp8e4(3.14 §4.1). Onlyfp32r(thetf32-canonical) and the relayout-dtype variants are macro-only;fp8_e4m3is not. (CONFIRMED —.rodatastring + interned-name symbol + adjacent doc-line block.)
CompileCommand flags H–M
| flag | argtype | default | Vis | help | Cf |
|---|---|---|---|---|---|
--help | flag | n/a | PUB | "Show this help message and exit" [0x87300] — HelpAction; prints PUBLIC flags, exits | C |
--help-hidden | flag | n/a | HID | "Print help for internal options" [0x87320] — HelpHiddenAction; prints PUBLIC + HIDDEN (+EARG) | C |
--help-hidden-list | flag | n/a | HID | "List internal options and default values" [0x85cc0] — HelpHiddenListAction; dumps full registry (INTERNAL flags + defaults) | C |
--images | list[str]/positional | (none) | PUB | (no help) [0x8a800] — input image/graph file(s) to compile (fileGlobs ingest) | S |
--inst-count-limit=100000000 | int(=N) | 100000000 | HID | (no help; literal carries default =100000000 [0x88630]) — caps total instruction count (codegen safety) | S |
--io-config <value> | str (path/json) | (none) | PUB | (no help) [0x8a370] — supplies IO tensor layout/dtype config to the Frontend / StaticIOTranspose (3.15) | S |
--jit-infergoldens | bool | False | HID | (no help) [0x89880] — JIT-infer golden reference outputs (InferGoldens/XLAInferGoldens); cf. --auto-compare-mismatch | S |
--jobs <N> | int | (cpu_count-derived) | PUB | "Limit number of simultaneous of processes and threads" [0x87340] — distinct from --num-parallel-jobs | C |
--layer-unroll-factor <N> | int | (none / model-driven) | HID | (no help) [0x892b0]; layer_unroll_factor_Used [0x88890] tracks user-set — loop/layer unroll factor | S |
--layout-transform-heuristic=mcts | enum(=value) | mcts | HID | (no help; literal carries =mcts [0x86880]) — layout-transform search heuristic (Monte-Carlo Tree Search) | S |
--lnc <N> | int | (per-target: 2 on Trn2, else 1) | PUB | "Number of NeuronCores per Logical Neuron Core. This option is only valid for Trn2 targets. On Trn2, the default is 2." [0x85be0] — canonical short form of --logical-nc-config; deprecated alias --num-neuroncores warns "DEPRECATED. Prefer --lnc instead." [0x88140] | C |
--logical-nc-config <N> | int | (per-target: 2 on Trn2, else 1) | PUB | "…On Trn2, the default is 2." [0x85be0] — long form of --lnc; default-failure path "Unrecognized architecture, unsure how to default --logical-nc-config" [0x85440] | C |
--meta-module <M> | int | 0 (0 ⇒ whole graph = single module) | HID | "Number of layers to be clustered into a module (partition). Set this to zero to treat the entire graph as a single module." [0x85b60] — module size for partitioner / Modular Flow; meta_module read in BP (~15539) | C |
--metrics-timestamp <value> | str | (utcnow isoformat) | HID | (no help) [0x896a0] — timestamp stamped into global_metric_store.json [0x88950] | S |
--model-specific-opt=unet | enum(=value) | (unset) | HID | (no help; literal carries =unet [0x88af0]) — model-specific optimization presets (UNet/diffusion) | S |
--model-type <str> | enum(transformer, transformer-inference, cnn-training, unet-inference, vae-inference, operator-fusion, generic) | (auto / generic) | INT | "Enable compiler optimizations for best performance with specific model types" [0x861a0] — model-type optimization preset; model_type compared in BP | C |
CompileCommand flags N–Z
| flag | argtype | default | Vis | help | Cf |
|---|---|---|---|---|---|
--native-kernel-auto-cast=<value> | str/enum(=value) | (empty) | HID | (no help; literal carries trailing = [0x88ad0]) — per-native-kernel auto-cast override | S |
--native-to-custom-softmax | bool | False | HID | (no help) [0x88870] — rewrites native softmax ops to the custom-softmax kernel | S |
--neuroncore-pipeline-cores <N> | int | (per-target) | PUB | "Number of neuron cores to be used in NeuronCore Pipeline mode. (Default: %(default)s)" [0x859e0] + disclaimer [0x85a3d] (not for data-parallel deployment) | C |
--nn-executor <value> | str/enum | (none) | HID | (no help) [0x89f58] — selects NN/input-graph executor backend (companion of --tfpb) | S |
--no-enable-tritium-loopfusion | bool (NO negation) | (positive default ON) | HID | (no help) [0x881f0] — --no- companion that DISABLES Tritium loop-fusion penguin pass | S |
--no-internal-hlo-remat | NO (negation) | (positive off) | INT | "Do graph-level rematerialization in the Frontend" [0x862e0] (shared) — negation of --internal-hlo-remat; sorts into N | C |
--no-keep-remat-dma-transpose | bool (NO negation) | (positive default) | HID | (no help) [0x88430] — disables keeping the rematerialized DMA-transpose | S |
--non-local-tensors=<list> | list/str(=value) | (empty) | HID | (no help; literal carries = [0x89680]) — names tensors to treat as non-local (cross-partition/core) | S |
--no-run-pg-layout-and-tiling | bool (ED/NO negation) | (positive default) | HID | (no help) [0x88410] — disables the PG (parallel-group) layout-and-tiling pass | S |
--num-neuroncores <N> | int (DEP) | (per-target) | DEP | "DEPRECATED. Prefer --lnc instead." [0x88140] — legacy spelling, still parsed (DeprecatedArgumentAction), maps to LNC | C |
--num-parallel-jobs <N> | int | (cpu-count-derived) | PUB | "Number of parallel jobs during compilation" [0x859a0]; num_parallel_jobs_Used [0x88d10] tracks user-set — distinct from --jobs | C |
--option-preset <value> | str/enum | (none) | HID | (no help) [0x89c50] — named bundle of pre-set options expanded into underlying flags | S |
--optlevel <0|1|2|3> (-O) | enum("0","1","2","3") | 2 | PUB | "Optimization level. The default setting -O2 provides the best balance between performance and compile time. -O1 enables the core performance optimizations…, while also aiming to minimize compile-time. -O3 can provide additional performance in some cases but may incur higher compile time and memory usage…" [0x857a0]; extra -O3 note [0x871e0] | C |
--output <file> (-o) | str (path) | file.neff | PUB | "Filename where compilation output (NEFF archive) will be recorded. (Default: %(default)s)" [0x85e80] | C |
--partitioner-opts=<opts> | str(=value) | --transformer | HID | (no help; literal carries =--transformer [0x881c0]) — free-form options forwarded to the partitioner | S |
--partitions-per-bank=<N> | int(=N) | 64 | HID | (no help; literal carries =64 [0x88cf0]) — SB partitions packed per bank (matches 128-partition / 2-bank geometry, Part 2.x) | S |
--pipeline <stage[,stage...]> | list[str] | (full pipeline) | HID | (no help) [0x8a520] — PARTIAL-PIPELINE selector; membership-tested in BP (~8789), gates pass-blocks; use with --state | S |
--policy <value> | str/enum | (none) | HID | (no help in CompileCommand; penguin Options.so carries "Compatible mode for the old scheduler") — scheduler/optimization policy forwarded to penguin | S |
--query-compute-placement | bool | False | HID | "Determine which compute engine to execute certain op/subgraph, by returning different return code" [0x86360] — QUERY MODE; public face of --internal-compute-engine-placement | C |
--rtol=<float> | float(=value) | (test-harness default) | HID | (no help; literal carries = [0x8a9d8]; metavar tolerance) — relative tolerance for the golden-compare path (pairs with --atol=) | S |
--run-id=<value> | str(=value) | (generated) | HID | (no help) [0x8a4e5] — run identifier stamped into global_metric_store.json; pairs with --submit-metrics | S |
--run-pg-layout-and-tiling | ED | (off) | HID | (no help) [0x88810] — runs the PG layout-and-tiling pass; negation --no-run-pg-layout-and-tiling | S |
--run-simulator-after=<stage> | str/enum(=value) | BirCodeGenLoop | HID | (no help; literal carries =BirCodeGenLoop [0x86820]) — runs BIRSim immediately after the named stage | S |
--scheduler <value> | enum(none, experimental-loop-shift-left, experimental-loop-lsa) | none | HID | (no help; VA raises "Unsupported scheduler= %s" [0x88c10]) — selects experimental loop scheduler in penguin scheduling | C |
--skip-pass=<PassName> | list/str(=value, repeatable) | (none) | HID | (no help) — removes named pass(es); two baked-in literals --skip-pass=MaskPropagation [0x88750], --skip-pass=VDNSPrep [0x89430] | S |
--softmax-division-delay | bool | False | HID | (no help) [0x88cd0] — delays the softmax division (numerator/denominator split) | S |
--softmax-epsilon=<float> | float(=value) | -100000000.0 | HID | (no help; literal carries =-100000000.0 [0x883f0]) — large-negative masking value (-1e8) for numerically-stable softmax | S |
--spmd | bool | False | HID | (no help; cf. "enable spmd mode" [0x898e0] for the experimental twin) — SPMD compilation mode; cf. --enable-experimental-spmd (D-AB08) | S |
--state in:<S>:out:<S> | str | (full: in=initial, out=final) | HID | (no help) — START/END pipeline STATE so the compiler runs a sub-range; parsed by getInStateFromCmdline [0x84040]; works with --pipeline | C |
--static-weights | bool | False | PUB(/HID) | (no positive help; conflict "Option %s cannot be used with --static-weights." [0x85620]) — bakes weights into the NEFF; mutually exclusive with --enable-fast-loading-neuron-binaries | C |
--submit-metrics | bool | False | HID | (no help) — submits compile metrics to global_metric_store.json [0x88950]; pairs with --run-id/--metrics-timestamp | S |
--target <instance-family> | enum(trn1,trn1n,trn2,trn2n,trn3,inf1,inf2,sunda) | (required / from instance) | PUB | "Name of Neuron instance family where the compiled model will be run." [0x85c60] — primary target; instanceToFamily [0x84730] resolves family → MLA arch | C |
--temp-dir <dir> | str (path) | (generated working temp dir) | PUB(/HID) | (no dedicated help; log "Intermediate files stored in %s, output in %s" [0x85d40]) — directory for intermediate artifacts (SaveTemps, getWorkingDir) | S |
--tensorizer-parallel-compile | bool | False | HID | (no help) [0x883d0] — multi-process tensorizer compilation; complements --num-parallel-jobs/--fork | S |
--tfpb <file> | str (path) | (none) | HID | (no help) [0x8a9a0] — alternate input-graph format (tensorizer/TF protobuf) instead of HLO; pairs with --nn-executor | S |
--upcast-all-to-fp32 | bool | False | PUB(/HID) | "Upcast all ops to FP32" [0x88e50] — public face of internal --internal-upcast-all-to-FP32 | C |
--vectorize-strided-dma | bool | False | HID | (no help) [0x88eb0] — vectorizes strided DMA descriptors (DMA-codegen optimization) | S |
NOTE — no W/X/Y/Z CompileCommand flags. No
--flagliteral whose base-name begins W, X, Y, or Z exists inCompileCommand.so(cross-checked over the full literal set).--verbose/--versionbegin V but are registered inCommandDriver, catalogued above.
The --internal-* family (auto-INTERNAL, surfaced by --help-hidden-list)
These flags acquire ArgKind.INTERNAL automatically because their dest starts with "internal-" — _AddArgumentCallInterceptor.add_argument (Arguments.so @ 0x19210) calls name.startswith("internal-") (compared literal __pyx_kp_u_internal = "internal-" [0x23d08]); on match → kind = ArgKind.INTERNAL. They show only under --help-hidden-list, which dumps each INTERNAL flag with its default. Default False unless a value-arg.
| flag | argtype | default | help | Cf |
|---|---|---|---|---|
--internal-autotune | bool | False | "Internal flag used by autotune" [0x87fd0] | C |
--internal-autotune-config <path> | str | (none) | "Specify autotune config file path" [0x85520] | C |
--internal-autotune-subprocess | bool | False | (no help) [0x882d0] — marks this process an autotune child | S |
--internal-backend-options <str> | str | (none) | (no help) [0x888f0] — free-form string forwarded to BIR/walrus backend | S |
--internal-build-with-users | bool | False | (no help) [0x887d0] — retain def-use ("with users") info | S |
--internal-compiler-debug-mode | bool/str | False | (no flag help; banner "WARNING: Debug mode enabled via --internal-compiler-debug-mode" [0x853c0]) | C |
--internal-compiler-debug-mode-numerical | bool | False | "compile saves and logs information useful for debugging,and also for numerical correctness debugging" [0x84b00] | C |
--internal-compute-engine-placement | bool/str | (off) | "Determine which compute engine to execute certain op/subgraph, by returning different return code" [0x86360] (twin of --query-compute-placement) | C |
--internal-disable-birsim-validation | bool | False | (no help) [0x86b80] — disables BIRSim validation pass | S |
--internal-disable-birverifier-validation | bool | False | (no help) [0x86b40] — disables the BIRVerifier validation job | S |
--internal-disable-dge-levels <list> | list/str | (none) | "Specify different DGE levels to be turned OFF for dynamic DMA" [0x872c0] | C |
--internal-disable-fma-on-ios | bool | False | "Disable generating FMA operations on input or output tensors" [0x86320] | C |
--internal-disable-layer-det | bool | False | "Force partitioner to disable layer detection heuristic" [0x85e40] | C |
--internal-dma-qos-class-count[=N] | int(=N) | (per-target) | "Number of DMA QoS classes" [0x887f0] — two literals: bare [0x88290] + =-form [0x87e20] | C |
--internal-dma-qos-for-spill-code[=N] | int/str(=N) | (none) | "Specify the QoS class to assign to spill code" [0x87280] — two literals: bare [0x86b00] + =-form [0x84c20] | C |
--internal-dynamic-dma-scratch-size-per-partition <N> | int | (per-target) | "SB scratch size per partition for Dynamic DMA" [0x85560] | C |
--internal-enable-bir-debugger-launch-configuration | bool | False | (no help) [0x86a80] — emits a BIR debugger launch config | S |
--internal-enable-dge-levels <list> | list/str | (adds to default_dge_on_levels) | "Specify different DGE levels to be turned ON for dynamic DMA" [0x84c80] | C |
--internal-enable-dma-qos-labeling | bool | False | "Enable penguin to assign QoS classes to DMA instructions" [0x86100] | C |
--internal-experimental-unsafe-fp8e4m3fn-as-fp8e4m3 | bool | False | "Convert fp8e4m3fn types to fp8e4m3" [0x864a0] (internal alias of the public EARG twin) | C |
--internal-force-all-uniq | bool | False | "Force partitioner to treat all modules as uniq." [0x85e00] — disables module-dedup | C |
--internal-hlo-analyze-schedule | bool | False | (no help) [0x88080] — runs HLO schedule analysis | S |
--internal-hlo-remat (+ --no-internal-hlo-remat) | NO | (off) | "Do graph-level rematerialization in the Frontend" [0x862e0] | C |
--internal-inject-error | bool/str | (off) | "Deliberately trigger error to as part of negative testing" [0x86420] | C |
--internal-interleave-kind <value> | enum(dst_reduce, first_mm) | (none) | (no help) [0x888d0] — op-interleaving strategy in scheduling | S |
--internal-log-additional-qor-metrics | bool | False | (no help) [0x86960] — logs extra QoR metrics | S |
--internal-num-neuroncores-per-sengine <N> | int | (per-target) | (no help) [0x86920] — NeuronCores per sequencer-engine | S |
--internal-num-semaphores-per-dma-queue <N> | int | (per-target) | "Number of semaphores allocated to a DMA queue" [0x85960] | C |
--internal-relaxed-order (via --enable-internal-relaxed-order) | bool | False | (no help) — relaxed instruction ordering (see enable-internal family) | S |
--internal-suppress-error | bool/str | (off) | (no help) [0x88b10] — suppresses a named error (triage) | S |
--internal-tensorizer-opt-level <N> | int | (tracks --optlevel) | (no help) [0x88060] — overrides tensorizer opt level independent of -O (3.10) | S |
--internal-upcast-all-to-FP32 | bool | False | "Upcast all ops to FP32" [0x88e50] — internal twin of --upcast-all-to-fp32 | C |
The --enable-internal-* family (feature toggles; INTERNAL)
Same "internal-"-substring rule ⇒ ArgKind.INTERNAL (surfaced by --help-hidden-list). These are opt-in switches for in-development backend/flow features; off by default; more "productised" than raw --internal-* knobs. All bool, default False.
| flag | help | Cf |
|---|---|---|
--enable-internal-anti-dependence-reduction [0x86ee0] | (no help) — anti-dependence reduction (dest anti_dependency_analyzer) | S |
--enable-internal-arch-legalize [0x88120] | (no help) — architecture-legalization pass | S |
--enable-internal-bir-e2e-compilation [0x86e80] | (no help) — end-to-end BIR compilation | S |
--enable-internal-bir-linker [0x88690] | (no help) — BIR linker flow | S |
--enable-internal-call-graph [0x88670] | "Link modules using call-graph for Modular Flow" [0x85d00] | C |
--enable-internal-data-race-checker [0x86e40] | "Enable data race checker" [0x88a30] | C |
--enable-internal-dma-desc-reuse [0x87ee0] | "Reuse DMA descriptors for Modular Flow" [0x855e0] | C |
--enable-internal-fork-backend [0x88330] | "Fork backend in a separate process" [0x85dc0] | C |
--enable-internal-io-dge [0x88dd0] | "Enable IO Dynamic DMA" [0x890b0] | C |
--enable-internal-lnc-single-graph-compilation [0x86e00] | "Enabling this option will lead Penguin to generate a single BIR graph corresponding to the computation for all LNC cores, rather than the default approach of generating multiple graphs, one per each LNC core. This is currently an experimental feature which is turned off by default." [0x85ee0] | C |
--enable-internal-memory-analysis [0x86dc0] | (no help) — memory analysis | S |
--enable-internal-micro-modular-compilation [0x86d80] | "Enables very fast micro-module based compilation" [0x86000] | C |
--enable-internal-modular-compilation [0x86d40] | "Enables detection of modules and fast modular compilation" [0x860c0] (referenced in BP) | C |
--enable-internal-neff-wrapper [0x88310] | (no help) — gates the NeffWrapper job (Part 12) | S |
--enable-internal-new-backend [0x884d0] | "Run new BIR codegen passes" [0x886f0] (referenced in BP) | C |
--enable-internal-relaxed-order [0x880e0] | (no help) — relaxed instruction ordering | S |
--enable-internal-walrus-replay-script [0x86d00] | (no help) — emit a walrus replay script | S |
The --enable-experimental-* family (EARG; surfaced by --help-hidden)
Tagged EARG explicitly at the add_argument call (no "internal-" substring, so not auto-INTERNAL). Help-suppressed from --help; listed by --help-hidden. Least stable — bleeding-edge paths. All bool, default False.
| flag | help / note | Cf |
|---|---|---|
--enable-experimental-O1 [0x88df0] | experimental -O1 path (help shared with optlevel block) | S |
--enable-experimental-bir-backend [0x870a0] | experimental BIR backend | S |
--enable-experimental-bir-partitioner [0x87060] | dest enable_experimental_bir_partitioner [0x85160] | S |
--enable-experimental-fallback-scheduler [0x87020] | experimental fallback scheduler | S |
--enable-experimental-legacy-partitioner [0x86fe0] | dest enable_experimental_legacy_partitioner [0x85120] | S |
--enable-experimental-no-split-dram [0x86fa0] | "Do not perform vnsplitting if it is from DRAM to DRAM" [0x862a0] | S |
--enable-experimental-sb-xfer [0x884f0] | "Use SB to SB transfers for inter-TPB tensor IO" [0x85400] | C |
--enable-experimental-spmd [0x889d0] | "enable spmd mode" [0x898e0]; dest enable_experimental_spmd [0x886d0] | C |
--enable-experimental-tensorized-scheduler [0x87f20] | dest enable_experimental_tensorized_scheduler [0x850a0] | S |
GOTCHA —
--no-enable-tritium-loopfusionimplies a positive default-ON flag. The literal set contains the--no-companion but not a separate--enable-tritium-loopfusionliteral in the A–Z table; the positive--enable-tritium-loopfusiondefaults ON, and only itsNoableArgumentActionnegation--no-enable-tritium-loopfusion[0x881f0]is a distinct rodata literal. A reimplementer must register the positive flag (defaultTrue) plus the auto-generated negation.
Visibility / ArgKind in one paragraph
A flag's help surface is decided by its ArgKind, set once at add_argument time and stored in _ArgumentRegistry as the tuple "argument,kind,job,default,". The interceptor assigns INTERNAL automatically iff the dest starts "internal-"; otherwise PUBLIC, unless the call passes an explicit kind= kwarg (HIDDEN, EARG, Harg). --help shows PUBLIC only; --help-hidden adds HIDDEN + the experimental EARG/Harg args; --help-hidden-list filters to kind == INTERNAL and dumps each with its default (the registry dump). Stability ordering, most→least stable: PUBLIC > HIDDEN (hand-tagged debug) > --enable-internal-* (feature toggles) > --internal-* (raw dev knobs) > --enable-experimental-*/EARG (bleeding edge) > *unsafe* experimental; Harg-tagged args never appear on any help surface. Full mechanics: 3.9 — flag-visibility & ArgKind.
Choice / enum appendix (verbatim)
--auto-cast : none (DEFAULT) | matmult | all (matmult is the behaviour when enabled, not the argparse default)
--auto-cast-type : fp16 | bf16 (DEFAULT) | tf32 | fp8_e4m3 (fp8_e4m3→fp8e4 canonicalized; fp32r only via --fast-math)
--fast-math macros : all | none | (argparse default = [] empty list; no macro is the default)
fp32-cast-all | fp32-cast-all-fp16 | fp32-cast-all-fp32r |
fp32-cast-all-fp8e4 | fp32-cast-matmult |
fp32-cast-matmult-bf16 | fp32-cast-matmult-fp16 |
fp32-cast-matmult-fp32r | fp32-cast-matmult-fp8e4 | fp32-cast-none |
fast-relayout | fast-relayout-fp32 | fast-relayout-fp32r |
fast-relayout-fp8e4 | no-fast-relayout (semantics: 3.14)
--arch / --target : inf1 | inf2 | trn1 | trn1n | trn2 | trn2n | trn3 | sunda
(aliases inferentia/trainium; internal core_v4/core_v5; trn3pre pre-silicon)
--cpu-arch : skylake-avx512 | skylake
--distribution-strategy : fsdp | nemo | llm-training
--model-type : transformer | transformer-inference | cnn-training |
unet-inference | vae-inference | operator-fusion | generic
--allocator : coloring (DEFAULT) | linear_scan
--scheduler : none (DEFAULT) | experimental-loop-shift-left | experimental-loop-lsa
--internal-interleave-kind : dst_reduce | first_mm
--optlevel / -O : "0" (-O0) | "1" (-O1) | "2" (-O2, DEFAULT) | "3" (-O3) — NO 4..9
--logfile-verbose / --verbose : debug | info | warning | user
--pipeline/--state stages : Frontend | WalrusDriver | Backend | BIRSim (+ BirCodeGenLoop)
CORRECTION —
--optlevelaccepts only 0–3, default 2. The choice tokens are exactly the Cython string-table entries"0","1","2","3"(string_tab[1..4]); there are no-O4..-O9constants (verified: no bare4..9choice tokens in.rodata). The help text names only-O1/-O2/-O3.-Ois the short alias (string_tab[111] = ("-O", &__pyx_kp_u_O));-O0/-O1/-O2/-O3are its argparse short spellings.-O3is an unconditional rewrite to-O2— not a "degrade when preconditions are unmet". The only guard is the equality test itself:_Pyx_PyUnicode_Equals(kp_u_3, optlevel)(BP decompile L15261); when it is true, BP unconditionally doesSetAttr optlevel="2"(L15279),SetAttr layer_unroll_factor=0(L15288),layer_unroll_factor_Used=True, and logs the USER advisory (kp_u_The_O3_setting_is_not_optimized). There are no preconditions and no guardingifbeyondoptlevel=="3". Deep level→knob map: 3.10 — opt-level planes §2.4 (authoritative — full decompile L15262–15378).
Verification — the five strongest claims
Each cross-checked against CompileCommand.cpython-310-…so (string table …_strings.json + …_rodata.bin):
- 147 distinct
--literals.jq -r '.[].value' …_strings.json | rg '^--' | sort -u | wc -l⇒ 147. CONFIRMED. This is the literal count and includes the=valuedefaulted forms (--internal-dma-qos-class-count=,--internal-dma-qos-for-spill-code=) and four--no-*companions; the de-duplicated base-name count is ~140. - No
--M;--meta-moduleis the real flag.rg -x -- '--M'over the 147-set ⇒ ABSENT.--meta-modulepresent with byte-verbatim help "Number of layers to be clustered into a module…". CONFIRMED correction. --optlevelis 0–3, default 2, no 4–9. Help string verbatim in.rodatanames only -O1/-O2/-O3; no4–9choice tokens exist. CONFIRMED.- Default-carrying literals are byte-exact.
--partitions-per-bank=64,--softmax-epsilon=-100000000.0,--partitioner-opts='--transformer',--run-simulator-after=BirCodeGenLoop,--inst-count-limit=100000000,--cc-pipeline-tiling-factor=2,--layout-transform-heuristic=mcts,--model-specific-opt=unet— all present verbatim in the literal set. CONFIRMED.--outputdefaultfile.neffis a rodata token;--fast-math'sargparsedefault is the empty list[](PyList_New(0)@0x3a6ec), not a macro token (thefp32-cast-matmultmacro string exists in the choice set but is not the default — see the CORRECTION in the A–F section). --schedulerchoice set + validation.none | experimental-loop-shift-left | experimental-loop-lsaplus the validateArgs raise string "Unsupported scheduler= %s" all present in.rodata. CONFIRMED.
Cross-references
- 3.9 — flag visibility & ArgKind — the
_ArgumentRegistry,ArgKindenum,--help/--help-hidden/--help-hidden-listmechanics, the"internal-"-prefix rule. - 3.10 — optimization levels — deep
-O0..-O3→ per-pass /--walrus-passesknob mapping and the-O3→-O2fallback. - 3.14 — precision flags —
--fast-math/--auto-cast/--auto-cast-typemacro semantics (this page lists only the choice surface). - 3.2 — the two-parser frontend —
InterceptingArgumentParservs the second parser and how the surface is split. - 0.2 — the compile pipeline — how
buildPipelineturns these flags into the Job list /tensorizer_options. - Part 14 flag appendix — the consolidated cross-tool flag index (walrus_driver
cl::optflags are a distinct surface).