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
func GetGCEAttributes(mac string, instance *cloudprovider.CloudInstance) map[resourceapi.QualifiedName]resourceapi.DeviceAttribute
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" )
Click to show internal directories.
Click to hide internal directories.