add flag to disable gpu to lotus-bench

This commit is contained in:
whyrusleeping 2019-12-02 11:25:10 -08:00
parent 5beb7f4a48
commit 22f96e626b

View File

@ -64,8 +64,15 @@ func main() {
Name: "sector-size",
Value: 1024,
},
&cli.BoolFlag{
Name: "no-gpu",
Usage: "disable gpu usage for the benchmark run",
},
},
Action: func(c *cli.Context) error {
if c.Bool("no-gpu") {
os.Setenv("BELLMAN_NO_GPU", "1")
}
sdir, err := homedir.Expand(c.String("storage-dir"))
if err != nil {
return err