virtualgpu

package
v0.5.50 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewVirtualGPUPlugin

func NewVirtualGPUPlugin(base *baseplugin.BasePlugin) resourceplugin.ResourcePlugin

NewVirtualGPUPlugin creates and returns a new GPU compute resource plugin

Types

type VirtualGPUPlugin

type VirtualGPUPlugin struct {
	sync.Mutex
	*baseplugin.BasePlugin
}

func (*VirtualGPUPlugin) Allocate

Allocate allocates GPU compute resources to a container based on the given request

func (*VirtualGPUPlugin) GetExtraResources

func (p *VirtualGPUPlugin) GetExtraResources() []string

TODO: make sure extra resource dont include main resource

func (*VirtualGPUPlugin) GetTopologyAwareAllocatableResources

func (p *VirtualGPUPlugin) GetTopologyAwareAllocatableResources(ctx context.Context) (map[string]*pluginapi.AllocatableTopologyAwareResource, error)

GetTopologyAwareAllocatableResources returns topology-aware allocatable resources

func (*VirtualGPUPlugin) GetTopologyAwareResources

func (p *VirtualGPUPlugin) GetTopologyAwareResources(ctx context.Context, podUID, containerName string) (map[string]*pluginapi.GetTopologyAwareResourcesResponse, error)

GetTopologyAwareResources returns topology-aware resources for a given pod/container

func (*VirtualGPUPlugin) GetTopologyHints

func (p *VirtualGPUPlugin) GetTopologyHints(ctx context.Context, req *pluginapi.ResourceRequest) (resp *pluginapi.ResourceHintsResponse, err error)

GetTopologyHints returns topology hints for a given resource request

func (*VirtualGPUPlugin) ResourceName

func (p *VirtualGPUPlugin) ResourceName() string

ResourceName returns the name of the main resource this plugin manages TODO: use config for main resource

Jump to

Keyboard shortcuts

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