Skip to content

Commit ecce871

Browse files
authored
fix: WinningPoSt: Correctly declare GPU requirements (#195)
1 parent 2da3d19 commit ecce871

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tasks/winning/winning_task.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import (
2929
"github.com/filecoin-project/curio/lib/paths"
3030
"github.com/filecoin-project/curio/lib/promise"
3131
"github.com/filecoin-project/curio/lib/storiface"
32+
"github.com/filecoin-project/curio/tasks/seal"
3233

3334
"github.com/filecoin-project/lotus/api"
3435
"github.com/filecoin-project/lotus/chain/actors/policy"
@@ -515,6 +516,11 @@ func (t *WinPostTask) CanAccept(ids []harmonytask.TaskID, engine *harmonytask.Ta
515516
}
516517

517518
func (t *WinPostTask) TypeDetails() harmonytask.TaskTypeDetails {
519+
gpu := 1.0
520+
if seal.IsDevnet {
521+
gpu = 0
522+
}
523+
518524
return harmonytask.TaskTypeDetails{
519525
Name: "WinPost",
520526
Max: t.max,
@@ -523,9 +529,7 @@ func (t *WinPostTask) TypeDetails() harmonytask.TaskTypeDetails {
523529
Cost: resources.Resources{
524530
Cpu: 1,
525531

526-
// todo set to something for 32/64G sector sizes? Technically windowPoSt is happy on a CPU
527-
// but it will use a GPU if available
528-
Gpu: 0,
532+
Gpu: gpu,
529533

530534
Ram: 1 << 30, // todo arbitrary number
531535
},

0 commit comments

Comments
 (0)