Skip to content

Commit

Permalink
Disable the use of GPU from tensorflow by default
Browse files Browse the repository at this point in the history
  • Loading branch information
valsdav committed Jan 17, 2023
1 parent c628e55 commit 2fa5675
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions PhysicsTools/TensorFlow/src/TensorFlow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ namespace tensorflow {
// objects to create the session
Status status;

// hotfix: disable GPU usage whatsoever for now, add a convenient interface in a future PR
(*sessionOptions.config.mutable_device_count())["GPU"] = 0;
sessionOptions.config.mutable_gpu_options()->set_visible_device_list("");

// create a new, empty session
Session* session = nullptr;
status = NewSession(sessionOptions, &session);
Expand Down

0 comments on commit 2fa5675

Please sign in to comment.