Merge pull request #4627 from karalabe/fix-gpu-usage-tracking
extern/sector-storage: fix GPU usage overwrite bug
This commit is contained in:
commit
f0f75e2d2c
4
extern/sector-storage/sched_resources.go
vendored
4
extern/sector-storage/sched_resources.go
vendored
@ -27,7 +27,9 @@ func (a *activeResources) withResources(id WorkerID, wr storiface.WorkerResource
|
||||
}
|
||||
|
||||
func (a *activeResources) add(wr storiface.WorkerResources, r Resources) {
|
||||
a.gpuUsed = r.CanGPU
|
||||
if r.CanGPU {
|
||||
a.gpuUsed = true
|
||||
}
|
||||
a.cpuUse += r.Threads(wr.CPUs)
|
||||
a.memUsedMin += r.MinMemory
|
||||
a.memUsedMax += r.MaxMemory
|
||||
|
Loading…
Reference in New Issue
Block a user