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 : #include "alltoallvc_auto_selector.h"
12 : #include "selector_registry.h"
13 : #include "coll_operator.h"
14 :
15 : namespace Hccl {
16 :
17 0 : SelectorStatus AlltoAllVCAutoSelector::SelectCcuScheduleAlgo(
18 : const TopoInfo& topoInfo, const CollAlgOperator& op,
19 : const std::map<OpType, std::vector<HcclAlgoType>>& configAlgMap, std::string& primQueueGenName) const
20 : {
21 : (void)topoInfo;
22 : (void)op;
23 : (void)configAlgMap;
24 : (void)primQueueGenName;
25 0 : HCCL_WARNING("[Algo][AllToAllVCAutoSelector] algo is not supported yet for ccu_ms mode, reset to default.");
26 0 : return SelectorStatus::NOT_MATCH;
27 : }
28 :
29 0 : SelectorStatus AlltoAllVCAutoSelector::SelectAicpuAlgo(
30 : const TopoInfo& topoInfo, const CollAlgOperator& op,
31 : const std::map<OpType, std::vector<HcclAlgoType>>& configAlgMap, std::string& primQueueGenName) const
32 : {
33 : (void)op;
34 : (void)configAlgMap;
35 0 : HCCL_DEBUG("[AlltoAllVCAutoSelector][%s] start, topoInfo levelNum[%u]", __func__, topoInfo.levelNum);
36 :
37 : // aiv 直接走打平 mesh
38 0 : primQueueGenName = "InsAlltoAllvcMesh";
39 :
40 0 : HCCL_INFO("[Algo][AlltoAllVCAutoSelector][%s] Algo match [%s]", __func__, primQueueGenName.c_str());
41 0 : return SelectorStatus::MATCH;
42 : }
43 :
44 : REGISTER_SELECTOR_BY_OPTYPE(OpType::ALLTOALLVC, 18, AlltoAllVCAutoSelector);
45 : } // namespace Hccl
|