extern/sector-storage: fix GPU usage overwrite bug
This commit is contained in:
parent
704bef5dfc
commit
5f657b4333
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) {
|
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.cpuUse += r.Threads(wr.CPUs)
|
||||||
a.memUsedMin += r.MinMemory
|
a.memUsedMin += r.MinMemory
|
||||||
a.memUsedMax += r.MaxMemory
|
a.memUsedMax += r.MaxMemory
|
||||||
|
Loading…
Reference in New Issue
Block a user