Documentation
¶
Overview ¶
Package gobackend implements a native Go compute.Backend: 100% portable (including WASM) with optional SIMD/assembly acceleration (AVX2, AVX-512, ARM64 NEON/SME), fused operations, and constant weight caching.
Configuration options can be passed via GOMLX_BACKEND="go:<option1>,<option2>=<value>" or compute.NewWithConfig("go:..."). Supported options:
- parallelism=<N>: maximum intra-op worker goroutines (default: runtime.GOMAXPROCS(0)).
- num_executors=<N>: maximum concurrent node executors in parallel mode (default: 8).
- ops_sequential / ops_parallel: force sequential or parallel inter-op execution (default: dynamic).
- dependency_order / creation_order: topological scheduling strategy (default: dependency_order).
- quantized_cache=<always|balanced|never>: constant weight/scale/zero-point/bias caching policy for FusedQuantizedDense (default: balanced; aliases: true/1 or bare quantized_cache for always; false/none/0 for never). See docs/GoBackendMemoryUsage.md for details.
- no_ops: skip kernel math for scheduling/framework overhead benchmarking.
Passing an unknown option such as GOMLX_BACKEND="go:help" returns an error listing all valid options.
This package is a thin wrapper around internal/gobackend.
Index ¶
Constants ¶
const BackendName = "go"
BackendName to be used in GOMLX_BACKEND to specify this backend.
Variables ¶
var GetBackend = sync.OnceValue(func() compute.Backend { backend, err := New("") if err != nil { panic(err) } return backend })
GetBackend returns a singleton Go backend, created with the default configuration. The backend is only created at the first call of the function.
The singleton is never destroyed.
Functions ¶
Types ¶
This section is empty.