Documentation
¶
Index ¶
- func DefaultTopologyKey(plat string) string
- func DiscoverGPUNodes(ctx context.Context, c client.Client, target *nvcrev1alpha1.TargetSpec) ([]corev1.Node, string, error)
- func NewCommand() *cobra.Command
- func UniformGPUProduct(nodes []corev1.Node) (string, error)
- type ClusterInfo
- type NodeInfo
- type RackInfo
- type TopologyInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultTopologyKey ¶
DefaultTopologyKey returns the network topology label for the detected platform.
func DiscoverGPUNodes ¶
func DiscoverGPUNodes( ctx context.Context, c client.Client, target *nvcrev1alpha1.TargetSpec, ) ([]corev1.Node, string, error)
DiscoverGPUNodes discovers GPU nodes matching a target, validates that all nodes share the same nvidia.com/gpu.product, and returns them with the product string. If target is nil all GPU nodes are selected.
Types ¶
type ClusterInfo ¶
type ClusterInfo struct {
Platform string `json:"platform"`
GPUArchitecture string `json:"gpuArchitecture"`
GPUProduct string `json:"gpuProduct"`
// GpusPerNode is the smallest GPU count any discovered node reports. A job
// asks for the same count on every node, so the smallest node sets what
// the cluster can run.
GpusPerNode int32 `json:"gpusPerNode"`
// CatalogGpusPerNode is what the catalog assumes for this architecture. It
// can differ from GpusPerNode, for example on a workstation or a partly
// drained node, and then a certification must set gpusPerNode itself.
CatalogGpusPerNode int32 `json:"catalogGpusPerNode"`
TotalNodes int `json:"totalNodes"`
TotalGPUs int `json:"totalGPUs"`
Nodes []NodeInfo `json:"nodes"`
Topology *TopologyInfo `json:"topology,omitempty"`
}
ClusterInfo is the JSON/YAML output structure for nvcrectl cluster info.
type NodeInfo ¶
type NodeInfo struct {
Name string `json:"name"`
// GPUs is the node's allocatable nvidia.com/gpu count. It is 0 when the
// device plugin has not advertised the resource yet.
GPUs int32 `json:"gpus"`
Ready bool `json:"ready"`
Rack string `json:"rack,omitempty"`
}
NodeInfo describes a single GPU node.
type RackInfo ¶
type RackInfo struct {
Name string `json:"name"`
Nodes []string `json:"nodes"`
NodeCount int `json:"nodeCount"`
}
RackInfo describes a single topology domain (rack / T1 leaf switch).
type TopologyInfo ¶
TopologyInfo describes the network topology grouping.
Click to show internal directories.
Click to hide internal directories.