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 COLL_ALLGATHER_V_RING_FOR_910_93_EXECUTOR_H
12 : #define COLL_ALLGATHER_V_RING_FOR_910_93_EXECUTOR_H
13 : #include "coll_all_gather_ring_for_910_93_executor.h"
14 : namespace hccl {
15 : class CollAllGatherVRingFor91093Executor : public CollAllGatherRingFor91093Executor {
16 : public:
17 : CollAllGatherVRingFor91093Executor(const HcclDispatcher dispatcher, std::unique_ptr<TopoMatcher>& topoMatcher);
18 0 : ~CollAllGatherVRingFor91093Executor() override = default;
19 :
20 : private:
21 : // override grand
22 : bool IsSmallData(const u64 size) override;
23 :
24 : // override parent
25 : u64 CalcDstMemOffset(const OpParam& param, u32 perDataSize, u64 inputMemSize) const override;
26 : HcomCollOpInfo GetHcomCollOpInfo(const OpParam& param, const ExecMem& execMem) const override;
27 : std::vector<Slice> PrepareSlicesL2(
28 : const OpParam& param, const SubCommInfo& level2CommInfo, const SubCommInfo& level1CommInfo,
29 : const SubCommInfo& level0CommInfo, u32 perDataSize, u64 inputMemSize) const override;
30 : std::vector<Slice> PrepareSlicesL1(
31 : const OpParam& param, const SubCommInfo& level2CommInfo, const SubCommInfo& level1CommInfo,
32 : const SubCommInfo& level0CommInfo, u32 perDataSize, u64 inputMemSize) const override;
33 : HcclResult PrepareSlicesL0(
34 : std::vector<std::vector<Slice>>& multRingsSlice, const OpParam& param, const SubCommInfo& level2CommInfo,
35 : const SubCommInfo& level1CommInfo, const SubCommInfo& level0CommInfo, u32 perDataSize,
36 : u64 inputMemSize) override;
37 : HcclResult PrepareUserMemSlices(
38 : std::vector<std::vector<Slice>>& userMemSlices, const std::vector<std::vector<Slice>>& multRingsSlice,
39 : const OpParam& param, const SubCommInfo& level2CommInfo, const SubCommInfo& level1CommInfo,
40 : const SubCommInfo& level0CommInfo, u32 perDataSize, u64 inputMemSize) override;
41 : };
42 :
43 : } // namespace hccl
44 :
45 : #endif
|