[tf2xla] Introduce XlaTensorInfo
authorA. Unique TensorFlower <gardener@tensorflow.org>
Fri, 16 Mar 2018 10:45:32 +0000 (03:45 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Fri, 16 Mar 2018 10:49:44 +0000 (03:49 -0700)
commit9c4a5b962fb84661ebbf128d83345157e9e3d224
tree12f21aac70bfcc916a594c42d9248ac00dbbadd3
parentbd1dac4cba7831b327d0c9410e494ee7cf2b93a5
[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
13 files changed:
tensorflow/compiler/jit/BUILD
tensorflow/compiler/jit/kernels/xla_launch_op.cc
tensorflow/compiler/jit/xla_cpu_device.cc
tensorflow/compiler/jit/xla_device.cc
tensorflow/compiler/jit/xla_device.h
tensorflow/compiler/jit/xla_device_context.cc
tensorflow/compiler/jit/xla_device_context.h
tensorflow/compiler/jit/xla_gpu_device.cc
tensorflow/compiler/jit/xla_launch_util.cc
tensorflow/compiler/jit/xla_launch_util.h
tensorflow/compiler/jit/xla_tensor_info.cc [new file with mode: 0644]
tensorflow/compiler/jit/xla_tensor_info.h [new file with mode: 0644]
tensorflow/core/framework/tensor.h