gobackend

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 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: very portable (including WASM) but not very fast.

It only implements the most popular dtypes and operations. But generally, it's easy to add new ops: just open an issue in GoMLX.

This package is simply 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. There are no configurations, the string is simply ignored.

Types

This section is empty.

Jump to

Keyboard shortcuts

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