Welvet examples

47. stub/memory

Open original example β†—Recorded results Β· not a live execution

Part: VIII Β· Stubs
Package: github.com/openfluke/welvet/stub/memory
Status: partial β€” 🚧

When

Scaffold / experimental stub stub/memory (may be partial).

Where

import "github.com/openfluke/welvet/stub/memory"

cd 47-stub-memory && source ../env.sh && go run .

Why

HF→ENTITY and GPU upload need footprint accounting and optional history charts.

What

FromGrid, Footprint, InitScavenger, ReleaseTransient; WELVET_MEMORY_HISTORY=1.

Sample output (captured)

{HostWeightsMB:0 GPUWeightsMB:0 GPUKVMB:0}

Live capture from go run ./cmd/runall on local ../../welvet (exit 0).

Source

Copied from the Welvet feature book examples (openfluke.github.io/welvet/examples/47-stub-memory).

main.go

Download source ↓
package main

import (
	"fmt"

	"github.com/openfluke/welvet/architecture"
	"github.com/openfluke/welvet/stub/memory"
)

func main() {
	g := architecture.NewGrid(1, 1, 1, 1)
	fp := memory.FromGrid(g)
	fmt.Printf("%+v\n", fp)
}