// Some Tensors can have complex on-device shapes, including tuple shapes. To
// manage the memory for these tensors a ShapedBuffer may be required.
- // Return true if this TensorInfo contains a ShapedBuffer.
+ // Return true if this XlaTensor contains a ShapedBuffer.
bool has_shaped_buffer() const { return shaped_buffer_ != nullptr; }
// Return the contained ShapedBuffer.
// REQUIRES: has_shaped_buffer()
CHECK(has_shaped_buffer());
return *shaped_buffer_;
}
- // Mutates the TensorInfo to set the ShapedBuffer.
+ // Mutates the XlaTensor to set the ShapedBuffer.
void set_shaped_buffer(xla::ScopedShapedBuffer shaped_buffer) {
shaped_buffer_ =
xla::MakeUnique<xla::ScopedShapedBuffer>(std::move(shaped_buffer));
// in on-demand mode to avoid re-copying values from the device if we know the
// host value already.
- // Return true if this TensorInfo contains a host tensor.
+ // Return true if this XlaTensor contains a host tensor.
bool has_host_tensor() const { return host_tensor_ != nullptr; }
// Return the contained host tensor.
// REQUIRES: has_host_tensor()