Preserve error type from EagerCopyToDevice.
PiperOrigin-RevId: 337945081 Change-Id: Ia7109d4e1532db489d8914309267928867d73036
This commit is contained in:
parent
06384d97df
commit
b915de19fe
@ -172,10 +172,11 @@ Status CopyInputToExpectedDevice(EagerContext* ctx, EagerOperation* op,
|
||||
/* mirror= */ true, &result_handle);
|
||||
activity.Stop();
|
||||
if (!status.ok()) {
|
||||
return errors::Internal("Failed copying input tensor from ",
|
||||
handle_device->name(), " to ",
|
||||
expected_input_device->name(), " in order to run ",
|
||||
op->Name(), ": ", status.error_message());
|
||||
return Status(
|
||||
status.code(),
|
||||
absl::StrCat("Failed copying input tensor from ", handle_device->name(),
|
||||
" to ", expected_input_device->name(), " in order to run ",
|
||||
op->Name(), ": ", status.error_message()));
|
||||
}
|
||||
|
||||
*result = result_handle;
|
||||
|
Loading…
Reference in New Issue
Block a user