Skip to content

mthreads: a request for 7 or more cards is scheduled with no device #2987

Description

@badnikhil

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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions