Skip to content
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

Add support for AMD GPUs via --gpus=amd #19749

Merged
merged 1 commit into from
Oct 12, 2024

Conversation

fbyrne
Copy link
Contributor

@fbyrne fbyrne commented Oct 4, 2024

Add support for AMD GPUs via --gpus=amd

Fixes #19463

Before: minikube start --help

minikube start --help
...
    -g, --gpus='':
        Allow pods to use your NVIDIA GPUs. Options include: [all,nvidia] (Docker driver with Docker container-runtime
        only)

After: minikube start --help

minikube start --help
...
    -g, --gpus='':
        Allow pods to use your GPUs. Options include: [all,nvidia,amd] (Docker driver with Docker
        container-runtime only)

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 4, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @fbyrne. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 4, 2024
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

Copy link
Member

@spowelljr spowelljr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

deploy/addons/gpu/amd-gpu-device-plugin.yaml.tmpl Outdated Show resolved Hide resolved
hack/update/get_version/get_version.go Outdated Show resolved Hide resolved
pkg/minikube/cruntime/docker.go Outdated Show resolved Hide resolved
pkg/minikube/cruntime/docker.go Outdated Show resolved Hide resolved
test/integration/addons_test.go Outdated Show resolved Hide resolved
site/content/en/docs/tutorials/amd.md Outdated Show resolved Hide resolved
pkg/drivers/kic/oci/oci.go Outdated Show resolved Hide resolved
cmd/minikube/cmd/start.go Outdated Show resolved Hide resolved
site/content/en/docs/tutorials/amd.md Outdated Show resolved Hide resolved
site/content/en/docs/tutorials/amd.md Outdated Show resolved Hide resolved
@fbyrne
Copy link
Contributor Author

fbyrne commented Oct 8, 2024

Hi @spowelljr, applied all suggestions and updated tests. if this is good to go, ill squash and push again.

@spowelljr
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 8, 2024
@minikube-pr-bot

This comment has been minimized.

@minikube-pr-bot

This comment has been minimized.

@spowelljr
Copy link
Member

Seeing failures for the AmdGpuDevicePlugin test, could you look into them @fbyrne

@spowelljr spowelljr added the do-not-merge/failing-test Indicates that a PR should not merge because it has a failing test label Oct 9, 2024
@fbyrne
Copy link
Contributor Author

fbyrne commented Oct 9, 2024

Yeah I'll take a look at them tonight.

How do I run the tests that are failing locally?

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 9, 2024
@spowelljr
Copy link
Member

spowelljr commented Oct 9, 2024

Can see https://minikube.sigs.k8s.io/docs/contrib/testing/ for the full documentation, but make integration -e TEST_ARGS="-test.run TestAddons" should just run what you need.

Ignore the TestAddons/serial/GCPAuth/PullSecret btw, that's known and I'm resolving it

If you want to run faster iteration loops you can comment out/delete the other addons

diff --git a/test/integration/addons_test.go b/test/integration/addons_test.go
index 9bf9d3a2d..9975458a5 100644
--- a/test/integration/addons_test.go
+++ b/test/integration/addons_test.go
@@ -121,8 +121,6 @@ func TestAddons(t *testing.T) {
                        name      string
                        validator validateFunc
                }{
-                       {"Volcano", validateVolcanoAddon},
-                       {"GCPAuth", validateGCPAuthAddon},
                }
                for _, tc := range tests {
                        tc := tc
@@ -141,17 +139,6 @@ func TestAddons(t *testing.T) {
                        name      string
                        validator validateFunc
                }{
-                       {"Registry", validateRegistryAddon},
-                       {"Ingress", validateIngressAddon},
-                       {"InspektorGadget", validateInspektorGadgetAddon},
-                       {"MetricsServer", validateMetricsServerAddon},
-                       {"Olm", validateOlmAddon},
-                       {"CSI", validateCSIDriverAndSnapshots},
-                       {"Headlamp", validateHeadlampAddon},
-                       {"CloudSpanner", validateCloudSpannerAddon},
-                       {"LocalPath", validateLocalPathAddon},
-                       {"NvidiaDevicePlugin", validateNvidiaDevicePlugin},
-                       {"Yakd", validateYakdAddon},
                }
                for _, tc := range tests {
                        tc := tc

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 9, 2024
@fbyrne
Copy link
Contributor Author

fbyrne commented Oct 9, 2024

Should be good now, rebased to remove conflict.

@fbyrne
Copy link
Contributor Author

fbyrne commented Oct 9, 2024

/ok-to-test

@minikube-pr-bot

This comment has been minimized.

@minikube-pr-bot

This comment has been minimized.

@fbyrne fbyrne changed the title Add support for AMD GPUs via --gpus=amd or --gpus=all Add support for AMD GPUs via --gpus=amd Oct 10, 2024
@minikube-pr-bot

This comment has been minimized.

@spowelljr
Copy link
Member

You'll need to only run the test on amd64, it's running on arm64 tests as well and failing.

@fbyrne
Copy link
Contributor Author

fbyrne commented Oct 10, 2024

Good morning, yeah I saw those failures, last fix pushed was a fix to only add when driver is docker and amd64 arch.

@minikube-pr-bot

This comment has been minimized.

@minikube-pr-bot

This comment has been minimized.

@fbyrne
Copy link
Contributor Author

fbyrne commented Oct 10, 2024

@spowelljr, if the PR is good, ill squash to tidy the history. let me know

@minikube-pr-bot

This comment has been minimized.

@spowelljr spowelljr removed the do-not-merge/failing-test Indicates that a PR should not merge because it has a failing test label Oct 11, 2024
@spowelljr
Copy link
Member

Looks good to me, feel free to squash @fbyrne

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 11, 2024
@fbyrne
Copy link
Contributor Author

fbyrne commented Oct 11, 2024

👍 Squashed

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Oct 11, 2024
@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 19749) |
+----------------+----------+---------------------+
| minikube start | 46.9s    | 47.4s               |
| enable ingress | 15.8s    | 16.5s               |
+----------------+----------+---------------------+

Times for minikube start: 49.0s 44.5s 48.6s 47.8s 44.5s
Times for minikube (PR 19749) start: 47.3s 48.1s 49.0s 47.2s 45.4s

Times for minikube ingress: 18.9s 14.4s 14.9s 14.9s 15.9s
Times for minikube (PR 19749) ingress: 18.9s 15.4s 14.4s 15.4s 18.4s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 19749) |
+----------------+----------+---------------------+
| minikube start | 21.0s    | 21.6s               |
| enable ingress | 12.4s    | 12.6s               |
+----------------+----------+---------------------+

Times for minikube start: 19.9s 19.9s 19.9s 23.1s 22.5s
Times for minikube (PR 19749) start: 22.8s 20.4s 19.5s 22.6s 22.8s

Times for minikube ingress: 12.2s 12.7s 12.2s 12.2s 12.7s
Times for minikube (PR 19749) ingress: 12.7s 12.7s 12.7s 12.7s 12.2s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 19749) |
+----------------+----------+---------------------+
| minikube start | 21.0s    | 20.0s               |
| enable ingress | 38.8s    | 32.9s               |
+----------------+----------+---------------------+

Times for minikube ingress: 39.2s 38.8s 38.7s 38.7s 38.7s
Times for minikube (PR 19749) ingress: 23.2s 39.2s 39.7s 39.2s 23.2s

Times for minikube start: 22.0s 19.9s 21.6s 22.2s 19.3s
Times for minikube (PR 19749) start: 19.8s 19.6s 19.0s 19.2s 22.5s

@minikube-pr-bot
Copy link

Here are the number of top 10 failed tests in each environments with lowest flake rate.

Environment Test Name Flake Rate

Besides the following environments also have failed tests:

To see the flake rates of all tests by environment, click here.

Copy link
Member

@spowelljr spowelljr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fbyrne, spowelljr

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 12, 2024
@spowelljr spowelljr merged commit 30655c2 into kubernetes:master Oct 12, 2024
30 of 41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Does minikube support AMD GPUs
5 participants