Chapter 8
tiling — SC/MC & workgroups
github.com/openfluke/welvet/tiling✅
Why it exists
MatVec throughput depends on tile size and when to go multi-core vs GPU workgroups. Centralizing caps keeps Dense and friends consistent.
What it is
DefaultCPUTile, DefaultGPUWG, CPUTile, PreferMultiCore, GPUWorkgroupsX.
Go example
Run:
cd welvet/examples/08-tiling && source ../env.sh && go run .package main
import (
"fmt"
"github.com/openfluke/welvet/tiling"
)
func main() {
tile := tiling.CPUTile(0) // default 32
mc := tiling.PreferMultiCore(8, 256, tile)
wg := tiling.GPUWorkgroupsX(1024, 0)
fmt.Println(tile, mc, wg)
}
Output
32 true 16