Chapter 2

Repository map

✅ layout


Why it exists

Readers need a single map of what is engine vs harness vs app vs stub.

What it is

Top-level folders and their ownership. Engine packages never import w2a.

welvet/
  core weights quant simd webgpu tiling architecture fusedgpu
  layers/*          ← one folder per op
  runtime/{forward,backward,training,step}
  systems/{dna,evolution,tween,tanhi,telemetry}
  model/{entity,hf,tokenizer,sampling,transformer}
  apps/{octo,flux2,mosstts}
  stub/*            ← designed surfaces, partial or empty
  w2a/              ← harness (separate module)
  tools/            ← eval / test tooling

Go example

examples/02-tree/main.go

Run:cd welvet/examples/02-tree && source ../env.sh && go run .
package main

import (
	"fmt"
	"os"
)

func main() {
	// Mental model only — list engine roots you depend on:
	roots := []string{
		"core", "weights", "quant", "simd", "webgpu", "tiling",
		"architecture", "fusedgpu", "layers", "runtime", "systems", "model",
	}
	for _, r := range roots {
		fmt.Println("import github.com/openfluke/welvet/" + r + "/…")
	}
	_ = os.Getenv // apps/stub/w2a are separate concerns
}

Output

exit 0 · last run via go run .

import github.com/openfluke/welvet/core/…
import github.com/openfluke/welvet/weights/…
import github.com/openfluke/welvet/quant/…
import github.com/openfluke/welvet/simd/…
import github.com/openfluke/welvet/webgpu/…
import github.com/openfluke/welvet/tiling/…
import github.com/openfluke/welvet/architecture/…
import github.com/openfluke/welvet/fusedgpu/…
import github.com/openfluke/welvet/layers/…
import github.com/openfluke/welvet/runtime/…
import github.com/openfluke/welvet/systems/…
import github.com/openfluke/welvet/model/…