From 74de226e3dc62b1f84a3b4a68bf339aef880f55f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=99=8F=E5=90=8D=E9=A6=99?= <11938124+yan-mingxiang@user.noreply.gitee.com> Date: Wed, 16 Nov 2022 08:59:37 +0000 Subject: [PATCH] =?UTF-8?q?=E7=9B=B8=E5=85=B3=E7=9A=84Issue=20=E5=8E=9F?= =?UTF-8?q?=E5=9B=A0=EF=BC=88=E7=9B=AE=E7=9A=84=E3=80=81=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=E7=AD=89=EF=BC=89=20=E6=8F=8F?= =?UTF-8?q?=E8=BF=B0=EF=BC=88=E5=81=9A=E4=BA=86=E4=BB=80=E4=B9=88=EF=BC=8C?= =?UTF-8?q?=E5=8F=98=E6=9B=B4=E4=BA=86=E4=BB=80=E4=B9=88=EF=BC=89=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B=EF=BC=88=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E3=80=81=E6=94=B9=E5=8A=A8=E3=80=81=E5=8F=AF=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tf_adapter/kernels/aicpu/host_queue_dataset_op.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tf_adapter/kernels/aicpu/host_queue_dataset_op.cc b/tf_adapter/kernels/aicpu/host_queue_dataset_op.cc index f78ead500..e5c0b1e68 100644 --- a/tf_adapter/kernels/aicpu/host_queue_dataset_op.cc +++ b/tf_adapter/kernels/aicpu/host_queue_dataset_op.cc @@ -358,7 +358,7 @@ class HostQueueDatasetOp : public DatasetOpKernel { end_pos += remain_size; } closure = [start_pos, end_pos, &dst_ptr, &dst_size, &src_ptr, &src_size, &closure_ret, this] () { - char *dst = reinterpret_cast(reinterpret_cast(dst_ptr) + start_pos); + void *dst = reinterpret_cast(reinterpret_cast(dst_ptr) + start_pos); const char *src = src_ptr + start_pos; uint64_t dst_len = dst_size - start_pos; // end pos must bigger than start_pos @@ -373,7 +373,7 @@ class HostQueueDatasetOp : public DatasetOpKernel { do { uint64_t temp_copy_size = len - temp_len; uint64_t copy_size = (temp_copy_size > SECUREC_MEM_MAX_LEN) ? SECUREC_MEM_MAX_LEN : temp_copy_size; - if (memcpy_s(reinterpret_cast(dst), static_cast(dst_len), + if (memcpy_s(dst, static_cast(dst_len), src, static_cast(copy_size)) != EOK) { ADP_LOG(ERROR) << "Memcpy failed, start:" << start_pos << ", len: " << copy_size; closure_ret = false; -- Gitee