What happened:
MutateAdmission in pkg/device/mthreads/device.go rewrites the core limit to count * coresPerMthreadsGPU (16) for a multi-card request, so the annotation holds a pod total.
GenerateResourceRequests then range-checks that same value as a per-card percentage and rejects anything over 100. At 7 cards the value is 112, the check fails, and the pod is scheduled with no device.
What you expected to happen:
Either the request is satisfied with 7 cards, or it is rejected. Not scheduled with no device.
How to reproduce it (as minimally and precisely as possible):
Request mthreads.com/vgpu: 7 in a container. zz_repro_cores_test.go covers it: fails at count 7 and above, passes at 6.
Anything else we need to know?:
Regression from #2784. Found by reading the code, not on a cluster, so no vendor diagnostics or node logs. mthreads hardware not available here.
Environment:
- HAMi version:
main
- Accelerator vendor and model: mthreads
- HAMi device backend and requested resource names:
mthreads.com/vgpu
What happened:
MutateAdmissioninpkg/device/mthreads/device.gorewrites the core limit tocount * coresPerMthreadsGPU(16) for a multi-card request, so the annotation holds a pod total.GenerateResourceRequeststhen range-checks that same value as a per-card percentage and rejects anything over 100. At 7 cards the value is 112, the check fails, and the pod is scheduled with no device.What you expected to happen:
Either the request is satisfied with 7 cards, or it is rejected. Not scheduled with no device.
How to reproduce it (as minimally and precisely as possible):
Request
mthreads.com/vgpu: 7in a container.zz_repro_cores_test.gocovers it: fails at count 7 and above, passes at 6.Anything else we need to know?:
Regression from #2784. Found by reading the code, not on a cluster, so no vendor diagnostics or node logs. mthreads hardware not available here.
Environment:
mainmthreads.com/vgpu