Welvet examples
47. stub/memory
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)
}