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 :
12 : #ifndef HCCLV2_CCU_CONTEXT_ALL_GATHER_MESH_1D_2DIE_H_
13 : #define HCCLV2_CCU_CONTEXT_ALL_GATHER_MESH_1D_2DIE_H_
14 :
15 : #include <vector>
16 :
17 : #include <ios>
18 : #include "log.h"
19 : #include "ccu_context_alg_base.h"
20 : #include "ccu_datatype.h"
21 :
22 : namespace Hccl {
23 :
24 : class CcuContextAllGatherMesh1D2Die : public CcuContextAlgBase {
25 : public:
26 : CcuContextAllGatherMesh1D2Die(const CcuCtxArg &arg, const std::vector<CcuTransport*> &transports,
27 : const CcuTransportGroup &group);
28 0 : ~CcuContextAllGatherMesh1D2Die() override {}
29 :
30 : void Algorithm() override;
31 : std::vector<uint64_t> GeneArgs(const CcuTaskArg &arg) override;
32 :
33 : private:
34 : bool withMyRank_ = true; // 发数据是否包含本rank
35 : std::vector<CcuRep::Variable> input_;
36 : std::vector<CcuRep::Variable> output_;
37 : CcuRep::Variable offset_;
38 : std::vector<CcuRep::Variable> token_;
39 : GroupOpSize groupOpSize_;
40 : };
41 : } // namespace Hccl
42 :
43 : #endif // HCCLV2_CCU_CONTEXT_ALL_GATHER_MESH_1D_H_
|