aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/framework/tensor.h
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-03-16 03:45:32 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-03-16 03:49:44 -0700
commit9c4a5b962fb84661ebbf128d83345157e9e3d224 (patch)
tree12f21aac70bfcc916a594c42d9248ac00dbbadd3 /tensorflow/core/framework/tensor.h
parentbd1dac4cba7831b327d0c9410e494ee7cf2b93a5 (diff)
[tf2xla] Introduce XlaTensorInfo
XlaTensorInfo is side-band data for Tensors. It can be used to store information about Tensors that is not possible to store in the Tensor itself. The XlaTensorInfos are managed by XlaTensorInfoManager, which is an Allocator, which allows it to release the TensorInfos when the underlying Tensor is released. Looking up an XlaTensorInfo for a Tensor requires a hash table lookup. This implementation keeps this off the fast path and only looks the tensorinfos up when they are required. PiperOrigin-RevId: 189319553
Diffstat (limited to 'tensorflow/core/framework/tensor.h')
-rw-r--r--tensorflow/core/framework/tensor.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tensorflow/core/framework/tensor.h b/tensorflow/core/framework/tensor.h
index 9ae4bb5a2c..4d10f7efb5 100644
--- a/tensorflow/core/framework/tensor.h
+++ b/tensorflow/core/framework/tensor.h
@@ -483,6 +483,8 @@ class Tensor {
friend class TensorTestHelper; // For access to set_shape
friend class OpKernelContext; // For access to RefCountIsOne().
friend class ScopedAllocator; // For access to buf_.
+ friend class XlaTensorBuffer; // For access to the private constructor taking
+ // the buffer
template <typename Device, typename T>
friend class AssignVariableOp; // For access to RefCountIsOne().
template <typename Device, typename T>