device

package
v0.750.3 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device struct {
	ID    ID     `json:"id"`
	Brand string `json:"brand"`
	UUID  string `json:"uuid"`
	Type  Type   `json:"type"`
}

Device represents a single computational device on an agent.

func (*Device) Proto

func (d *Device) Proto() *devicev1.Device

Proto returns the proto representation of the device.

func (*Device) String

func (d *Device) String() string

type ID

type ID int

ID the type of Device.ID.

type Type

type Type string

Type is a string holding the type of the Device.

const (
	// CPU represents a CPU device.
	CPU Type = "cpu"
	// CUDA represents a CUDA device.
	CUDA Type = "cuda"
	// ROCM represents an AMD GPU device.
	ROCM Type = "rocm"
	// ZeroSlot represents cpu devices on agents where only GPUs are modeled.
	ZeroSlot Type = ""
)

func (Type) Proto

func (t Type) Proto() devicev1.Type

Proto returns the proto representation of the device type.

Jump to

Keyboard shortcuts

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