gce

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GCEAttrPrefix = "gce.dra.net"

	AttrGCEBlock                = GCEAttrPrefix + "/" + "block"
	AttrGCESubBlock             = GCEAttrPrefix + "/" + "subBlock"
	AttrGCEHost                 = GCEAttrPrefix + "/" + "host"
	AttrGCENetworkName          = GCEAttrPrefix + "/" + "networkName"
	AttrGCENetworkProjectNumber = GCEAttrPrefix + "/" + "networkProjectNumber"
	AttrGCEIPAliases            = GCEAttrPrefix + "/" + "ipAliases"
	AttrGCEMachineType          = GCEAttrPrefix + "/" + "machineType"
)

Variables

View Source
var (
	// https://cloud.google.com/compute/docs/accelerator-optimized-machines#network-protocol
	// machine types have a one to one mapping to a network protocol in google cloud
	NetworkProtocolMap = map[string]GPUDirectSupport{
		"a3-highgpu-1g":  GPUDirectTCPX,
		"a3-highgpu-2g":  GPUDirectTCPX,
		"a3-highgpu-4g":  GPUDirectTCPX,
		"a3-highgpu-8g":  GPUDirectTCPX,
		"a3-edgegpu-8g":  GPUDirectTCPX,
		"a3-megagpu-8g":  GPUDirectTCPXO,
		"a3-ultragpu-8g": GPUDirectRDMA,
		"a4-highgpu-8g":  GPUDirectRDMA,
	}
)

Functions

func GetGCEAttributes added in v0.5.0

GetGCEAttributes fetches all attributes related to the provided device, identified by it's MAC.

func GetInstance

func GetInstance(ctx context.Context) (*cloudprovider.CloudInstance, error)

GetInstance retrieves GCE instance properties by querying the metadata server.

Types

type GPUDirectSupport

type GPUDirectSupport string

GPUDirectSupport represents the type of GPUDirect support for a given machine type.

const (
	GPUDirectTCPX  GPUDirectSupport = "GPUDirect-TCPX"
	GPUDirectTCPXO GPUDirectSupport = "GPUDirect-TCPXO"
	GPUDirectRDMA  GPUDirectSupport = "GPUDirect-RDMA"
)

Jump to

Keyboard shortcuts

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