Documentation
¶
Index ¶
- func NewVirtualGPUPlugin(base *baseplugin.BasePlugin) resourceplugin.ResourcePlugin
- type VirtualGPUPlugin
- func (p *VirtualGPUPlugin) Allocate(ctx context.Context, resourceReq *pluginapi.ResourceRequest, ...) (*pluginapi.ResourceAllocationResponse, error)
- func (p *VirtualGPUPlugin) GetExtraResources() []string
- func (p *VirtualGPUPlugin) GetTopologyAwareAllocatableResources(ctx context.Context) (map[string]*pluginapi.AllocatableTopologyAwareResource, error)
- func (p *VirtualGPUPlugin) GetTopologyAwareResources(ctx context.Context, podUID, containerName string) (map[string]*pluginapi.GetTopologyAwareResourcesResponse, error)
- func (p *VirtualGPUPlugin) GetTopologyHints(ctx context.Context, req *pluginapi.ResourceRequest) (resp *pluginapi.ResourceHintsResponse, err error)
- func (p *VirtualGPUPlugin) ResourceName() string
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 ¶
func (p *VirtualGPUPlugin) Allocate( ctx context.Context, resourceReq *pluginapi.ResourceRequest, deviceReq *pluginapi.DeviceRequest, ) (*pluginapi.ResourceAllocationResponse, error)
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
Click to show internal directories.
Click to hide internal directories.