Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetVendorByName ¶
Types ¶
type DRICard ¶
type DRICard struct {
Num int
Name string
Path string
Devices []string
DeviceID uint64
VendorID uint64
Major uint64
Minor uint64
PCIBusID string
Memory uint64
HwmonPath string
}
func CollectDRICardDevices ¶
CollectDRICardDevices traverses overs /dev/dri and collect card Devices which can be bound into the container
func (*DRICard) Metrics ¶ added in v0.4.15
func (card *DRICard) Metrics() (*DRICardMetrics, error)
type DRICardMetrics ¶ added in v0.4.15
type MetricsHandler ¶ added in v0.4.17
MetricsHandlers returns hardware-dependent implementation of GPU metrics interface.
func NewMetricsHandler ¶ added in v0.4.17
func NewMetricsHandler(gpuType sonm.GPUVendorType) (MetricsHandler, error)
type Tuner ¶
type Tuner interface {
// Tune is attaching GPUs with given IDs into a container
Tune(hostconfig *container.HostConfig, ids []GPUID) error
// Devices returns device list that this tuner can control
Devices() []*sonm.GPUDevice
// Close closes the tuner and removes related files and sockets from the host system
Close() error
}
Tuner is responsible for preparing GPU-friendly environment and baking proper options in container.HostConfig
Click to show internal directories.
Click to hide internal directories.