gpu

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasCANNRuntime added in v1.0.0

func HasCANNRuntime(ctx context.Context, dockerClient client.SystemAPIClient) (bool, error)

HasCANNRuntime determines whether there is a Ascend CANN runtime available

func HasMTHREADSRuntime added in v1.0.0

func HasMTHREADSRuntime(ctx context.Context, dockerClient client.SystemAPIClient) (bool, error)

HasMTHREADSRuntime determines whether there is a mthreads runtime available

func HasNVIDIARuntime

func HasNVIDIARuntime(ctx context.Context, dockerClient client.SystemAPIClient) (bool, error)

HasNVIDIARuntime determines whether there is an nvidia runtime available

func HasROCmRuntime added in v0.1.46

func HasROCmRuntime(ctx context.Context, dockerClient client.SystemAPIClient) (bool, error)

HasROCmRuntime determines whether there is a ROCm runtime available

Types

type GPUSupport

type GPUSupport uint8

GPUSupport encodes the GPU support available on a Docker engine.

const (
	// GPUSupportNone indicates no detectable GPU support.
	GPUSupportNone GPUSupport = iota
	// GPUSupportCUDA indicates CUDA GPU support.
	GPUSupportCUDA
	// GPUSupportROCm indicates ROCm GPU support.
	GPUSupportROCm
	// GPUSupportMUSA indicates MUSA GPU support.
	GPUSupportMUSA
	// GPUSupportCANN indicates Ascend NPU support.
	GPUSupportCANN
)

func ProbeGPUSupport

func ProbeGPUSupport(ctx context.Context, dockerClient client.SystemAPIClient) (GPUSupport, error)

ProbeGPUSupport determines whether or not the Docker engine has GPU support.

Jump to

Keyboard shortcuts

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