From bb62474aa96fcc2dfb99b3efecca92080c13bf42 Mon Sep 17 00:00:00 2001 From: Li Huachao Date: Mon, 8 Dec 2025 21:52:10 +0800 Subject: [PATCH] del snapshot apis Signed-off-by: Li Huachao --- inc/external/acl/acl_rt.h | 36 ------------------- runtime/acl_rt.cpp | 8 ++--- .../ut/acl/testcase/acl_runtime_unittest.cpp | 7 ++++ 3 files changed, 11 insertions(+), 40 deletions(-) diff --git a/inc/external/acl/acl_rt.h b/inc/external/acl/acl_rt.h index 9ca51f8b..ff8c6f54 100755 --- a/inc/external/acl/acl_rt.h +++ b/inc/external/acl/acl_rt.h @@ -3573,42 +3573,6 @@ typedef enum aclrtProcessState { ACL_RT_PROCESS_STATE_LOCKED, } aclrtProcessState; -/** - * @ingroup AscendCL - * @brief lock the NPU process which will block further aclrt api calls - * - * @retval ACL_SUCCESS The function is successfully executed. - * @retval OtherValues success. - */ -ACL_FUNC_VISIBILITY aclError aclrtSnapShotProcessLock(); - -/** - * @ingroup AscendCL - * @brief unlock the NPU process and allow it to continue making aclrt api calls - * - * @retval ACL_SUCCESS The function is successfully executed. - * @retval OtherValues success. - */ -ACL_FUNC_VISIBILITY aclError aclrtSnapShotProcessUnlock(); - -/** - * @ingroup AscendCL - * @brief backup the NPU process - * - * @retval ACL_SUCCESS The function is successfully executed. - * @retval OtherValues success. - */ -ACL_FUNC_VISIBILITY aclError aclrtSnapShotProcessBackup(); - -/** - * @ingroup AscendCL - * @brief restore the NPU process from the last backup point - * - * @retval ACL_SUCCESS The function is successfully executed. - * @retval -*/ -ACL_FUNC_VISIBILITY aclError aclrtSnapShotProcessRestore(); - /** * @ingroup AscendCL * @brief Enqueues a host function call in s strea, diff --git a/runtime/acl_rt.cpp b/runtime/acl_rt.cpp index d2babe0f..7fd1780b 100755 --- a/runtime/acl_rt.cpp +++ b/runtime/acl_rt.cpp @@ -1554,25 +1554,25 @@ aclError aclrtRepairError(int32_t deviceId, const aclrtErrorInfo *errorInfo) ACL_PROFILING_REG(acl::AclProfType::AclrtRepairError); return aclrtRepairErrorImpl(deviceId, errorInfo); } -aclError aclrtSnapShotProcessLock() +extern "C" ACL_FUNC_VISIBILITY aclError aclrtSnapShotProcessLock() { ACL_PROFILING_REG(acl::AclProfType::AclrtSnapShotProcessLock); return aclrtSnapShotProcessLockImpl(); } -aclError aclrtSnapShotProcessUnlock() +extern "C" ACL_FUNC_VISIBILITY aclError aclrtSnapShotProcessUnlock() { ACL_PROFILING_REG(acl::AclProfType::AclrtSnapShotProcessUnlock); return aclrtSnapShotProcessUnlockImpl(); } -aclError aclrtSnapShotProcessBackup() +extern "C" ACL_FUNC_VISIBILITY aclError aclrtSnapShotProcessBackup() { ACL_PROFILING_REG(acl::AclProfType::AclrtSnapShotProcessBackup); return aclrtSnapShotProcessBackupImpl(); } -aclError aclrtSnapShotProcessRestore() +extern "C" ACL_FUNC_VISIBILITY aclError aclrtSnapShotProcessRestore() { ACL_PROFILING_REG(acl::AclProfType::AclrtSnapShotProcessRestore); return aclrtSnapShotProcessRestoreImpl(); diff --git a/tests/ut/acl/testcase/acl_runtime_unittest.cpp b/tests/ut/acl/testcase/acl_runtime_unittest.cpp index de94d879..ae1b018d 100755 --- a/tests/ut/acl/testcase/acl_runtime_unittest.cpp +++ b/tests/ut/acl/testcase/acl_runtime_unittest.cpp @@ -31,6 +31,13 @@ using namespace testing; using namespace std; using namespace acl; +namespace acl { +extern "C" aclError aclrtSnapShotProcessLock(); +extern "C" aclError aclrtSnapShotProcessUnlock(); +extern "C" aclError aclrtSnapShotProcessBackup(); +extern "C" aclError aclrtSnapShotProcessRestore(); +} + class UTEST_ACL_Runtime : public testing::Test { protected: -- Gitee