-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install AMD GPU Kernel drivers if required #5875
base: master
Are you sure you want to change the base?
Changes from all commits
8cd5f51
af0c6a9
034e069
7c9e2c2
12cb3f9
b71f5a9
da9ce36
8e3efd2
09c051a
75a2722
511feb3
2a1b1d1
c749b3e
adfed04
af1b03f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -162,21 +162,16 @@ func (k *Kubeclient) WaitUntilNodeReady(ctx context.Context, t *testing.T, vmssN | |
|
||
// found the right node. Use it! | ||
node = castNode | ||
nodeTaints, _ := json.Marshal(node.Spec.Taints) | ||
nodeConditions, _ := json.Marshal(node.Status.Conditions) | ||
if len(node.Spec.Taints) > 0 { | ||
t.Logf("node %s is tainted. Taints: %s Conditions: %s", node.Name, string(nodeTaints), string(nodeConditions)) | ||
continue | ||
} | ||
|
||
for _, cond := range node.Status.Conditions { | ||
if cond.Type == corev1.NodeReady && cond.Status == corev1.ConditionTrue { | ||
t.Logf("node %s is ready. Taints: %s Conditions: %s", node.Name, string(nodeTaints), string(nodeConditions)) | ||
t.Logf("node %s is ready", node.Name) | ||
return node.Name | ||
} | ||
} | ||
|
||
t.Logf("node %s is not ready. Taints: %s Conditions: %s", node.Name, string(nodeTaints), string(nodeConditions)) | ||
} | ||
|
||
if node == nil { | ||
|
@@ -637,3 +632,52 @@ func nvidiaDevicePluginDaemonSet() *appsv1.DaemonSet { | |
}, | ||
} | ||
} | ||
|
||
func podEnableAMDGPUResource(s *Scenario) *corev1.Pod { | ||
return &corev1.Pod{ | ||
ObjectMeta: metav1.ObjectMeta{ | ||
Name: fmt.Sprintf("%s-amdgpu-device-plugin", s.Runtime.KubeNodeName), | ||
Namespace: defaultNamespace, | ||
}, | ||
Spec: corev1.PodSpec{ | ||
PriorityClassName: "system-node-critical", | ||
NodeSelector: map[string]string{ | ||
"kubernetes.io/hostname": s.Runtime.KubeNodeName, | ||
}, | ||
Containers: []corev1.Container{ | ||
{ | ||
Name: "amdgpu-device-plugin-container", | ||
Image: "rocm/k8s-device-plugin", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should pull from MCR, dockerhub pull isn't stable. (assuming this is from docker.io) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll need to add it to MCR at some stage. I don't think it's available there yet. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there are SFI to looks for that, we lost the contract preventing us from getting throttled on docker.io so expect throttling. We have an ACR for E2E, we should setup a remote/cache for this image and use our own ACR |
||
VolumeMounts: []corev1.VolumeMount{ | ||
{ | ||
Name: "device-plugin", | ||
MountPath: "/var/lib/kubelet/device-plugins", | ||
}, | ||
{ | ||
Name: "sys", | ||
MountPath: "/sys", | ||
}, | ||
}, | ||
}, | ||
}, | ||
Volumes: []corev1.Volume{ | ||
{ | ||
Name: "device-plugin", | ||
VolumeSource: corev1.VolumeSource{ | ||
HostPath: &corev1.HostPathVolumeSource{ | ||
Path: "/var/lib/kubelet/device-plugins", | ||
}, | ||
}, | ||
}, | ||
{ | ||
Name: "sys", | ||
VolumeSource: corev1.VolumeSource{ | ||
HostPath: &corev1.HostPathVolumeSource{ | ||
Path: "/sys", | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1664,3 +1664,69 @@ func Test_Ubuntu2404ARM(t *testing.T) { | |
}, | ||
}) | ||
} | ||
|
||
func Test_Ubuntu2404Gen2Containerd_AMDGPU_MI300(t *testing.T) { | ||
t.Skip("Provisioning of Standard_ND96isr_MI300X_v5 isn't reliable yet") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we add a TODO |
||
//E2E_LOCATION=eastus2euap | ||
//SUBSCRIPTION_ID=4f3dc0e4-0c77-40ff-bf9a-6ade1e3048ef | ||
RunScenario(t, &Scenario{ | ||
Description: "Tests that a GPU-enabled node using a MarinerV2 VHD can be properly bootstrapped", | ||
Tags: Tags{ | ||
GPU: true, | ||
}, | ||
Config: Config{ | ||
Cluster: ClusterKubenet, | ||
VHD: config.VHDUbuntu2404Gen2Containerd, //TODO: add support for older | ||
BootstrapConfigMutator: func(nbc *datamodel.NodeBootstrappingConfiguration) { | ||
nbc.ContainerService.Properties.AgentPoolProfiles[0].VMSize = "Standard_ND96isr_MI300X_v5" | ||
nbc.ContainerService.Properties.AgentPoolProfiles[0].Distro = "aks-cblmariner-v2-gen2" | ||
nbc.AgentPoolProfile.VMSize = "Standard_ND96isr_MI300X_v5" | ||
nbc.AgentPoolProfile.Distro = "aks-cblmariner-v2-gen2" | ||
nbc.EnableAMDGPU = true | ||
nbc.ConfigGPUDriverIfNeeded = true | ||
}, | ||
VMConfigMutator: func(vmss *armcompute.VirtualMachineScaleSet) { | ||
vmss.SKU.Name = to.Ptr("Standard_ND96isr_MI300X_v5") | ||
// rocm images are huge, some space for manual testing | ||
vmss.Properties.VirtualMachineProfile.StorageProfile.OSDisk.DiskSizeGB = to.Ptr[int32](128) | ||
}, | ||
Validator: func(ctx context.Context, s *Scenario) { | ||
ValidateAMDGPU(ctx, s) | ||
}, | ||
}, | ||
}) | ||
} | ||
|
||
func Test_Ubuntu2204Gen2Containerd_AMDGPU_V710(t *testing.T) { | ||
// the SKU isn't available in subscriptrion/region we run tests | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we add a TODO |
||
t.Skip("Provisioning of NV4ads_V710_v5 isn't reliable yet") | ||
//E2E_LOCATION=southcentralus | ||
//SUBSCRIPTION_ID=4f3dc0e4-0c77-40ff-bf9a-6ade1e3048ef | ||
RunScenario(t, &Scenario{ | ||
Description: "Tests that a GPU-enabled node using a MarinerV2 VHD can be properly bootstrapped", | ||
Tags: Tags{ | ||
GPU: true, | ||
}, | ||
Config: Config{ | ||
Cluster: ClusterKubenet, | ||
VHD: config.VHDUbuntu2204Gen2Containerd, | ||
BootstrapConfigMutator: func(nbc *datamodel.NodeBootstrappingConfiguration) { | ||
nbc.ContainerService.Properties.AgentPoolProfiles[0].VMSize = "Standard_NV4ads_V710_v5" | ||
nbc.ContainerService.Properties.AgentPoolProfiles[0].Distro = "aks-cblmariner-v2-gen2" | ||
nbc.AgentPoolProfile.VMSize = "Standard_NV4ads_V710_v5" | ||
nbc.AgentPoolProfile.Distro = "aks-cblmariner-v2-gen2" | ||
nbc.EnableAMDGPU = true | ||
nbc.ConfigGPUDriverIfNeeded = true | ||
|
||
}, | ||
VMConfigMutator: func(vmss *armcompute.VirtualMachineScaleSet) { | ||
vmss.SKU.Name = to.Ptr("Standard_NV4ads_V710_v5") | ||
// rocm images are huge, some space for manual testing | ||
vmss.Properties.VirtualMachineProfile.StorageProfile.OSDisk.DiskSizeGB = to.Ptr[int32](128) | ||
}, | ||
Validator: func(ctx context.Context, s *Scenario) { | ||
ValidateAMDGPU(ctx, s) | ||
}, | ||
}, | ||
}) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we uncomment all this ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll remove it before merging the PR. Once I stop testing it.
Currently it's required only for a single scriptless test that is disabled by default.
Not much harm if it accidentially leak through.