diff --git a/tensorflow/core/distributed_runtime/collective_rma_distributed.cc b/tensorflow/core/distributed_runtime/collective_rma_distributed.cc index 73fb9d9cf64..c645c74f903 100644 --- a/tensorflow/core/distributed_runtime/collective_rma_distributed.cc +++ b/tensorflow/core/distributed_runtime/collective_rma_distributed.cc @@ -66,7 +66,7 @@ void PopulateTensorFromExtra(const RecvBufRespExtra& extra, Tensor* cpu_tensor) { char* head = reinterpret_cast<char*>(DMAHelper::base(cpu_tensor)); for (const auto& tensor_content_chunk : extra.tensor_content()) { - memcpy(head, tensor_content_chunk.data(), + memcpy(head, std::string(tensor_content_chunk).data(), tensor_content_chunk.size()); head += tensor_content_chunk.size(); } diff --git a/tensorflow/core/lib/io/recordio_test.cc b/tensorflow/core/lib/io/recordio_test.cc index f21f88dfa22..ee02fcbbb9e 100644 --- a/tensorflow/core/lib/io/recordio_test.cc +++ b/tensorflow/core/lib/io/recordio_test.cc @@ -64,7 +64,7 @@ class StringDest : public WritableFile { } #if defined(PLATFORM_GOOGLE) Status Append(const absl::Cord& data) override { - contents_->append(data.ToString()); + contents_->append(std::string(data)); return Status::OK(); } #endif