!39906 Fix using void issue
Merge pull request !39906 from ZPaC/rpc-performance
This commit is contained in:
commit
63a598dea6
|
@ -50,8 +50,7 @@ class RpcRecvKernelMod : public RpcKernelMod {
|
|||
}
|
||||
for (size_t i = 0; i < inputs.size(); i++) {
|
||||
MS_EXCEPTION_IF_NULL(inputs[i]->addr);
|
||||
int ret = memcpy_s(inputs[i]->addr, inputs[i]->size, remote_input_->Body().data() + real_data_offset_[i],
|
||||
inputs[i]->size);
|
||||
int ret = memcpy_s(inputs[i]->addr, inputs[i]->size, data_ptr + real_data_offset_[i], inputs[i]->size);
|
||||
if (ret != 0) {
|
||||
MS_LOG(EXCEPTION) << "memcpy_s for recv output " << i << " failed, ret code: " << ret;
|
||||
}
|
||||
|
|
|
@ -225,6 +225,14 @@ void SendActor::SerializeDynamicShapeMessage(MessageBase *message, const kernel:
|
|||
offset += serialized_data_size;
|
||||
}
|
||||
}
|
||||
|
||||
if (!common::GetEnv("use_void").empty()) {
|
||||
if (workspace_addr->size != offset) {
|
||||
MS_LOG(EXCEPTION) << "Send void data size is not the same as workspace size.";
|
||||
}
|
||||
message->data = workspace_addr->addr;
|
||||
message->size = workspace_addr->size;
|
||||
}
|
||||
}
|
||||
|
||||
void SendActor::SerializeCommonMessage(MessageBase *message, const kernel::AddressPtrList &data_list,
|
||||
|
|
Loading…
Reference in New Issue