mirror of
https://github.com/zebrajr/tensorflow.git
synced 2025-12-06 12:20:11 +01:00
Make Service::TransferToClient not attempt to manipulate the literal when the transfer failed, preventing a crash and allowing the caller to see the reason for the failed transfer.
PiperOrigin-RevId: 169770126
This commit is contained in:
parent
8ef722253c
commit
286f57061c
|
|
@ -930,9 +930,10 @@ tensorflow::Status Service::TransferToClient(const TransferToClientRequest* arg,
|
|||
}
|
||||
|
||||
Literal literal;
|
||||
auto status = LiteralFromAllocation(allocation, *literal_shape, &literal);
|
||||
TF_RETURN_IF_ERROR(
|
||||
LiteralFromAllocation(allocation, *literal_shape, &literal));
|
||||
*result->mutable_literal() = literal.ToProto();
|
||||
return status;
|
||||
return tensorflow::Status::OK();
|
||||
}
|
||||
|
||||
tensorflow::Status Service::TransferToServer(const TransferToServerRequest* arg,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user