From 911d3e3c28404a2673b063f07b1923b16d038de1 Mon Sep 17 00:00:00 2001 From: zhushaung <974198603@qq.com> Date: Wed, 15 Jul 2026 15:33:37 +0800 Subject: [PATCH] fix: use cnrtMemcpyAsync_V2 for Cambricon async copies --- src/native/cambricon/runtime_.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/native/cambricon/runtime_.h b/src/native/cambricon/runtime_.h index c4f4112..4e89928 100644 --- a/src/native/cambricon/runtime_.h +++ b/src/native/cambricon/runtime_.h @@ -5,7 +5,6 @@ #include #include -#include #include "native/cambricon/device_.h" #include "runtime.h" @@ -67,12 +66,7 @@ struct Runtime static constexpr auto MemcpyAsync = [](void* dst, const void* src, std::size_t size, auto kind, Stream stream) { - if constexpr (std::is_invocable_v) { - return cnrtMemcpyAsync(dst, const_cast(src), size, kind, stream); - } else { - return cnrtMemcpyAsync(dst, const_cast(src), size, stream, kind); - } + return cnrtMemcpyAsync_V2(dst, const_cast(src), size, stream, kind); }; static constexpr auto kMemcpyHostToHost = cnrtMemcpyHostToHost;