Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix the mismatch between gpu-manager pick up and gpu-admission predicate #74

Merged
merged 1 commit into from
Mar 9, 2021

Conversation

HeroBcat
Copy link
Contributor

@HeroBcat HeroBcat commented Mar 5, 2021

|---PHB (aval: 2, pids: [], usedMemory: 0, totalMemory: 35162423296, allocatableCores: 0, allocatableMemory: 0)
|   |---GPU0 (pids: [], usedMemory: 0, totalMemory: 11721506816, allocatableCores: 0, allocatableMemory: 0)
|   |---GPU1 (pids: [], usedMemory: 0, totalMemory: 11721506816, allocatableCores: 100, allocatableMemory: 11721506816)
|   |---GPU2 (pids: [], usedMemory: 0, totalMemory: 11719409664, allocatableCores: 100, allocatableMemory: 11719409664)

In my case, the total memory of GPU2 (11719409664) is less than GPU1 (11721506816).
So that even if the two GPUs are not allocated, gpu-manager will pick up GPU2 and gpu-admission will predicate GPU1, which leads to mismatch.
We can divide AllocatableMemory by 256 MB (types.MemoryBlockSize) first. And then compare the results.

@mYmNeo
Copy link
Contributor

mYmNeo commented Mar 8, 2021

Thank you for your commit, could you append a test for this case?

@HeroBcat
Copy link
Contributor Author

HeroBcat commented Mar 8, 2021

Thank you for your commit, could you append a test for this case?

I have updated the test case, please check.

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.

2 participants