Documentation
¶
Overview ¶
Package gpuallocator handles GPU allocation
Index ¶
- type CompactFirst
- type GpuAllocator
- func (s *GpuAllocator) Alloc(ctx context.Context, poolName string, request tfv1.Resource, count uint) ([]*tfv1.GPU, error)
- func (s *GpuAllocator) Dealloc(ctx context.Context, request tfv1.Resource, gpus []types.NamespacedName) error
- func (s *GpuAllocator) SetupWithManager(ctx context.Context, mgr manager.Manager) (<-chan struct{}, error)
- func (s *GpuAllocator) Stop()
- type LowLoadFirst
- type Strategy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompactFirst ¶
type CompactFirst struct{}
CompactFirst selects GPU with minimum available resources (most utilized) to efficiently pack workloads and maximize GPU utilization
func (CompactFirst) SelectGPUs ¶
SelectGPUs selects multiple GPUs from the same node with the least available resources (most packed)
type GpuAllocator ¶
func NewGpuAllocator ¶
func (*GpuAllocator) Alloc ¶
func (s *GpuAllocator) Alloc( ctx context.Context, poolName string, request tfv1.Resource, count uint, ) ([]*tfv1.GPU, error)
Alloc allocates a request to a gpu or multiple gpus from the same node.
func (*GpuAllocator) Dealloc ¶
func (s *GpuAllocator) Dealloc(ctx context.Context, request tfv1.Resource, gpus []types.NamespacedName) error
Dealloc deallocates a request from one or multiple gpus.
func (*GpuAllocator) SetupWithManager ¶
func (s *GpuAllocator) SetupWithManager(ctx context.Context, mgr manager.Manager) (<-chan struct{}, error)
SetupWithManager sets up the GpuAllocator with the Manager.
type LowLoadFirst ¶
type LowLoadFirst struct{}
LowLoadFirst selects GPU with maximum available resources (least utilized) to distribute workloads more evenly across GPUs
func (LowLoadFirst) SelectGPUs ¶
SelectGPUs selects multiple GPUs from the same node with the most available resources (least loaded)