From 2bb2046002c01e58e150b24eb932c0d34f0099dc Mon Sep 17 00:00:00 2001 From: Benjamin Wenger <ben@elixxir.ioo> Date: Mon, 7 Jun 2021 15:03:32 -0700 Subject: [PATCH] made realtiem run on CPU --- graphs/realtime/decrypt.go | 8 -------- graphs/realtime/permute.go | 8 -------- node/round.go | 4 ++-- 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/graphs/realtime/decrypt.go b/graphs/realtime/decrypt.go index abf0eeff..fe63e13f 100644 --- a/graphs/realtime/decrypt.go +++ b/graphs/realtime/decrypt.go @@ -8,8 +8,6 @@ package realtime import ( - jww "github.com/spf13/jwalterweatherman" - "github.com/spf13/viper" "gitlab.com/elixxir/comms/mixmessages" "gitlab.com/elixxir/crypto/cryptops" "gitlab.com/elixxir/crypto/cyclic" @@ -243,9 +241,6 @@ var DecryptMul3Chunk = services.Module{ // InitDecryptGraph called to initialize the graph. Conforms to graphs.Initialize function type func InitDecryptGraph(gc services.GraphGenerator) *services.Graph { - if viper.GetBool("useGPU") { - jww.FATAL.Panicf("Using realtime decrypt graph running on CPU instead of equivalent GPU graph") - } g := gc.NewGraph("RealtimeDecrypt", &KeygenDecryptStream{}) decryptKeygen := graphs.Keygen.DeepCopy() @@ -260,9 +255,6 @@ func InitDecryptGraph(gc services.GraphGenerator) *services.Graph { // InitDecryptGPUGraph called to initialize the graph. Conforms to graphs.Initialize function type func InitDecryptGPUGraph(gc services.GraphGenerator) *services.Graph { - if !viper.GetBool("useGPU") { - jww.WARN.Printf("Using realtime decrypt graph running on GPU instead of equivalent CPU graph") - } g := gc.NewGraph("RealtimeDecryptGPU", &KeygenDecryptStream{}) decryptKeygen := graphs.Keygen.DeepCopy() diff --git a/graphs/realtime/permute.go b/graphs/realtime/permute.go index 3885ab15..6228a17a 100644 --- a/graphs/realtime/permute.go +++ b/graphs/realtime/permute.go @@ -8,8 +8,6 @@ package realtime import ( - jww "github.com/spf13/jwalterweatherman" - "github.com/spf13/viper" "gitlab.com/elixxir/comms/mixmessages" "gitlab.com/elixxir/crypto/cryptops" "gitlab.com/elixxir/crypto/cyclic" @@ -177,9 +175,6 @@ var PermuteMul2Chunk = services.Module{ // InitPermuteGraph initializes and returns a new graph. func InitPermuteGraph(gc services.GraphGenerator) *services.Graph { - if viper.GetBool("useGPU") { - jww.FATAL.Panicf("Using realtime permute graph running on CPU instead of equivalent GPU graph") - } gcPermute := graphs.ModifyGraphGeneratorForPermute(gc) g := gcPermute.NewGraph("RealtimePermute", &PermuteStream{}) @@ -193,9 +188,6 @@ func InitPermuteGraph(gc services.GraphGenerator) *services.Graph { // InitPermuteGPUGraph initializes a graph that uses the GPU func InitPermuteGPUGraph(gc services.GraphGenerator) *services.Graph { - if !viper.GetBool("useGPU") { - jww.WARN.Printf("Using realtime permute graph running on GPU instead of equivalent CPU graph") - } gcPermute := graphs.ModifyGraphGeneratorForPermute(gc) g := gcPermute.NewGraph("RealtimePermuteGPU", &PermuteStream{}) diff --git a/node/round.go b/node/round.go index 4ed7febb..1e28d680 100644 --- a/node/round.go +++ b/node/round.go @@ -249,7 +249,7 @@ func NewRoundComponents(gc services.GraphGenerator, topology *connect.Circuit, Timeout: newRoundTimeout, } if pool != nil && useGPU { - realtimeDecryptDefinition.Graph = realtime.InitDecryptGPUGraph(gc) + realtimeDecryptDefinition.Graph = realtime.InitDecryptGraph(gc) } else { realtimeDecryptDefinition.Graph = realtime.InitDecryptGraph(gc) } @@ -284,7 +284,7 @@ func NewRoundComponents(gc services.GraphGenerator, topology *connect.Circuit, DoVerification: true, } if pool != nil && useGPU { - realtimePermuteDefinition.Graph = realtime.InitPermuteGPUGraph(gc) + realtimePermuteDefinition.Graph = realtime.InitPermuteGraph(gc) } else { realtimePermuteDefinition.Graph = realtime.InitPermuteGraph(gc) } -- GitLab