diff options
author | 2017-03-14 15:31:58 -0800 | |
---|---|---|
committer | 2017-03-14 16:44:40 -0700 | |
commit | e11c2c2841153f662e57ecf00d6e4813d19bd515 (patch) | |
tree | 8ed0820443703793d5ce7ed44f6511ca72b7291a /tensorflow/core/framework/tensor.h | |
parent | fafd5b24223c4e07e3bbb7267750a06a80e37d95 (diff) |
Record allocated sizes for tensors instead of actual tensor sizes.
Substract back temp memory for reduction op because its temp memory becomes output memory.
Change: 150130275
Diffstat (limited to 'tensorflow/core/framework/tensor.h')
-rw-r--r-- | tensorflow/core/framework/tensor.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tensorflow/core/framework/tensor.h b/tensorflow/core/framework/tensor.h index d9b22525c4..2d5e70cf76 100644 --- a/tensorflow/core/framework/tensor.h +++ b/tensorflow/core/framework/tensor.h @@ -144,6 +144,9 @@ class Tensor { /// Returns the estimated memory usage of this tensor. size_t TotalBytes() const; + // Returns the size of sallocated memory for this tensor. + size_t AllocatedBytes() const; + /// Returns true iff this tensor is aligned. bool IsAligned() const { #if EIGEN_MAX_ALIGN_BYTES == 0 |