executionprovider

package
v0.1.39 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2026 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 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 executionprovider defines the native GPU execution providers supported by the ONNX Runtime backend.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Type

type Type int

Type identifies the ONNX Runtime execution provider used by a backend.

const (
	// CPU runs on CPU only (the zero value).
	CPU Type = iota
	// CUDA runs on an NVIDIA GPU via the CUDA execution provider.
	CUDA
	// MIGraphX runs on an AMD GPU via the MIGraphX execution provider. It replaces the older ROCm EP.
	MIGraphX
	// WASM runs WebAssembly CPU execution provider in browser environments.
	WASM
	// WebGPU runs on WebGPU execution provider in browser environments.
	WebGPU
	// WebNN runs on WebNN execution provider in browser environments.
	WebNN
	// WebGL runs on WebGL execution provider in browser environments.
	WebGL
)

func Parse

func Parse(s string) (Type, error)

Parse maps a configuration token to an executionprovider.Type. It accepts the same aliases as the backend config string: "cpu"/"" for CPU, "cuda"/"gpu" for CUDA, "migraphx"/"rocm"/"amd" for MIGraphX, "wasm" for WASM, "webgpu" for WebGPU, "webnn" for WebNN, and "webgl" for WebGL.

func (Type) IsWeb

func (t Type) IsWeb() bool

IsWeb returns true if the execution provider is a web/browser execution provider (WASM, WebGPU, WebNN, WebGL).

func (Type) String

func (t Type) String() string

String returns the canonical name of the execution provider ("cpu", "cuda", "migraphx", "wasm", "webgpu", "webnn", or "webgl").

Jump to

Keyboard shortcuts

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