Skip to content
Nebula

Architecture

Optimize the program. Preserve its meaning.

One authored computation. Alternative implementations. A choice made for your constraints.

Conceptual overview. Not a compiler execution, and not a proof of equivalence.

Search, admit, price, elect, lower.

Three planes of the candidate space, one region of rewrites each. Scroll, and watch a plan get elected.

Candidate space

Hardware
H100 SXM5
Authored
168 µs
Elected
—123 µs
A 58 µs41 µs52 µs46 µs B 27 µs18 µs22 µs C 83 µs64 µs71 µs PROGRAM A 58 µs41 µs52 µs46 µs B 27 µs18 µs22 µs C 83 µs64 µs71 µs PROGRAM

05 Lower. The plan lowers to one program you can read, kernel by kernel.

  • Not admitted
  • Admitted alternative
  • Elected route
  • Across planes
  • Demo values · No measured runs.

From a model to an inspectable program.

Five stages. Each one hands the next something you can open.

ContextHardware · workload · numerics

  1. 01ModelAn authored program: ops, shapes, dtypes.
  2. 02SearchKernels that could run each op, kept side by side.
  3. 03SelectionOne route elected, under your conditions.
  4. 04LoweringMade concrete: launch, memory, rounding.
  5. 05ProgramEvery row decided, every choice recorded.
  • Retained alternatives
  • Selected route
  • Handed to the next stage

Stage contracts

  1. 01

    Start with an authored program.

    The model supplies the computation to preserve. The search is over implementations of that program, not over what the program should compute.

    Input
    Model graph · input shapes · numerical requirements
    Operation
    Make the operations, data dependencies, and admissible inputs explicit.
    Output
    An authored program with a declared semantic contract
    Invariant
    The computation is the reference, not an output of the search.
    program := (model, shapes, numerical_contract)
  2. 03

    Choose under explicit conditions.

    A candidate is selected for one hardware target, workload, and numerical contract. The highlighted route describes a choice; it is not a claim of global optimality.

    Input
    Candidate space + selection constraints
    Operation
    Compare admissible candidates under a stated cost model and select an implementation.
    Output
    A chosen plan with its constraints and selection metadata
    Invariant
    The selected plan is read in the context that produced it.
    plan := select(candidates, constraints, cost_model)
  3. 04

    Make the implementation concrete.

    The chosen plan is translated into target-level operations, keeping its correspondence to the selected representation inspectable rather than presenting a code snippet as proof.

    Input
    Selected plan + target description
    Operation
    Resolve layouts, scheduling, and target operations while retaining the correspondence.
    Output
    A target program and a mapping back to the selected plan
    Invariant
    Lowering needs its own correctness argument or validation evidence.
    artifact := lower(plan, target)
  4. 05

    Every chosen kernel, with its selection context.

    The program carries its selection context, revisions, and available evidence. A receipt indexes that evidence; it is never a substitute for it.

    Input
    Lowered program + context + evidence
    Operation
    Package the artifact, reproducible conditions, samples, and checker reports.
    Output
    Program bundle · manifest · result record · receipt
    Invariant
    Missing artifacts and unrun checks stay explicit.
    bundle := package(artifact, context, evidence)

Three distinct responsibilities

Meaning
A cheaper implementation still has to preserve the declared computation.
Context
Hardware, workload, and numerics guide the choice, never its correctness.
Evidence
Conditions, artifacts, and available checks support a result. Missing evidence stays explicit.

Explore the results