gpu

package
v0.0.0-...-ef3af43 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package gpu provides utilities for interacting with GPU resources.

Package gpu provides utilities for interacting with GPU resources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractSimpleGPUName

func ExtractSimpleGPUName(gpuName ResourceGPU) (string, bool)

ExtractSimpleGPUName returns a simplified GPU name. If the resource is not recognized, the second return value is false.

func IsNvidiaKubernetesResource

func IsNvidiaKubernetesResource(resourceName string) bool

IsNvidiaKubernetesResource returns true if the resource name is a Kubernetes resource for an NVIDIA GPU, either a generic GPU or a MIG GPU.

Types

type ResourceGPU

type ResourceGPU string

ResourceGPU represents a GPU resource

const (
	// GpuNvidiaGeneric is the resource name for a generic NVIDIA GPU
	GpuNvidiaGeneric ResourceGPU = "nvidia.com/gpu"
	// GpuAMD is the resource name for an AMD GPU
	GpuAMD ResourceGPU = "amd.com/gpu"
	// GpuIntelXe is the resource name for an Intel Xe GPU
	GpuIntelXe ResourceGPU = "gpu.intel.com/xe"
	// GpuInteli915 is the resource name for an Intel i915 GPU
	GpuInteli915 ResourceGPU = "gpu.intel.com/i915"
	// GpuNvidiaMigPrefix is the prefix for NVIDIA MIG GPU resources
	GpuNvidiaMigPrefix ResourceGPU = "nvidia.com/mig"
)

Resource name prefixes

Jump to

Keyboard shortcuts

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