code synchronize

This commit is contained in:
wilfChen 2022-11-01 14:36:33 +08:00
parent 6380625330
commit 85d2e76f76
1 changed files with 1 additions and 0 deletions

View File

@ -46,6 +46,7 @@ void GpuInferenceSession::LoadInputData(const std::shared_ptr<KernelGraph> &kern
MS_EXCEPTION_IF_NULL(device_address);
if (!common::AnfAlgo::IsParameterWeight(pk_node)) {
tensor = inputs[no_weight_input++];
MS_EXCEPTION_IF_NULL(tensor);
if (!device_address->SyncHostToDevice(trans::GetRuntimePaddingShape(pk_node, 0),
LongToSize(tensor->data().nbytes()), tensor->data_type(),
tensor->data_c())) {