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 CCU_INSTRUCTION_GROUP_H
12 : #define CCU_INSTRUCTION_GROUP_H
13 :
14 : #include "ccu_ins.h"
15 : #include "types.h"
16 : #include "instruction.h"
17 :
18 : namespace Hccl {
19 :
20 : class CcuInsGroup : public CcuInstruction {
21 : public:
22 18 : CcuInsGroup() : CcuInstruction()
23 : {
24 18 : }
25 :
26 : void SetExecId(u64 id) override;
27 : void Append(std::unique_ptr<CcuInstruction> ins);
28 : const std::vector<std::unique_ptr<CcuInstruction>> &GetCcuInstructions() const;
29 : CcuCtxSignature GetCtxSignature() const override;
30 : u64 GetExecId() const override;
31 : std::string Describe() const override;
32 : CcuInstType GetInstType() const override;
33 : std::unique_ptr<CcuCtxArg> GetCtxArg() const override;
34 : std::unique_ptr<CcuTaskArg> GetTaskArg() const override;
35 : std::vector<LinkData> GetLinks() const override;
36 : RankGroup GetRankGroup() const override;
37 :
38 : private:
39 : std::vector<std::unique_ptr<CcuInstruction>> ccuInstructions;
40 : };
41 :
42 : } // namespace Hccl
43 :
44 : #endif // CCU_INSTRUCTION_GROUP_H
|