aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/plugin/executor/executable.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/compiler/plugin/executor/executable.cc')
-rw-r--r--tensorflow/compiler/plugin/executor/executable.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/tensorflow/compiler/plugin/executor/executable.cc b/tensorflow/compiler/plugin/executor/executable.cc
index 38479d688d..484465210b 100644
--- a/tensorflow/compiler/plugin/executor/executable.cc
+++ b/tensorflow/compiler/plugin/executor/executable.cc
@@ -47,13 +47,14 @@ static se::DeviceMemoryBase AllocateOutputBuffer(
} else {
int64 size(xla::ShapeUtil::ByteSizeOf(shape, sizeof(void*)));
void** buf = reinterpret_cast<void**>(executor->Allocate(size));
+ void** buf_rc = buf;
for (int64 n = 0; n < xla::ShapeUtil::TupleElementCount(shape); n++) {
se::DeviceMemoryBase out =
AllocateSingleOutput(executor, literal.tuple_literals(n));
*buf++ = out.opaque();
}
- return se::DeviceMemoryBase(buf, size);
+ return se::DeviceMemoryBase(buf_rc, size);
}
}