diff --git a/torch_npu/csrc/aten/common/CopyKernelNpu.cpp b/torch_npu/csrc/aten/common/CopyKernelNpu.cpp index a4fac7ab3ef41cac06b9073286c959a99a717461..d4133b16fb3fed3dae4eac564c339cae804e49ce 100644 --- a/torch_npu/csrc/aten/common/CopyKernelNpu.cpp +++ b/torch_npu/csrc/aten/common/CopyKernelNpu.cpp @@ -63,13 +63,13 @@ void copy_kernel_npu( OpCommand cmd; cmd.Name("ViewCopy") .InputWithoutContiguous(self) - .Input(self_size) - .Input(self_stride) - .InputScalarToNPUTensor(at::Scalar(0), at::kLong) + .Input(self_size, at::kLong, CompileType::MEMORY_HOST_COMPILE_INDEPENDENT) + .Input(self_stride, at::kLong, CompileType::MEMORY_HOST_COMPILE_INDEPENDENT) + .Input(at::Scalar(0), at::kLong) .InputWithoutContiguous(src) - .Input(src_size) - .Input(src_stride) - .InputScalarToNPUTensor(at::Scalar(0), at::kLong) + .Input(src_size, at::kLong, CompileType::MEMORY_HOST_COMPILE_INDEPENDENT) + .Input(src_stride, at::kLong, CompileType::MEMORY_HOST_COMPILE_INDEPENDENT) + .Input(at::Scalar(0), at::kLong) .Output(self) .Run();