diff options
author | Rohan Jain <rohanj@google.com> | 2018-07-03 11:08:47 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-07-03 11:12:08 -0700 |
commit | 3a118b84b1845092e1900f7aadaea706d18f214b (patch) | |
tree | 46ea967dca6e989e10103214e6e677c69a80ea36 | |
parent | 182457bc47cb5297c133199cc7999d5da83e6f81 (diff) |
A small fix to the GPUProcessState method in which instance_ was not being set. As a result, the singleton wasn't truly a singleton and 2 objects ended up getting created over the lifetime.
PiperOrigin-RevId: 203151959
-rw-r--r-- | tensorflow/core/common_runtime/gpu/gpu_process_state.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tensorflow/core/common_runtime/gpu/gpu_process_state.cc b/tensorflow/core/common_runtime/gpu/gpu_process_state.cc index 607cb33b80..b18688174d 100644 --- a/tensorflow/core/common_runtime/gpu/gpu_process_state.cc +++ b/tensorflow/core/common_runtime/gpu/gpu_process_state.cc @@ -68,6 +68,7 @@ GPUProcessState* GPUProcessState::instance_ = nullptr; GPUProcessState::GPUProcessState() : gpu_device_enabled_(false) { CHECK(instance_ == nullptr); + instance_ = this; process_state_ = ProcessState::singleton(); } |