Skip to content

treewide: preliminary b300 support - #2566

Open
msanft wants to merge 12 commits into
mainfrom
msanft/treewide/b300
Open

treewide: preliminary b300 support#2566
msanft wants to merge 12 commits into
mainfrom
msanft/treewide/b300

Conversation

@msanft

@msanft msanft commented Aug 4, 2026

Copy link
Copy Markdown
Member

In anticipation of Privatemode's B300 use, we can already prepare some (but not all) places in Contrast for B300 GPU support. For now, this PR uses the GB110_B300_SXM6_AC device ID from this table and the name normalization logic in the sandbox-device-plugin.
Closes CON-290

@msanft
msanft requested review from charludo and thomasten August 4, 2026 07:37
@msanft msanft added the no changelog PRs not listed in the release notes label Aug 4, 2026
@linear-code

linear-code Bot commented Aug 4, 2026

Copy link
Copy Markdown

CON-290

@msanft
msanft force-pushed the msanft/treewide/b300 branch from d6453e5 to aa3bec1 Compare August 4, 2026 07:46
Comment thread e2e/gpu/gpu_test.go Outdated
"nvidia.com/GB110_B300_SXM6_AC",
"nvidia.com/GH100_H100_PCIE",
// TODO(msanft): remove when the GPU operator is updated in all clusters.
"nvidia.com/pgpu",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't remember what the reason was in Contrast to use pgpu instead of specific names. The user docs also recommend this. Was that related to the gpu-operator and will this change with the new version?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Was that related to the gpu-operator and will this change with the new version?

Exactly. Hence the comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I vaguely remember some hacky patch inside Contrast to make specific names work esp. for Privatemode, which code path we didn't want to be taken for the general audience. But I might remember that wrong.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think we (i.e. @charludo, iirc) removed that in Kata at some point when we didn't need it anymore?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm not sure exactly what patch you mean, do you remember when it was dropped?

In any case, iiuc, specific names should work: https://github.com/edgelesssys/contrast/blob/main/packages/by-name/kata/source/0018-shim-guess-CDI-devices-without-direct-match.patch

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

#2180 says that that patch "is brittle and should not be relied upon". I don't know why this is or whether this has changed.

@charludo charludo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for your efforts! This generally reads good to me, I have a couple nits in the comments + the below:

  • there's a leftover comment in genpolicy/package.nix:58 that should probably also go in the "fix outdated comments" commit.

Comment thread justfile
Comment thread e2e/gpu/gpu_test.go
Comment thread e2e/gpu/gpu_test.go Outdated
Comment thread e2e/gpu/gpu_test.go Outdated
@msanft
msanft force-pushed the msanft/treewide/b300 branch from aa3bec1 to a49b754 Compare August 4, 2026 11:33
@msanft
msanft requested review from charludo and thomasten August 4, 2026 15:20

@charludo charludo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the changes! LGTM, also since nothing existing seems to break.

@github-actions

Copy link
Copy Markdown

Do the documentation changes need to be backported?

Changes to /docs/docs won't be visible until the next release.
If you are fixing something in the docs that should be immediately visible, the changes needs to be made to both /docs/docs and /docs/versioned_docs/version-X.Y, where X.Y is the version of the latest minor release.
This can be done in this same PR.

  • Yes, this should be backported to the current version of the docs.
  • No, the PR only contains docs changes relevant for future versions.

@github-actions

github-actions Bot commented Aug 17, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://edgelesssys.github.io/contrast/pr-preview/pr-2566/

Built to branch gh-pages at 2026-08-19 09:17 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

--set sandboxDevicePlugin.version=8e76fe81 \
--set 'sandboxDevicePlugin.env[0].name=P_GPU_ALIAS' \
--set 'sandboxDevicePlugin.env[0].value=pgpu' \
--set 'sandboxDevicePlugin.env[0].value=' \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think setting this to empty is wrong for this version of the gpu-operator

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This script now mixes stuff for the old gpu-operator and the new gpu-operator. The result will probably not work for either.


# TODO: Remove this workaround once the sandbox device plugin includes PCI ID 0x3182.
# https://github.com/NVIDIA/gpu-operator/pull/2625
patch_b300_pci_ids() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The patch seems overly complicated. Can't we just put an up-to-date pci.ids in a ConfigMap and mount that into the main container to override the file?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes. I haven't got to review the patch yet, but I've verified it works for the new version of the operator.

@msanft
msanft force-pushed the msanft/treewide/b300 branch from bda5598 to 5f2c877 Compare August 18, 2026 07:44
Comment thread dev-docs/nvidia/cdi.md Outdated
Comment thread docs/docs/howto/cluster-setup/bare-metal.md Outdated
Comment thread packages/by-name/scripts/upgrade-gpu-operator/upgrade-gpu-operator_test.sh Outdated
Comment thread internal/kuberesource/parts.go Outdated
@msanft
msanft force-pushed the msanft/treewide/b300 branch 2 times, most recently from d40eeba to f9b48d6 Compare August 18, 2026 08:45
Comment thread docs/docs/howto/cluster-setup/bare-metal.md Outdated
Comment thread internal/kuberesource/parts_test.go Outdated
@msanft
msanft force-pushed the msanft/treewide/b300 branch 2 times, most recently from 8b09038 to 4cdbfcb Compare August 18, 2026 09:14
@msanft
msanft force-pushed the msanft/treewide/b300 branch 2 times, most recently from d484143 to 4794cb8 Compare August 19, 2026 08:55
@msanft
msanft force-pushed the msanft/treewide/b300 branch from 4794cb8 to f91f9cb Compare August 19, 2026 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog PRs not listed in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants