diff options
author | 2018-08-22 11:01:07 -0700 | |
---|---|---|
committer | 2018-08-22 11:05:48 -0700 | |
commit | a3e8e2928506ca7cd1ed25a01ae81cedfdb4b404 (patch) | |
tree | b7ea18bc223153b5b2b14ceb63f8e63129273978 | |
parent | b41d90c9d70dd5b65858e7405e6f0b33e54ee8ff (diff) |
Don't access XLA literal after it has been freed
PiperOrigin-RevId: 209793751
-rw-r--r-- | tensorflow/compiler/jit/xla_device_context.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tensorflow/compiler/jit/xla_device_context.cc b/tensorflow/compiler/jit/xla_device_context.cc index 175a571ddb..2027ec7737 100644 --- a/tensorflow/compiler/jit/xla_device_context.cc +++ b/tensorflow/compiler/jit/xla_device_context.cc @@ -124,11 +124,11 @@ void XlaTransferManager::TransferLiteralFromDevice( TensorReference ref(device_tensor); transfer_manager_->TransferLiteralFromDevice( device_to_host_stream_.get(), shaped_buffer, literal, - [=, &shaped_buffer, &literal](xla::Status status) { + [=, &shaped_buffer](xla::Status status) { ref.Unref(); done([&]() -> Status { - VLOG(1) << "Transfer from device as literal: " << literal.ToString() - << " " << shaped_buffer.ToString(); + VLOG(1) << "Transfer from device as literal: " + << shaped_buffer.ToString(); return status; }()); }); |