Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CompileCommand Flag Catalog — the 147-Flag Surface

All flag literals, help strings, defaults, and offsets on this page apply to neuronx_cc 2.24.5133.0+58f8de22 (cp310 Cython module neuronxcc/driver/commands/CompileCommand.cpython-310-x86_64-linux-gnu.so). Other wheels differ; treat every address as version-pinned. Offsets in [...] are .rodata byte 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 siteCompileCommand.__init__ @ 0x36290 (one function, 717 --/add_argument refs)
Pipeline effectsCompileCommand.buildPipeline @ 0x619d0; validateArgs @ 0x2d690
Visibility model_ArgumentRegistry keyed by ArgKind {PUBLIC, INTERNAL, HIDDEN, EARG, Harg} (driver/Arguments.so)
Distinct -- literals147 (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 --M flag. A raw strings | rg '^--' sweep once suggested a --M flag; no byte-exact --M literal exists in CompileCommand.so (verified: rg -x -- '--M' over the 147-literal set ⇒ ABSENT). The "layers per module" knob is --meta-module (metavar M, 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 --M was 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 in validateArgs/buildPipeline from --arch/--target; they are not single rodata constants and are never guessed here. Plain bool store_true flags default False. ED/NO flags expose a --no-/--disable companion.


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).

flagargtypedefaultVishelpCf
--logfile <logfile>strlog-neuron-cc.txtPUB"Name of the logfile. (Default: %(default)s)" — file sink for neuronxlogger via setup_logfile_logging()C
--logfile-verboseenum(debug,info,warning,user)infoPUB"Specify the verbosity level of the logfile. (Default: %(default)s)"C
--verboseenum(debug,info,warning,user)userPUB"Specify the verbosity level of console output. (Default: %(default)s)" → stdout handler levelC
--version, -Vflagn/aPUB"Print version information and exit"VersionActiongetVersionString(); prints NeuronX Compiler version <...>, exitsC
--fork-subcommandint(internal)HID(no help / SUPPRESS) — re-exec helper for the --fork worker modelS

CompileCommand flags A–F

flagargtypedefaultVishelpCf
--allocator <value>enum(coloring, linear_scan)coloringHID(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)nonePUB"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)bf16PUB"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-mismatchboolFalseHID(no help) — golden-compare debug toggle; feeds XLAInferGoldens numerical-compare pathS
--cc-pipeline-tiling-factor=2int(=N)2HID(no help; literal carries default =2 [0x88550]) — collective-compute pipeline tiling factorS
--cnn-training-modelboolFalseHID(no help) [0x89510] — marks graph as CNN-training; cousin of --model-type cnn-trainingS
--cpu-arch <value>enum(skylake-avx512, skylake)(host/native)HID"Target CPU architecture" [0x88c70] — CPU/simulator target for BIRSim/qemu host executionC
--disable-concat-delinearizerboolFalseHID(no help) [0x88530] — turns OFF the concat-delinearizer penguin passS
--disable-degraded-fusionboolFalseHID(no help) [0x88bd0] — disables the "degraded fusion" heuristicS
--disable-prefer-par-on-non-broadcastboolFalseHID(no help) [0x87120] — disables the "prefer parallel on non-broadcast" layout/tiling heuristic (dest in BP use-list)S
--disable-stream-shuffleboolFalseHID(no help) [0x88e10] — disables stream-shuffle DMA optimizationS
--disable-stream-transpose-smallboolFalseHID(no help) [0x87fa0] — disables stream-transpose for small tensorsS
--disable-tiling-of-non-overlapping-mem-accessboolFalseHID(no help) [0x870e0] — disables tiling for non-overlapping memory accessesS
--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-trainingboolFalseINT(no help) [0x87f60] — shorthand that sets distribution_strategy=="llm-training" (BP compares the literal)C
--enable-arch-legalizeboolFalsePUB(/HID)(no help) [0x89170] — public face of --enable-internal-arch-legalizeS
--enable-bir-vnsplitterboolFalseHID(no help) [0x89010]; dest enable_bir_vnsplitter [0x88b90] — enables BIR virtual-node splitterS
--enable-ccop-compute-overlapboolFalseHID(no help) [0x88510] — overlaps collective-compute (CCOP) with computeS
--enable-dgeEDON 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-levelsC
--enable-explicit-bwd-convs-paddingboolFalsePUB(/HID)(no help) [0x86f60] — emits explicit padding for backward convolutionsS
--enable-fast-context-switchboolFalsePUB"Optimize for faster model switching rather than execution latency." [0x85660]C
--enable-fast-loading-neuron-binariesboolFalsePUB"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-kernelboolFalsePUB(/HID)(no help) [0x89150] — enables native-kernel lowering pathS
--enable-native-kernel-select-and-scatterboolFalseHID(no help) [0x86cc0] — routes select_and_scatter through the native-kernel implS
--enable-parallel-queuesboolFalsePUB"Enable parallel DMA queues to improve memory bandwidth utilization" [0x86140]C
--enable-p-to-pp-broadcastboolFalseHID(no help) [0x88970] — partition→partition-pipeline broadcast optimization (dest in BP use-list)S
--expand-batch-norm-trainingboolFalseHID(no help) [0x88650] — expands BatchNorm-training ops into primitives in the FrontendS
--expand-batch-norm-training-and-gradboolFalseHID(no help) [0x87e80] — as above plus the gradient computationS
--experimental-convolution-kernel-matchbool/strFalseHID(EARG)(no help) [0x86c80] — experimental conv kernel-matchingS
--experimental-unsafe-fp8e4m3fn-as-fp8e4m3boolFalseHID(EARG)"Convert fp8e4m3fn types to fp8e4m3" [0x864a0] — unsafe; internal twin --internal-experimental-unsafe-fp8e4m3fn-as-fp8e4m3C
--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
--forkbool/intFalse/0HID(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 ingestC

CORRECTION — the precision-flag argparse defaults are --auto-cast=none and --fast-math=[], not matmult/fp32-cast-matmult. Earlier rows on this page gave --auto-cast default matmult and --fast-math default fp32-cast-matmult. Those describe the behaviour selected when auto-cast is enabled, not the registered argparse default= literals. Byte-anchored in CompileCommand.__init__ (0x36290): the --auto-cast kwargs build PyDict_SetItem(default, __pyx_n_u_none) (mov rdx, __pyx_n_u_none @ 0x39a7bmov rsi, __pyx_n_s_default @ 0x39a82), and --fast-math builds default= from PyList_New(0) (xor edi, edi; call _PyList_New @ 0x3a6ecn_s_default @ 0x3a702) — i.e. an empty list. So the genuine defaults are no casting until the user asks for it. --fast-math is additionally kind=ArgKind.INTERNAL (.INTERNAL fetched @ 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-type has FOUR choices, including fp8_e4m3. An earlier version of this row listed only enum(fp16, bf16, tf32) and claimed fp8e4 was "reachable only via --fast-math macros". That is wrong: fp8_e4m3 is a genuine direct choice of --auto-cast-type. Byte-anchored in CompileCommand.so .rodata: the choice literal fp8_e4m3 is interned __pyx_n_u_fp8_e4m3 at [0x8a560], and its per-choice doc line "fp8_e4m3: floating point with 4 bits exponent and 3 bits mantissa" sits at [0x8536e], contiguous with the fp16:/bf16:/tf32: doc lines at [0x85320]/[0x85346]/[0x85357] — the four-choice description block. buildPipeline then canonicalizes the user spelling fp8_e4m3 → fp8e4 (3.14 §4.1). Only fp32r (the tf32-canonical) and the relayout-dtype variants are macro-only; fp8_e4m3 is not. (CONFIRMED — .rodata string + interned-name symbol + adjacent doc-line block.)

CompileCommand flags H–M

flagargtypedefaultVishelpCf
--helpflagn/aPUB"Show this help message and exit" [0x87300]HelpAction; prints PUBLIC flags, exitsC
--help-hiddenflagn/aHID"Print help for internal options" [0x87320]HelpHiddenAction; prints PUBLIC + HIDDEN (+EARG)C
--help-hidden-listflagn/aHID"List internal options and default values" [0x85cc0]HelpHiddenListAction; dumps full registry (INTERNAL flags + defaults)C
--imageslist[str]/positional(none)PUB(no help) [0x8a800] — input image/graph file(s) to compile (fileGlobs ingest)S
--inst-count-limit=100000000int(=N)100000000HID(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-infergoldensboolFalseHID(no help) [0x89880] — JIT-infer golden reference outputs (InferGoldens/XLAInferGoldens); cf. --auto-compare-mismatchS
--jobs <N>int(cpu_count-derived)PUB"Limit number of simultaneous of processes and threads" [0x87340] — distinct from --num-parallel-jobsC
--layer-unroll-factor <N>int(none / model-driven)HID(no help) [0x892b0]; layer_unroll_factor_Used [0x88890] tracks user-set — loop/layer unroll factorS
--layout-transform-heuristic=mctsenum(=value)mctsHID(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>int0 (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=unetenum(=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 BPC

CompileCommand flags N–Z

flagargtypedefaultVishelpCf
--native-kernel-auto-cast=<value>str/enum(=value)(empty)HID(no help; literal carries trailing = [0x88ad0]) — per-native-kernel auto-cast overrideS
--native-to-custom-softmaxboolFalseHID(no help) [0x88870] — rewrites native softmax ops to the custom-softmax kernelS
--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-loopfusionbool (NO negation)(positive default ON)HID(no help) [0x881f0]--no- companion that DISABLES Tritium loop-fusion penguin passS
--no-internal-hlo-rematNO (negation)(positive off)INT"Do graph-level rematerialization in the Frontend" [0x862e0] (shared) — negation of --internal-hlo-remat; sorts into NC
--no-keep-remat-dma-transposebool (NO negation)(positive default)HID(no help) [0x88430] — disables keeping the rematerialized DMA-transposeS
--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-tilingbool (ED/NO negation)(positive default)HID(no help) [0x88410] — disables the PG (parallel-group) layout-and-tiling passS
--num-neuroncores <N>int (DEP)(per-target)DEP"DEPRECATED. Prefer --lnc instead." [0x88140] — legacy spelling, still parsed (DeprecatedArgumentAction), maps to LNCC
--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 --jobsC
--option-preset <value>str/enum(none)HID(no help) [0x89c50] — named bundle of pre-set options expanded into underlying flagsS
--optlevel <0|1|2|3> (-O)enum("0","1","2","3")2PUB"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.neffPUB"Filename where compilation output (NEFF archive) will be recorded. (Default: %(default)s)" [0x85e80]C
--partitioner-opts=<opts>str(=value)--transformerHID(no help; literal carries =--transformer [0x881c0]) — free-form options forwarded to the partitionerS
--partitions-per-bank=<N>int(=N)64HID(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 --stateS
--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 penguinS
--query-compute-placementboolFalseHID"Determine which compute engine to execute certain op/subgraph, by returning different return code" [0x86360] — QUERY MODE; public face of --internal-compute-engine-placementC
--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-metricsS
--run-pg-layout-and-tilingED(off)HID(no help) [0x88810] — runs the PG layout-and-tiling pass; negation --no-run-pg-layout-and-tilingS
--run-simulator-after=<stage>str/enum(=value)BirCodeGenLoopHID(no help; literal carries =BirCodeGenLoop [0x86820]) — runs BIRSim immediately after the named stageS
--scheduler <value>enum(none, experimental-loop-shift-left, experimental-loop-lsa)noneHID(no help; VA raises "Unsupported scheduler= %s" [0x88c10]) — selects experimental loop scheduler in penguin schedulingC
--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-delayboolFalseHID(no help) [0x88cd0] — delays the softmax division (numerator/denominator split)S
--softmax-epsilon=<float>float(=value)-100000000.0HID(no help; literal carries =-100000000.0 [0x883f0]) — large-negative masking value (-1e8) for numerically-stable softmaxS
--spmdboolFalseHID(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 --pipelineC
--static-weightsboolFalsePUB(/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-binariesC
--submit-metricsboolFalseHID(no help) — submits compile metrics to global_metric_store.json [0x88950]; pairs with --run-id/--metrics-timestampS
--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 archC
--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-compileboolFalseHID(no help) [0x883d0] — multi-process tensorizer compilation; complements --num-parallel-jobs/--forkS
--tfpb <file>str (path)(none)HID(no help) [0x8a9a0] — alternate input-graph format (tensorizer/TF protobuf) instead of HLO; pairs with --nn-executorS
--upcast-all-to-fp32boolFalsePUB(/HID)"Upcast all ops to FP32" [0x88e50] — public face of internal --internal-upcast-all-to-FP32C
--vectorize-strided-dmaboolFalseHID(no help) [0x88eb0] — vectorizes strided DMA descriptors (DMA-codegen optimization)S

NOTE — no W/X/Y/Z CompileCommand flags. No --flag literal whose base-name begins W, X, Y, or Z exists in CompileCommand.so (cross-checked over the full literal set). --verbose/--version begin V but are registered in CommandDriver, 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.

flagargtypedefaulthelpCf
--internal-autotuneboolFalse"Internal flag used by autotune" [0x87fd0]C
--internal-autotune-config <path>str(none)"Specify autotune config file path" [0x85520]C
--internal-autotune-subprocessboolFalse(no help) [0x882d0] — marks this process an autotune childS
--internal-backend-options <str>str(none)(no help) [0x888f0] — free-form string forwarded to BIR/walrus backendS
--internal-build-with-usersboolFalse(no help) [0x887d0] — retain def-use ("with users") infoS
--internal-compiler-debug-modebool/strFalse(no flag help; banner "WARNING: Debug mode enabled via --internal-compiler-debug-mode" [0x853c0])C
--internal-compiler-debug-mode-numericalboolFalse"compile saves and logs information useful for debugging,and also for numerical correctness debugging" [0x84b00]C
--internal-compute-engine-placementbool/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-validationboolFalse(no help) [0x86b80] — disables BIRSim validation passS
--internal-disable-birverifier-validationboolFalse(no help) [0x86b40] — disables the BIRVerifier validation jobS
--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-iosboolFalse"Disable generating FMA operations on input or output tensors" [0x86320]C
--internal-disable-layer-detboolFalse"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-configurationboolFalse(no help) [0x86a80] — emits a BIR debugger launch configS
--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-labelingboolFalse"Enable penguin to assign QoS classes to DMA instructions" [0x86100]C
--internal-experimental-unsafe-fp8e4m3fn-as-fp8e4m3boolFalse"Convert fp8e4m3fn types to fp8e4m3" [0x864a0] (internal alias of the public EARG twin)C
--internal-force-all-uniqboolFalse"Force partitioner to treat all modules as uniq." [0x85e00] — disables module-dedupC
--internal-hlo-analyze-scheduleboolFalse(no help) [0x88080] — runs HLO schedule analysisS
--internal-hlo-remat (+ --no-internal-hlo-remat)NO(off)"Do graph-level rematerialization in the Frontend" [0x862e0]C
--internal-inject-errorbool/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 schedulingS
--internal-log-additional-qor-metricsboolFalse(no help) [0x86960] — logs extra QoR metricsS
--internal-num-neuroncores-per-sengine <N>int(per-target)(no help) [0x86920] — NeuronCores per sequencer-engineS
--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)boolFalse(no help) — relaxed instruction ordering (see enable-internal family)S
--internal-suppress-errorbool/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-FP32boolFalse"Upcast all ops to FP32" [0x88e50] — internal twin of --upcast-all-to-fp32C

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.

flaghelpCf
--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 passS
--enable-internal-bir-e2e-compilation [0x86e80](no help) — end-to-end BIR compilationS
--enable-internal-bir-linker [0x88690](no help) — BIR linker flowS
--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 analysisS
--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 orderingS
--enable-internal-walrus-replay-script [0x86d00](no help) — emit a walrus replay scriptS

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.

flaghelp / noteCf
--enable-experimental-O1 [0x88df0]experimental -O1 path (help shared with optlevel block)S
--enable-experimental-bir-backend [0x870a0]experimental BIR backendS
--enable-experimental-bir-partitioner [0x87060]dest enable_experimental_bir_partitioner [0x85160]S
--enable-experimental-fallback-scheduler [0x87020]experimental fallback schedulerS
--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-loopfusion implies a positive default-ON flag. The literal set contains the --no- companion but not a separate --enable-tritium-loopfusion literal in the A–Z table; the positive --enable-tritium-loopfusion defaults ON, and only its NoableArgumentAction negation --no-enable-tritium-loopfusion [0x881f0] is a distinct rodata literal. A reimplementer must register the positive flag (default True) 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 — --optlevel accepts 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..-O9 constants (verified: no bare 4..9 choice tokens in .rodata). The help text names only -O1/-O2/-O3. -O is the short alias (string_tab[111] = ("-O", &__pyx_kp_u_O)); -O0/-O1/-O2/-O3 are its argparse short spellings. -O3 is 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 does SetAttr 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 guarding if beyond optlevel=="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):

  1. 147 distinct -- literals. jq -r '.[].value' …_strings.json | rg '^--' | sort -u | wc -l147. CONFIRMED. This is the literal count and includes the =value defaulted forms (--internal-dma-qos-class-count=, --internal-dma-qos-for-spill-code=) and four --no-* companions; the de-duplicated base-name count is ~140.
  2. No --M; --meta-module is the real flag. rg -x -- '--M' over the 147-set ⇒ ABSENT. --meta-module present with byte-verbatim help "Number of layers to be clustered into a module…". CONFIRMED correction.
  3. --optlevel is 0–3, default 2, no 4–9. Help string verbatim in .rodata names only -O1/-O2/-O3; no 49 choice tokens exist. CONFIRMED.
  4. 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. --output default file.neff is a rodata token; --fast-math's argparse default is the empty list [] (PyList_New(0) @ 0x3a6ec), not a macro token (the fp32-cast-matmult macro string exists in the choice set but is not the default — see the CORRECTION in the A–F section).
  5. --scheduler choice set + validation. none | experimental-loop-shift-left | experimental-loop-lsa plus the validateArgs raise string "Unsupported scheduler= %s" all present in .rodata. CONFIRMED.

Cross-references

  • 3.9 — flag visibility & ArgKind — the _ArgumentRegistry, ArgKind enum, --help/--help-hidden/--help-hidden-list mechanics, the "internal-"-prefix rule.
  • 3.10 — optimization levels — deep -O0..-O3 → per-pass / --walrus-passes knob mapping and the -O3→-O2 fallback.
  • 3.14 — precision flags--fast-math / --auto-cast / --auto-cast-type macro semantics (this page lists only the choice surface).
  • 3.2 — the two-parser frontendInterceptingArgumentParser vs the second parser and how the surface is split.
  • 0.2 — the compile pipeline — how buildPipeline turns these flags into the Job list / tensorizer_options.
  • Part 14 flag appendix — the consolidated cross-tool flag index (walrus_driver cl::opt flags are a distinct surface).