提交 278a634d 编写于 作者: J Jieying Luo 提交者: TensorFlower Gardener

[TF:PJRT] Respect ExecuteOption.non_donatable_input_indices in GPU PJRT client.

Note TF runtime side is already set up in xla_launch_util.

PiperOrigin-RevId: 549456738
上级 1cd941ac
......@@ -2288,7 +2288,10 @@ StatusOr<ScopedShapedBuffer> PjRtStreamExecutorExecutable::EnqueueExecution(
"device %s, but replica is assigned to device %s.",
i, replica, handle->device()->DebugString(), device->DebugString());
}
bool must_donate = donate_it != donated_params.end() && *donate_it == i;
bool donation_denied_at_runtime =
options.non_donatable_input_indices.contains(i);
bool must_donate = donate_it != donated_params.end() && *donate_it == i &&
!donation_denied_at_runtime;
if (must_donate) {
++donate_it;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册