Skip to content

docs(gfd): correct the gpu.mode, gpu.replicas, gfd.timestamp and cuda.runtime-version descriptions - #2104

Open
fjvbn2003 wants to merge 1 commit into
NVIDIA:mainfrom
fjvbn2003:docs-gfd-label-descriptions
Open

fjvbn2003 wants to merge 1 commit into
NVIDIA:mainfrom
fjvbn2003:docs-gfd-label-descriptions

Conversation

@fjvbn2003

@fjvbn2003 fjvbn2003 commented Oct 17, 2026 •

Copy link
Copy Markdown

Description

Four rows of the "Generated Labels" table in docs/gpu-feature-discovery/README.md do not match what GFD writes. I compared them with the labels on five nodes running GFD v0.19.3 (GPU Operator v26.3.3) and with the code.

Label README says GFD writes
nvidia.com/gpu.mode compute or display graphics (PCI class 0x030000), compute (0x030200) or unknown — getModeForClasses() in internal/lm/nvml.go. All five nodes (GeForce, class 0x030000) are labelled graphics. No code path writes display.
nvidia.com/gpu.replicas equal to the number of physical GPUs, or the GPU count multiplied by replicas when sharing the configured replicas per GPU, 1 without sharing — getReplicas() in internal/lm/resource.go. With NewGPUResourceLabeler and 4 GPUs: no sharing → gpu.count=4, gpu.replicas=1; time-slicing with 4 replicas → gpu.count=4, gpu.replicas=4. On a time-sliced RTX 3090 with replicas: 5, the node has gpu.count=1, gpu.replicas=5 and capacity nvidia.com/gpu: 5.
nvidia.com/gfd.timestamp timestamp of the generated labels the time GFD started. NewTimestampLabeler is called once before the rerun: loop in cmd/gpu-feature-discovery/main.go, so the value does not change when GFD relabels every sleep interval. On all five nodes the label equals the container start time to the second (for example 1789974767 = 2026-09-21T07:12:47Z = startedAt), while the log shows Creating Labels every 60 s.
nvidia.com/cuda.runtime-version.* (and the deprecated cuda.runtime.*) version of CUDA the highest CUDA version that the driver supports, from nvmlSystemGetCudaDriverVersion (internal/resource/nvml-lib.go) or cuDriverGetVersion (internal/resource/cuda-lib.go). Nodes with driver 595.99.02 report 13.2 and a node with 570.195.03 reports 12.8, regardless of the CUDA runtime in the workload images.

This change only updates the descriptions. It does not change behaviour.

Checklist

  • No secrets, sensitive information, or unrelated changes
  • Lint checks passing (make lint) — documentation only
  • Unit tests passing (make test) — documentation only
  • Go mod artifacts in-sync (make check-modules) — not affected
  • Third-party notices in-sync (make check-third-party-notices) — not affected
  • Test cases are added for new code paths — no code change

Testing

Compared the table with kubectl get node -o json on five GPU nodes (RTX 4070 Laptop x2, RTX 4060 Laptop, RTX 3060 Laptop, time-sliced RTX 3090) and with GFD's container start times and logs. For gpu.replicas with more than one GPU, I ran NewGPUResourceLabeler with a 4-GPU count in a throwaway test (not included).

I used an AI assistant (Claude) to help investigate and write this change, including the checks described under Testing.

🤖 Generated with Claude Code

….runtime-version descriptions

gpu.mode reports "graphics" rather than "display", gpu.replicas is the
number of replicas per GPU, gfd.timestamp is the time GFD started, and
cuda.runtime-version is the CUDA version the driver supports.

Signed-off-by: YoungjuKim <[email protected]>
@copy-pr-bot

copy-pr-bot Bot commented Oct 17, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

| nvidia.com/cuda.runtime-version.major | Integer | Major of the highest CUDA version supported by the NVIDIA driver | 12 |
| nvidia.com/cuda.runtime-version.minor | Integer | Minor of the highest CUDA version supported by the NVIDIA driver | 5 |
| nvidia.com/cuda.runtime-version.full | Integer | Highest CUDA version supported by the NVIDIA driver. This is not the version of the CUDA runtime in a container image | 12.5 |
| nvidia.com/gfd.timestamp | Integer | Unix time at which GFD started and generated the first set of labels (optional). It is not updated when GFD regenerates the labels after each sleep interval | 1724632719 |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should rather update the label value, isn't it?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

As far as I can tell, keeping the value fixed is intentional, so this PR only documents current behavior:

One thing I found while checking: TestRunSleep asserts the label stays the same (main_test.go#L368), but it doesn't actually catch a change. I moved the timestamp labeler into the loop and ran go test -run TestRunSleep -count=5: it passed 5/5. For i == 0 the modification-time wait loop doesn't run, so outFileModificationTime[0] stays 0 and the i == 1 read doesn't wait for a second run. I can fix that test separately.

If you'd rather have the label show the time of the last run, I'm happy to make that code change in a separate PR, or drop the gfd.timestamp row here so the other three rows can go in. Which do you prefer?

(Written with help from Claude (AI); the test run above was done locally.)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants