gobackend

package
v0.1.33 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2026 License: Apache-2.0 Imports: 4 Imported by: 6 modules, 6 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
const BackendName = "go"

BackendName to be used in GOMLX_BACKEND to specify this backend.

Variables

View Source
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

func New

func New(config string) (compute.Backend, error)

New constructs a new Go Backend using the comma-separated configuration options in config. See package documentation or https://gomlx.github.io/docs/backends/#2-the-go-backend-go for supported options.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL