gpulevelzero

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

README

To update the golang gRPC/protobuf files, use the following protoc commandline:

protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative levelzero.proto
# To fix bad package name
sed -i -e 's/gpu_levelzero/gpulevelzero/' levelzero.pb.go levelzero_grpc.pb.go

Note: Running protoc will erase copyright header and change the package name from "gpulevelzero" to "gpu.levelzero". The header and the package name needs to be added/modified after regeneration.

Documentation

Index

Constants

View Source
const (
	DefaultUnixSocketPath = "/var/lib/levelzero/server.sock"
)

Variables

View Source
var File_levelzero_proto protoreflect.FileDescriptor
View Source
var Levelzero_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Levelzero",
	HandlerType: (*LevelzeroServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetDeviceHealth",
			Handler:    _Levelzero_GetDeviceHealth_Handler,
		},
		{
			MethodName: "GetDeviceTemperature",
			Handler:    _Levelzero_GetDeviceTemperature_Handler,
		},
		{
			MethodName: "GetIntelIndices",
			Handler:    _Levelzero_GetIntelIndices_Handler,
		},
		{
			MethodName: "GetDeviceMemoryAmount",
			Handler:    _Levelzero_GetDeviceMemoryAmount_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "levelzero.proto",
}

Levelzero_ServiceDesc is the grpc.ServiceDesc for Levelzero service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterLevelzeroServer

func RegisterLevelzeroServer(s grpc.ServiceRegistrar, srv LevelzeroServer)

Types

type DeviceHealth

type DeviceHealth struct {
	MemoryOk bool   `protobuf:"varint,1,opt,name=memory_ok,json=memoryOk,proto3" json:"memory_ok,omitempty"`
	BusOk    bool   `protobuf:"varint,2,opt,name=bus_ok,json=busOk,proto3" json:"bus_ok,omitempty"`
	SocOk    bool   `protobuf:"varint,3,opt,name=soc_ok,json=socOk,proto3" json:"soc_ok,omitempty"`
	Error    *Error `protobuf:"bytes,42,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*DeviceHealth) Descriptor deprecated

func (*DeviceHealth) Descriptor() ([]byte, []int)

Deprecated: Use DeviceHealth.ProtoReflect.Descriptor instead.

func (*DeviceHealth) GetBusOk

func (x *DeviceHealth) GetBusOk() bool

func (*DeviceHealth) GetError

func (x *DeviceHealth) GetError() *Error

func (*DeviceHealth) GetMemoryOk

func (x *DeviceHealth) GetMemoryOk() bool

func (*DeviceHealth) GetSocOk

func (x *DeviceHealth) GetSocOk() bool

func (*DeviceHealth) ProtoMessage

func (*DeviceHealth) ProtoMessage()

func (*DeviceHealth) ProtoReflect

func (x *DeviceHealth) ProtoReflect() protoreflect.Message

func (*DeviceHealth) Reset

func (x *DeviceHealth) Reset()

func (*DeviceHealth) String

func (x *DeviceHealth) String() string

type DeviceId

type DeviceId struct {
	BdfAddress string `protobuf:"bytes,1,opt,name=bdfAddress,proto3" json:"bdfAddress,omitempty"`
	// contains filtered or unexported fields
}

func (*DeviceId) Descriptor deprecated

func (*DeviceId) Descriptor() ([]byte, []int)

Deprecated: Use DeviceId.ProtoReflect.Descriptor instead.

func (*DeviceId) GetBdfAddress

func (x *DeviceId) GetBdfAddress() string

func (*DeviceId) ProtoMessage

func (*DeviceId) ProtoMessage()

func (*DeviceId) ProtoReflect

func (x *DeviceId) ProtoReflect() protoreflect.Message

func (*DeviceId) Reset

func (x *DeviceId) Reset()

func (*DeviceId) String

func (x *DeviceId) String() string

type DeviceIndices

type DeviceIndices struct {
	Indices []uint32 `protobuf:"varint,1,rep,packed,name=indices,proto3" json:"indices,omitempty"`
	Error   *Error   `protobuf:"bytes,42,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*DeviceIndices) Descriptor deprecated

func (*DeviceIndices) Descriptor() ([]byte, []int)

Deprecated: Use DeviceIndices.ProtoReflect.Descriptor instead.

func (*DeviceIndices) GetError

func (x *DeviceIndices) GetError() *Error

func (*DeviceIndices) GetIndices

func (x *DeviceIndices) GetIndices() []uint32

func (*DeviceIndices) ProtoMessage

func (*DeviceIndices) ProtoMessage()

func (*DeviceIndices) ProtoReflect

func (x *DeviceIndices) ProtoReflect() protoreflect.Message

func (*DeviceIndices) Reset

func (x *DeviceIndices) Reset()

func (*DeviceIndices) String

func (x *DeviceIndices) String() string

type DeviceMemoryAmount

type DeviceMemoryAmount struct {
	MemorySize uint64 `protobuf:"varint,1,opt,name=memory_size,json=memorySize,proto3" json:"memory_size,omitempty"`
	Error      *Error `protobuf:"bytes,42,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*DeviceMemoryAmount) Descriptor deprecated

func (*DeviceMemoryAmount) Descriptor() ([]byte, []int)

Deprecated: Use DeviceMemoryAmount.ProtoReflect.Descriptor instead.

func (*DeviceMemoryAmount) GetError

func (x *DeviceMemoryAmount) GetError() *Error

func (*DeviceMemoryAmount) GetMemorySize

func (x *DeviceMemoryAmount) GetMemorySize() uint64

func (*DeviceMemoryAmount) ProtoMessage

func (*DeviceMemoryAmount) ProtoMessage()

func (*DeviceMemoryAmount) ProtoReflect

func (x *DeviceMemoryAmount) ProtoReflect() protoreflect.Message

func (*DeviceMemoryAmount) Reset

func (x *DeviceMemoryAmount) Reset()

func (*DeviceMemoryAmount) String

func (x *DeviceMemoryAmount) String() string

type DeviceTemperature

type DeviceTemperature struct {
	Global float64 `protobuf:"fixed64,1,opt,name=global,proto3" json:"global,omitempty"`
	Gpu    float64 `protobuf:"fixed64,2,opt,name=gpu,proto3" json:"gpu,omitempty"`
	Memory float64 `protobuf:"fixed64,3,opt,name=memory,proto3" json:"memory,omitempty"`
	Error  *Error  `protobuf:"bytes,42,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*DeviceTemperature) Descriptor deprecated

func (*DeviceTemperature) Descriptor() ([]byte, []int)

Deprecated: Use DeviceTemperature.ProtoReflect.Descriptor instead.

func (*DeviceTemperature) GetError

func (x *DeviceTemperature) GetError() *Error

func (*DeviceTemperature) GetGlobal

func (x *DeviceTemperature) GetGlobal() float64

func (*DeviceTemperature) GetGpu

func (x *DeviceTemperature) GetGpu() float64

func (*DeviceTemperature) GetMemory

func (x *DeviceTemperature) GetMemory() float64

func (*DeviceTemperature) ProtoMessage

func (*DeviceTemperature) ProtoMessage()

func (*DeviceTemperature) ProtoReflect

func (x *DeviceTemperature) ProtoReflect() protoreflect.Message

func (*DeviceTemperature) Reset

func (x *DeviceTemperature) Reset()

func (*DeviceTemperature) String

func (x *DeviceTemperature) String() string

type Error

type Error struct {
	Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
	Errorcode   uint32 `protobuf:"varint,2,opt,name=errorcode,proto3" json:"errorcode,omitempty"`
	// contains filtered or unexported fields
}

func (*Error) Descriptor deprecated

func (*Error) Descriptor() ([]byte, []int)

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetDescription

func (x *Error) GetDescription() string

func (*Error) GetErrorcode

func (x *Error) GetErrorcode() uint32

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

func (x *Error) ProtoReflect() protoreflect.Message

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

type GetIntelIndicesMessage

type GetIntelIndicesMessage struct {
	// contains filtered or unexported fields
}

func (*GetIntelIndicesMessage) Descriptor deprecated

func (*GetIntelIndicesMessage) Descriptor() ([]byte, []int)

Deprecated: Use GetIntelIndicesMessage.ProtoReflect.Descriptor instead.

func (*GetIntelIndicesMessage) ProtoMessage

func (*GetIntelIndicesMessage) ProtoMessage()

func (*GetIntelIndicesMessage) ProtoReflect

func (x *GetIntelIndicesMessage) ProtoReflect() protoreflect.Message

func (*GetIntelIndicesMessage) Reset

func (x *GetIntelIndicesMessage) Reset()

func (*GetIntelIndicesMessage) String

func (x *GetIntelIndicesMessage) String() string

type LevelzeroClient

type LevelzeroClient interface {
	GetDeviceHealth(ctx context.Context, in *DeviceId, opts ...grpc.CallOption) (*DeviceHealth, error)
	GetDeviceTemperature(ctx context.Context, in *DeviceId, opts ...grpc.CallOption) (*DeviceTemperature, error)
	GetIntelIndices(ctx context.Context, in *GetIntelIndicesMessage, opts ...grpc.CallOption) (*DeviceIndices, error)
	GetDeviceMemoryAmount(ctx context.Context, in *DeviceId, opts ...grpc.CallOption) (*DeviceMemoryAmount, error)
}

LevelzeroClient is the client API for Levelzero service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewLevelzeroClient

func NewLevelzeroClient(cc grpc.ClientConnInterface) LevelzeroClient

type LevelzeroServer

type LevelzeroServer interface {
	GetDeviceHealth(context.Context, *DeviceId) (*DeviceHealth, error)
	GetDeviceTemperature(context.Context, *DeviceId) (*DeviceTemperature, error)
	GetIntelIndices(context.Context, *GetIntelIndicesMessage) (*DeviceIndices, error)
	GetDeviceMemoryAmount(context.Context, *DeviceId) (*DeviceMemoryAmount, error)
	// contains filtered or unexported methods
}

LevelzeroServer is the server API for Levelzero service. All implementations must embed UnimplementedLevelzeroServer for forward compatibility

type UnimplementedLevelzeroServer

type UnimplementedLevelzeroServer struct {
}

UnimplementedLevelzeroServer must be embedded to have forward compatible implementations.

func (UnimplementedLevelzeroServer) GetDeviceHealth

func (UnimplementedLevelzeroServer) GetDeviceMemoryAmount

func (UnimplementedLevelzeroServer) GetDeviceTemperature

func (UnimplementedLevelzeroServer) GetIntelIndices

type UnsafeLevelzeroServer

type UnsafeLevelzeroServer interface {
	// contains filtered or unexported methods
}

UnsafeLevelzeroServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LevelzeroServer will result in compilation errors.

Jump to

Keyboard shortcuts

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