Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllocRequest ¶
type AllocRequest struct { MaxCPU uint MaxMem uint64 MaxGPU uint // GPUs are allocated using slots which approximate their throughput MaxGPUMem uint64 MaxGPUCount int MaxDisk uint64 GPUUnits []int // Acceptable GPU slot counts when overshooting the allocation }
AllocRequest is used by clients to make requests for specific types of machine resources
func (*AllocRequest) Logable ¶
func (rqst *AllocRequest) Logable() (logable []interface{})
type Allocated ¶
type Allocated struct { GPU cuda.GPUAllocations CPU *cpu_resource.CPUAllocated Disk *disk_resource.DiskAllocated }
Allocated gathers together data for allocations of machine level resources into a single data structure that can be used to track resource allocations for tasks
type Resources ¶
type Resources struct{}
Resources is a receiver for resource related methods used to describe execution requirements
func NewResources ¶
NewResources is used to get a receiver for dealing with the resources being tracked by the studioml runner
func (*Resources) Alloc ¶
Alloc will go through all requested resources and allocate them using the resource APIs.
If any single resource be not available then the ones done so far will be released. The use of a receiver pointer is to make sure that the caller invokes the NewResources to populate some of the allocators with the context they require to track consumption of some types of resources, such as selecting the disk from which allocations will be performed.
The caller is responsible for calling the release method when the resources are no longer needed.
The live parameter can be used to controller whether the allocation attempts will perform an allocation (true), or whether they will simply test (false) that the allocation would have been completed successfully.
func (*Resources) FetchMachineResources ¶
FetchMachineResources extracts the current system state in terms of memory etc and coverts this into the resource specification used by jobs. Because resources specified by users are not exact quantities the resource is used for the machines resources even in the face of some loss of precision