diff options
author | 2018-01-24 19:01:16 -0800 | |
---|---|---|
committer | 2018-01-24 19:04:30 -0800 | |
commit | faf3547da8bde4aa05ac65562250901f1784e562 (patch) | |
tree | 4537c02d332d6d61b33e065779bbe5272c7cae1b /tensorflow/compiler/xla/service/buffer_assignment.cc | |
parent | 4153e7afff4e17bbef866bd4811b0392ddb25b53 (diff) |
[XLA] Allow buffers for CustomCalls to be reused.
PiperOrigin-RevId: 183177944
Diffstat (limited to 'tensorflow/compiler/xla/service/buffer_assignment.cc')
-rw-r--r-- | tensorflow/compiler/xla/service/buffer_assignment.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tensorflow/compiler/xla/service/buffer_assignment.cc b/tensorflow/compiler/xla/service/buffer_assignment.cc index 33fe11b81d..323620c131 100644 --- a/tensorflow/compiler/xla/service/buffer_assignment.cc +++ b/tensorflow/compiler/xla/service/buffer_assignment.cc @@ -846,14 +846,13 @@ Status BufferAssigner::AssignBuffersForComputation( continue; } - if (is_thread_local || instruction->opcode() == HloOpcode::kCustomCall) { - // Custom call operations never have reusable buffers. Also we do not - // reuse thread-local buffers for now, because they are dynamically - // allocated and their lifetimes are hard to compute. + if (is_thread_local) { + // We do not reuse thread-local buffers for now, because they are + // dynamically allocated and their lifetimes are hard to compute. BufferAllocation* allocation = assignment->NewAllocation( *buffer, buffer_size, is_thread_local, /*is_reusable=*/false); VLOG(3) << "New allocation #" << allocation->index() - << " for thread-local/CustomCall: " << *buffer; + << " for thread-local: " << *buffer; continue; } |