← all workloads

emit_cuda

A single moderately complex shader. Compiled to multiple targets by the harness (same source, varying -target) to isolate generateOutput cost. ``n`` scales the amount of straight-line math the backend must emit. Scaling null: n scales op count and the emitted output is O(n); ideal codegen cost is O(n).

bucket: codegen_source  ·  mode: target  ·  flags: -target cuda

Phase composition vs N (stacked sub-counters)

compileInner split into phase buckets (named leaves + (self) residuals) stacked across the sweep sizes — the top edge is compileInner, so you can see which phase drives the scaling.

emit_cuda — phase composition vs N (v2026.13.1, median ms) emit_cuda 20.3× over N 100→800 0.0 498 996 100 200 400 800 N emit_cuda — parseTranslationUnit emit_cuda — SemanticChecking emit_cuda — generateIR emit_cuda — frontEndExecute (self) emit_cuda — specializeModule emit_cuda — simplifyIR emit_cuda — linkIR emit_cuda — unrollLoopsInModule emit_cuda — performMandatoryEarlyInlining emit_cuda — performForceInlining emit_cuda — linkAndOptimizeIR (self) emit_cuda — emitEntryPointsSourceFromIR emit_cuda — compileInner (self) phase buckets parseTranslationUnit SemanticChecking generateIR frontEndExecute (self) specializeModule simplifyIR linkIR unrollLoopsInModule legalizeResourceTypes legalizeExistentialTypeLayout performMandatoryEarlyInlining performForceInlining linkAndOptimizeIR (self) emitEntryPointsSourceFromIR generateOutput (self) compileInner (self)

Scaling analysis

floor-subtracted power-law fit (t − floor) = a·Nk; floor = the minimal workload (fixed per-compile cost), k the global exponent, top-2× the local high-end doubling ratio.

N rangefloor (ms)k (work)fit R²t(Nmin)t(Nmax)top-2×
100–800111.570.992459223.56×

Growth attribution (N=100 → N=800)

compileInner grows by 877 ms across the sweep; the mutually-exclusive phase buckets below partition that growth exactly (no nested-timer double counting). × lin is the same metric as the top-level panels, per bucket: the end point vs a linear expectation anchored to the bucket's share of the minimal floor and fitted on the low-N half — 1.0 = grew exactly linearly, >1 bends up. The super-linearity lives where × lin (and k) are red.

buckett@N=100t@N=800Δ msshare× lin∝Nk
emitEntryPointsSourceFromIR13447+43349%3.46×1.70
linkAndOptimizeIR (self)3337+33538%7.22×2.40
SemanticChecking1561+465%0.85×0.86
simplifyIR328+253%1.05×1.02
specializeModule426+223%0.91×0.92

Near-constant (≤2% of growth each): generateIR (5→16 ms), linkIR (1→2 ms), parseTranslationUnit (0→2 ms), compileInner (self) (0→2 ms), performMandatoryEarlyInlining (0→1 ms), performForceInlining (0→1 ms), frontEndExecute (self) (0→0 ms), unrollLoopsInModule (0→0 ms).

Sweep numbers (median ms)

NcompileInneremitEntryPointsSourceFromIRgenerateOutput
100452425
200926363
400259212213
800922841842