From 6d732cee5b86e928cc2fba190c3fc9c966600c5d Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Fri, 27 Mar 2020 14:22:50 -0700 Subject: [PATCH] Make the XLA CpuTransferManager reflect the fact that the allocator is synchronous and buffers can be accessed immediately. PiperOrigin-RevId: 303406287 Change-Id: Ib55caa49b7060e22f9c952cd4d0a7a0ede6dbfb8 --- tensorflow/compiler/xla/service/cpu/cpu_transfer_manager.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tensorflow/compiler/xla/service/cpu/cpu_transfer_manager.h b/tensorflow/compiler/xla/service/cpu/cpu_transfer_manager.h index 361d4b9c842..d933380442f 100644 --- a/tensorflow/compiler/xla/service/cpu/cpu_transfer_manager.h +++ b/tensorflow/compiler/xla/service/cpu/cpu_transfer_manager.h @@ -44,6 +44,12 @@ class CpuTransferManager : public GenericTransferManager { const Shape& literal_shape, MutableBorrowingLiteral literal) override; + bool CanShapedBufferBeAccessedNow( + se::StreamExecutor* executor, + const ShapedBuffer& device_buffer) const override { + return true; + } + private: Status TransferBufferToInfeed(se::StreamExecutor* executor, int64 size, const void* source);