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

device plugin allocate judge error #1

Closed
angao opened this issue Feb 19, 2019 · 3 comments
Closed

device plugin allocate judge error #1

angao opened this issue Feb 19, 2019 · 3 comments

Comments

@angao
Copy link

angao commented Feb 19, 2019

github.com/AliyunContainerService/gpushare-device-plugin/pkg/gpu/nvidia/allocate.go:79

// podReqGPU = uint(0)
for _, req := range reqs.ContainerRequests {
	podReqGPU += uint(len(req.DevicesIDs))
}
...
if getGPUMemoryFromPodResource(pod) == podReqGPU {
...
}

getGPUMemoryFromPodResource() returns pod memory usage, but podReqGPU is pod request gpu count

@angao
Copy link
Author

angao commented Feb 19, 2019

@cheyang

@cheyang
Copy link
Collaborator

cheyang commented Feb 19, 2019

podReqGPU is the pod's GPU memory, is aliyun.com/gpu-mem. It's because the DevicesIDs here is not the real GPU device ID, it's the fake DeviceIDs and the total number of the DeviceID equals GPU memory.

Maybe reading the design doc is helpful to you. https://github.com/AliyunContainerService/gpushare-scheduler-extender/blob/master/docs/designs/designs.md#design

@angao
Copy link
Author

angao commented Feb 20, 2019

thx

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

No branches or pull requests

2 participants