* Copyright (c) 2026 Huawei Technologies Co., Ltd.
* This program is free software, you can redistribute it and/or modify it under the terms and conditions of
* CANN Open Software License Agreement Version 2.0 (the "License").
* Please refer to the License for details. You may not use this file except in compliance with the License.
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
* See LICENSE in the root of the software repository for the full text of the License.
*/
* \file fusion_pass_common.cpp
* \brief 把桩头编入 libopgraph_math.so,并在满足条件时登记 fe 融合 pass 名字。
*/
#if defined(OP_GRAPH_MATH_ASCEND950)
#include "version/ge-compiler_version.h"
#include "fe_fusion_pass_registry_stub.h"
#define GE_COMPILER_VERSION_900 90000000
#if GE_COMPILER_VERSION_NUM >= GE_COMPILER_VERSION_900
STUB_REG_PASS("ReduceMeanWithCastFusionPass", fe::BUILT_IN_PREPARE_GRAPH_PASS, 0x05);
STUB_REG_PASS("PermuteFusionPass", fe::BUILT_IN_GRAPH_PASS, 0x05);
STUB_REG_PASS("RandomUniformFusionPass", fe::BUILT_IN_GRAPH_PASS, 0x01);
STUB_REG_PASS("TruncatedNormalFusionPass", fe::BUILT_IN_GRAPH_PASS, 0x01);
STUB_REG_PASS("RandomStandardNormalFusionPass", fe::BUILT_IN_GRAPH_PASS, 0x01);
STUB_REG_PASS("RandomUniformIntFusionPass", fe::BUILT_IN_GRAPH_PASS, 0x01);
STUB_REG_PASS("DropOutV3FusionPass", fe::BUILT_IN_GRAPH_PASS, 0x05);
STUB_REG_PASS("DropOutV3SplitFusionPass", fe::BUILT_IN_GRAPH_PASS, 0x05);
STUB_REG_PASS("BernoulliFusionPass", fe::BUILT_IN_GRAPH_PASS, 0);
#endif
#endif