Skip to content

Conversation

@shivamerla
Copy link
Contributor

No description provided.

@copy-pr-bot
Copy link

copy-pr-bot bot commented Oct 17, 2025

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.

@shivamerla shivamerla marked this pull request as draft October 17, 2025 21:14
@shivamerla shivamerla force-pushed the add_numa_node_attribute branch from 0fafb15 to 9ebf2a4 Compare October 17, 2025 21:22
if id, ret := device.GetNumaNodeId(); ret == nvml.SUCCESS {
numaNodeID = &id
} else {
klog.Warningf("error getting NUMA node ID for device %d, continuing without attribute: %v", index, ret)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Interesting! Would this be entirely exceptional, or is this an expected scenario on some systems?

This leads me to thinking:

  • On non-NUMA systems this should probably not be a warning. On those systems, I suppose this code path is expected, and maybe it's worth emitting an info-level log message.

  • On NUMA systems this should maybe be an error. At least I'd like to hear our thoughts about this.

  • How can we reliably distinguish a NUMA from a non-NUMA system (as a reference point)?

Copy link
Collaborator

@jgehrcke jgehrcke Oct 22, 2025

Choose a reason for hiding this comment

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

ref docs for nvmlDeviceGetNumaNodeId() indicate that we should distinguish three types of errors:

NVML_SUCCESS if the NUMA node is retrieved successfully
NVML_ERROR_NOT_SUPPORTED if request is not supported on the current platform
NVML_ERROR_INVALID_ARGUMENT if device node is invalid

I don't want to answer my own questions from above, but it looks like we probably want to give NVML_ERROR_NOT_SUPPORTED its own code path (not emitting a warning/error log), and then NVML_ERROR_INVALID_ARGUMENT is handled separately (and maybe that one should be fatal?).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jgehrcke good point, the not supported error can be logged as info instead of warning. After discussing with Kevin, we actually want to use the nvmlDeviceGetMemoryAffinity() . This will give the bitmask of NUMA nodes as the GPU can belong to multiple within the given socket. This means the current matchAttibute is not sufficient for this. Instead i will propose a new parameter to allow attributes to be matched from a list instead of a single element.

In that case it will be new set of error codes that we need to handle and i will update based on that.

Copy link
Collaborator

Choose a reason for hiding this comment

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

ack, thanks!

@klueska klueska added this to the v25.12.0 milestone Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

3 participants