File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
tensorflow/core/distributed_runtime Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -75,9 +75,12 @@ void TensorResponse::InitPartial(const RecvTensorResponse& response) {
7575
7676Status TensorResponse::ParseFrom (Source* source) {
7777 if (!on_host_) {
78+ protobuf::io::CodedInputStream input (source->contents ());
79+ input.SetTotalBytesLimit (INT_MAX, INT_MAX); // Unlimited
80+
7881 // Pre-parse into local storage, then delegate to device.
7982 RecvTensorResponse proto;
80- if (!proto.ParseFromZeroCopyStream (source-> contents () )) {
83+ if (!proto.ParseFromCodedStream (&input) || !input. ConsumedEntireMessage ( )) {
8184 return errors::InvalidArgument (" Cannot parse tensor from response" );
8285 }
8386 return device_->MakeTensorFromProto (proto.tensor (), alloc_attrs_, &tensor_);
You can’t perform that action at this time.
0 commit comments