diff --git a/inc/external/acl/acl_rt.h b/inc/external/acl/acl_rt.h index 9ca51f8b2e89cb668c0167d05eb5e9a8ec447fd7..ff8c6f547b3bf36324858d3a84068f35e630061a 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 d2babe0f88f938ccb24a76ccd24454c0567e35d1..7fd1780b730fc263f391f30ecb2175e22fac6f7a 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 de94d8794dc4799685466fbda3d894eb0f02b5ea..ae1b018d441cc7c39bf0a8c628325a135bc5fc54 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: