LCOV - code coverage report
Current view: top level - coll_communicator_mgr/dfx/ns_recovery - task_abort_handler.h (source / functions) Coverage Total Hit
Test: coverage.info Lines: 100.0 % 1 1
Test Date: 2026-08-29 17:38:31 Functions: 100.0 % 2 2

            Line data    Source code
       1              : /**
       2              :  * Copyright (c) 2026 Huawei Technologies Co., Ltd.
       3              :  * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
       4              :  * CANN Open Software License Agreement Version 2.0 (the "License").
       5              :  * Please refer to the License for details. You may not use this file except in compliance with the License.
       6              :  * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
       7              :  * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
       8              :  * See LICENSE in the root of the software repository for the full text of the License.
       9              :  */
      10              : 
      11              : #ifndef HCCL_TASK_ABORT_HANDLER__H
      12              : #define HCCL_TASK_ABORT_HANDLER__H
      13              : #include <mutex>
      14              : #include "coll_comm.h"
      15              : #include "orion_adapter_rts.h"
      16              : 
      17              : namespace hccl {
      18              : int32_t
      19              : ProcessTaskAbortHandleCallback(int32_t deviceLogicId, aclrtDeviceTaskAbortStage stage, uint32_t timeout, void* args);
      20              : 
      21            9 : MAKE_ENUM(
      22              :     TaskAbortResult,
      23              :     TASK_ABORT_SUCCESS = 0,  // taskabortSuccess
      24              :     TASK_ABORT_FAIL = 1,     // taskabortFail
      25              :     TASK_ABORT_TIMEOUT = 2); // taskabortTimeout
      26              : 
      27              : class CollComm;
      28              : 
      29              : class HcclTaskAbortHandler {
      30              : public:
      31              :     HcclTaskAbortHandler();
      32              :     ~HcclTaskAbortHandler();
      33              :     HcclResult Register(CollComm* communicator);
      34              :     HcclResult UnRegister(CollComm* communicator);
      35              : 
      36              :     friend int32_t ProcessTaskAbortHandleCallback(
      37              :         int32_t deviceLogicId, aclrtDeviceTaskAbortStage stage, uint32_t timeout, void* args);
      38              : 
      39              : private:
      40              :     std::vector<CollComm*> commVector_;
      41              :     std::mutex vecMutex_;
      42              : 
      43              :     HcclTaskAbortHandler(const HcclTaskAbortHandler&) = delete;
      44              :     HcclTaskAbortHandler& operator=(const HcclTaskAbortHandler&) = delete;
      45              : };
      46              : } // namespace hccl
      47              : 
      48              : #endif
        

Generated by: LCOV version 2.0-1