Skip to content

fix(spur-k8s): convert millicore CPU quantities to whole cores in node allocatable#68

Open
shiv-tyagi wants to merge 1 commit intoROCm:mainfrom
shiv-tyagi:millicore-fix
Open

fix(spur-k8s): convert millicore CPU quantities to whole cores in node allocatable#68
shiv-tyagi wants to merge 1 commit intoROCm:mainfrom
shiv-tyagi:millicore-fix

Conversation

@shiv-tyagi
Copy link
Copy Markdown
Member

@shiv-tyagi shiv-tyagi commented Apr 10, 2026

In case of a node advertising CPUs in millicores (due to system reservations resulting in partially allocatable cores, for example), we are advertising 0 cores for the node.

Screenshot 2026-04-10 134929 Screenshot 2026-04-10 135022

The correct behaviour should be to report maximum available whole cores for that node (spur/slurm work on CPU whole cores).

Why not the next whole number instead of the floored value?
We should not promise more than what is available. Hence the most correct value is the floor of partial allocatable cores (e.g. 3 for 3800m)

I have verified that the changes work as expected.

Screenshot 2026-04-10 142418

Relevant tests are also included in this PR. PTAL. Thanks.

@shiv-tyagi shiv-tyagi requested a review from powderluv April 10, 2026 09:08
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.

1 participant