!44935 code warning

Merge pull request !44935 from chenweifeng/code-sync
This commit is contained in:
i-robot 2022-11-01 11:09:18 +00:00 committed by Gitee
commit 8f0b175207
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
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())) {