From 0730ece757f05d602347d782fd027ccae9f86dc4 Mon Sep 17 00:00:00 2001 From: laser Date: Wed, 1 Apr 2020 11:56:32 -0700 Subject: [PATCH] loosen constraints on 8MiB and 2KiB sectors (for testing) --- resources.go | 89 +++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 81 insertions(+), 8 deletions(-) diff --git a/resources.go b/resources.go index ec4e4faba35..310373bfe2e 100644 --- a/resources.go +++ b/resources.go @@ -49,6 +49,22 @@ var ResourceTable = map[sealtasks.TaskType]map[abi.RegisteredProof]Resources{ BaseMinMemory: 1 << 30, }, + abi.RegisteredProof_StackedDRG2KiBSeal: Resources{ + MaxMemory: 1 << 11, + MinMemory: 1 << 11, + + MultiThread: false, + + BaseMinMemory: 1 << 11, + }, + abi.RegisteredProof_StackedDRG8MiBSeal: Resources{ + MaxMemory: 1 << 23, + MinMemory: 1 << 23, + + MultiThread: false, + + BaseMinMemory: 1 << 23, + }, }, sealtasks.TTPreCommit1: { abi.RegisteredProof_StackedDRG32GiBSeal: Resources{ @@ -67,6 +83,22 @@ var ResourceTable = map[sealtasks.TaskType]map[abi.RegisteredProof]Resources{ BaseMinMemory: 1 << 30, }, + abi.RegisteredProof_StackedDRG2KiBSeal: Resources{ + MaxMemory: 1 << 11, + MinMemory: 1 << 11, + + MultiThread: false, + + BaseMinMemory: 1 << 11, + }, + abi.RegisteredProof_StackedDRG8MiBSeal: Resources{ + MaxMemory: 1 << 23, + MinMemory: 1 << 23, + + MultiThread: false, + + BaseMinMemory: 1 << 23, + }, }, sealtasks.TTPreCommit2: { abi.RegisteredProof_StackedDRG32GiBSeal: Resources{ @@ -85,6 +117,22 @@ var ResourceTable = map[sealtasks.TaskType]map[abi.RegisteredProof]Resources{ BaseMinMemory: 1 << 30, }, + abi.RegisteredProof_StackedDRG2KiBSeal: Resources{ + MaxMemory: 1 << 11, + MinMemory: 1 << 11, + + MultiThread: true, + + BaseMinMemory: 1 << 11, + }, + abi.RegisteredProof_StackedDRG8MiBSeal: Resources{ + MaxMemory: 1 << 23, + MinMemory: 1 << 23, + + MultiThread: true, + + BaseMinMemory: 1 << 23, + }, }, sealtasks.TTCommit1: { // Very short (~100ms), so params are very light abi.RegisteredProof_StackedDRG32GiBSeal: Resources{ @@ -103,6 +151,22 @@ var ResourceTable = map[sealtasks.TaskType]map[abi.RegisteredProof]Resources{ BaseMinMemory: 1 << 30, }, + abi.RegisteredProof_StackedDRG2KiBSeal: Resources{ + MaxMemory: 1 << 11, + MinMemory: 1 << 11, + + MultiThread: false, + + BaseMinMemory: 1 << 11, + }, + abi.RegisteredProof_StackedDRG8MiBSeal: Resources{ + MaxMemory: 1 << 23, + MinMemory: 1 << 23, + + MultiThread: false, + + BaseMinMemory: 1 << 23, + }, }, sealtasks.TTCommit2: { // TODO: Measure more accurately abi.RegisteredProof_StackedDRG32GiBSeal: Resources{ @@ -123,14 +187,23 @@ var ResourceTable = map[sealtasks.TaskType]map[abi.RegisteredProof]Resources{ BaseMinMemory: 10 << 30, }, - }, -} + abi.RegisteredProof_StackedDRG2KiBSeal: Resources{ + MaxMemory: 1 << 11, + MinMemory: 1 << 11, + + MultiThread: false, + CanGPU: true, -func init() { - // for now we just reuse params for 2kib and 8mib from 512mib + BaseMinMemory: 1 << 11, + }, + abi.RegisteredProof_StackedDRG8MiBSeal: Resources{ + MaxMemory: 1 << 23, + MinMemory: 1 << 23, + + MultiThread: false, + CanGPU: true, - for taskType := range ResourceTable { - ResourceTable[taskType][abi.RegisteredProof_StackedDRG8MiBSeal] = ResourceTable[taskType][abi.RegisteredProof_StackedDRG512MiBSeal] - ResourceTable[taskType][abi.RegisteredProof_StackedDRG2KiBSeal] = ResourceTable[taskType][abi.RegisteredProof_StackedDRG512MiBSeal] - } + BaseMinMemory: 1 << 23, + }, + }, }