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