diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2016-08-19 12:48:00 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2016-08-19 14:04:50 -0700 |
commit | 0beb7716f0ef28284bf4e6dfebb791c3f057f0de (patch) | |
tree | 1275830eb71061d7c1cac2a90857e2d82c74d296 | |
parent | 4a510c1779d8c904ea3e8bb7988e91762a9cf67c (diff) |
Fix crash bug in debug printout.
Change: 130787386
-rw-r--r-- | tensorflow/core/common_runtime/executor.cc | 3 | ||||
-rw-r--r-- | tensorflow/core/framework/tensor.cc | 5 | ||||
-rw-r--r-- | tensorflow/core/framework/tensor.h | 4 |
3 files changed, 1 insertions, 11 deletions
diff --git a/tensorflow/core/common_runtime/executor.cc b/tensorflow/core/common_runtime/executor.cc index e0e328e8b5..9261414b69 100644 --- a/tensorflow/core/common_runtime/executor.cc +++ b/tensorflow/core/common_runtime/executor.cc @@ -1799,8 +1799,7 @@ void ExecutorState::DumpIterationState(IterationState* iteration) { << strings::StrCat("Tensor<type: ", DataTypeString(tensor->dtype()), " shape: ", tensor->shape().DebugString(), - ", bytes: ", tensor->TotalBytes(), - ", hash: ", tensor->BufferHash(), ">"); + ", bytes: ", tensor->TotalBytes(), ">"); total_bytes += tensor->TotalBytes(); } } diff --git a/tensorflow/core/framework/tensor.cc b/tensorflow/core/framework/tensor.cc index 3af859d9f6..6361791cb0 100644 --- a/tensorflow/core/framework/tensor.cc +++ b/tensorflow/core/framework/tensor.cc @@ -769,11 +769,6 @@ bool Tensor::SharesBufferWith(const Tensor& b) const { return buf_->root_buffer() == b.buf_->root_buffer(); } -size_t Tensor::BufferHash() const { - CHECK_NE(nullptr, buf_); - return std::hash<TensorBuffer*>()(buf_->root_buffer()); -} - string Tensor::DebugString() const { return strings::StrCat("Tensor<type: ", DataTypeString(dtype()), " shape: ", shape().DebugString(), " values: ", SummarizeValue(3), diff --git a/tensorflow/core/framework/tensor.h b/tensorflow/core/framework/tensor.h index 572e481276..5d75fc0fec 100644 --- a/tensorflow/core/framework/tensor.h +++ b/tensorflow/core/framework/tensor.h @@ -133,10 +133,6 @@ class Tensor { // True iff the two tensors use the same underlying refcounted storage bool SharesBufferWith(const Tensor& b) const; - // The BufferHash of two tensors are equal when they share the same - // underlying refcounted storage - size_t BufferHash() const; - /// \brief If necessary, has this Tensor been initialized? /// /// Zero-element Tensors are always considered initialized, even if they |