diff --git a/tensorflow/compiler/plugin/executor/executable.cc b/tensorflow/compiler/plugin/executor/executable.cc index 74fa1869f67..79eea9af3f0 100644 --- a/tensorflow/compiler/plugin/executor/executable.cc +++ b/tensorflow/compiler/plugin/executor/executable.cc @@ -36,7 +36,7 @@ static se::DeviceMemoryBase AllocateSingleOutput(sep::ExecutorExecutor* executor const Literal& literal) { int64 size(xla::ShapeUtil::ByteSizeOf(literal.shape())); void* buf = executor->Allocate(size); - const void* src = Literal::InternalData(literal); + const void* src = literal.InternalData(); memcpy(buf, src, size); return se::DeviceMemoryBase(buf, size); } @@ -90,7 +90,7 @@ StatusOr ExecutorExecutable::ExecuteOnStream( arg_literals_ptrs.push_back(arg_literals.back().get()); // Copy in the data from the stream_executor buffers - void* buffer = Literal::MutableInternalData(arg_literals.back().get()); + void* buffer = arg_literals.back().get()->MutableInternalData(); memcpy(buffer, arguments[p].opaque(), ShapeUtil::ByteSizeOf(param->shape())); } diff --git a/tensorflow/compiler/plugin/executor/transfer_manager.cc b/tensorflow/compiler/plugin/executor/transfer_manager.cc index 22be7958023..6a471401fae 100644 --- a/tensorflow/compiler/plugin/executor/transfer_manager.cc +++ b/tensorflow/compiler/plugin/executor/transfer_manager.cc @@ -70,13 +70,13 @@ Status ExecutorTransferManager::TransferLiteralFromDevice( } *literal->mutable_shape() = device_shape; - Literal::Reserve(ShapeUtil::ElementsIn(device_shape), literal); + literal->Reserve(ShapeUtil::ElementsIn(device_shape)); TF_RETURN_IF_ERROR(TransferBufferFromDevice( executor, source, ShapeUtil::ByteSizeOf(device_shape), - Literal::MutableInternalData(literal))); + literal->MutableInternalData())); if (!ShapeUtil::Equal(literal_shape, device_shape)) { literal->Swap( - Literal::Relayout(*literal, literal_shape.layout()).get()); + literal->Relayout(literal_shape.layout()).get()); } TF_RET_CHECK(ShapeUtil::Equal(literal_shape, literal->shape())); return Status::OK(); @@ -134,7 +134,7 @@ Status ExecutorTransferManager::TransferLiteralToDevice( } return TransferBufferToDevice(executor, GetByteSizeRequirement(shape), - Literal::InternalData(literal), + literal.InternalData(), destination); }