Skip to content

fix(apps): pin requested gpu devices instead of their whole pool - #624

Draft
justinwlin wants to merge 1 commit into
mainfrom
fix/apps-exact-gpu-negations
Draft

justinwlin wants to merge 1 commit into
mainfrom
fix/apps-exact-gpu-negations

Conversation

@justinwlin

Copy link
Copy Markdown
Contributor

gpu=[...] with device names deploys onto whole pools, so workers can run on GPUs you didn't ask for. In a live test, ["NVIDIA GeForce RTX 4090", "NVIDIA L4", "NVIDIA RTX A5000"] ran on an RTX PRO 6000 Blackwell Server Edition MIG 1g.24gb slice.

Cause

gpu_ids_value maps each device to its pool and sends only the pool ids. The platform's AMPERE_24 pool also holds the RTX 3090 and the PRO 6000 MIG 24 GB slice. runpod-flash excluded the pool's other devices with -<device id> tokens, but only the ones in its static pool table. That table lacks the MIG slices, so Flash would land there too.

Change

  • For pools selected through a device name, exclude every other member with -<device id>. Pools named directly ("AMPERE_24") still allow all their devices.
  • Read pool membership from the live catalog (GET https://api.runpod.io/v2/catalog/gpus, the pool field), cached per process. Fall back to the static table when the catalog is unreachable.
Verification
  • Live deploy of that three-device list stored gpuIds = ADA_24,AMPERE_24,-NVIDIA GeForce RTX 3090,-NVIDIA RTX PRO 6000 Blackwell Server Edition MIG 1g.24gb. Four parallel jobs all reported NVIDIA GeForce RTX 4090.
  • Unit tests cover live-catalog exclusions, a directly named pool, the static fallback, and catalog parsing and failure. A tests/test_apps/conftest.py fixture keeps other tests offline. pytest tests: 1483 passed, coverage 91.67%.

Endpoints select GPUs by pool, so a device list like
["NVIDIA GeForce RTX 4090", "NVIDIA L4", "NVIDIA RTX A5000"] deployed as
ADA_24,AMPERE_24 and workers could land on any device in those pools,
including an RTX PRO 6000 MIG 1g.24gb slice the platform added to
AMPERE_24.

Exclude every other device in each pool selected through a device name
with "-<device id>" tokens, as runpod-flash did. Membership comes from
the platform's live GPU catalog, because the static pool table lags it
(it has no MIG slices); the static table is the fallback when the
catalog is unreachable. Pools named directly still allow all devices.

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.

1 participant