diff --git a/ge/single_op/single_op.cc b/ge/single_op/single_op.cc index e326f3e0..36ca1850 100755 --- a/ge/single_op/single_op.cc +++ b/ge/single_op/single_op.cc @@ -364,9 +364,9 @@ Status DynamicSingleOp::SetHostTensorValue(const std::vector &input_desc, const vector &input_buffers) { for (auto &tensor_map : tensor_with_hostmem_) { - auto index = tensor_map.first; + auto index = static_cast(tensor_map.first); if (index >= input_desc.size() || index >= input_buffers.size()) { - GELOGE(INTERNAL_ERROR, "[Check][Size]Index %d should smaller then input desc size %zu " + GELOGE(INTERNAL_ERROR, "[Check][Size]Index %zu should smaller then input desc size %zu " "and input buffers size %zu.", index, input_desc.size(), input_buffers.size()); return INTERNAL_ERROR; } @@ -374,7 +374,7 @@ Status DynamicSingleOp::SetHostTensorValue(const vector &input_des // reconstruct GeTensor by DataBuffer GeTensorPtr ge_tensor = MakeShared(ge_tensor_desc); GE_CHECK_NOTNULL(ge_tensor); - GELOGD("The %d tensor input type is host, desc data type is %d, input buffer addr is %p, size is %ld.", + GELOGD("The %zu tensor input type is host, desc data type is %d, input buffer addr is %p, size is %ld.", index, ge_tensor_desc.GetDataType(), input_buffers[index].data, input_buffers[index].length); if (ge_tensor->SetData(reinterpret_cast(input_buffers[index].data), static_cast(input_buffers[index].length)) != SUCCESS) {