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 33 : AicpuHdc() {};
21 32 : ~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(
26 : std::shared_ptr<hccl::HDCommunicate> d2hTransfer, KfcStatus state, KfcError errorCode, u32 retryCount);
27 : HcclResult SetOpExecStatus(
28 : std::shared_ptr<hccl::HDCommunicate> d2hTransfer, HcclOpIdentifier& opId, KfcStatus state, KfcError errorCode,
29 : u32 retryCount);
30 : HcclResult GetOpExecCtrlTargetOp(std::shared_ptr<hccl::HDCommunicate> h2dTransfer, HcclOpIdentifier& opId);
31 : HcclResult GetOpExecChangeLink(std::shared_ptr<hccl::HDCommunicate> h2dTransfer, ChangeLinkInfo& changeLinkInfo);
32 : HcclResult SetErrorMessage(std::shared_ptr<hccl::HDCommunicate> d2hTransfer, ErrorMessageReport& emrInfo);
33 :
34 : private:
35 : KfcCommand lastCmd_ = KfcCommand::kNone;
36 : };
37 :
38 : #endif // HCCL_AICPU_HDC_H
|