Line data Source code
1 : /**
2 : * Copyright (c) 2025 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_AICPU_HDC_H
12 : #define HCCL_AICPU_HDC_H
13 :
14 : #include <memory>
15 : #include "aicpu_operator_pub.h"
16 : #include "hdc_pub.h"
17 :
18 : class AicpuHdc {
19 : public:
20 32 : AicpuHdc() {};
21 31 : ~AicpuHdc() {};
22 :
23 : HcclResult InitOpExecStatus(std::shared_ptr<hccl::HDCommunicate> d2hTransfer, HcclOpIdentifier &opId);
24 : HcclResult GetOpExecCtrlCmd(std::shared_ptr<hccl::HDCommunicate> h2dTransfer, KfcCommand &cmd);
25 : HcclResult SetOpExecStatus(std::shared_ptr<hccl::HDCommunicate> d2hTransfer, KfcStatus state,
26 : KfcError errorCode, u32 retryCount);
27 : HcclResult SetOpExecStatus(std::shared_ptr<hccl::HDCommunicate> d2hTransfer, HcclOpIdentifier &opId, KfcStatus state,
28 : KfcError errorCode, u32 retryCount);
29 : HcclResult GetOpExecCtrlTargetOp(std::shared_ptr<hccl::HDCommunicate> h2dTransfer, HcclOpIdentifier &opId);
30 : HcclResult GetOpExecChangeLink(std::shared_ptr<hccl::HDCommunicate> h2dTransfer, ChangeLinkInfo &changeLinkInfo);
31 : HcclResult SetErrorMessage(std::shared_ptr<hccl::HDCommunicate> d2hTransfer, ErrorMessageReport &emrInfo);
32 :
33 : private:
34 : KfcCommand lastCmd_ = KfcCommand::kNone;
35 : };
36 :
37 : #endif // HCCL_AICPU_HDC_H
|