!26983 fix FusedMulAddN code trace print

Merge pull request !26983 from yuchaojie/ir_fusion
This commit is contained in:
i-robot 2021-12-01 06:15:09 +00:00 committed by Gitee
commit e67f83fdf1
2 changed files with 6 additions and 2 deletions

View File

@ -22,8 +22,8 @@
namespace mindspore {
namespace opt {
CNodePtr CreateFusionNode(const FuncGraphPtr &graph, const CNodePtr &mul, const CNodePtr &addn,
const size_t &lossscale_input_index) {
CNodePtr MulAddNFusion::CreateFusionNode(const FuncGraphPtr &graph, const CNodePtr &mul, const CNodePtr &addn,
const size_t &lossscale_input_index) const {
MS_EXCEPTION_IF_NULL(graph);
MS_EXCEPTION_IF_NULL(mul);
MS_EXCEPTION_IF_NULL(addn);

View File

@ -28,6 +28,10 @@ class MulAddNFusion : public PatternProcessPassWithSwitch {
~MulAddNFusion() override = default;
const BaseRef DefinePattern() const override;
const AnfNodePtr Process(const FuncGraphPtr &, const AnfNodePtr &, const EquivPtr &) const override;
private:
CNodePtr CreateFusionNode(const FuncGraphPtr &graph, const CNodePtr &mul, const CNodePtr &addn,
const size_t &lossscale_input_index) const;
};
} // namespace opt
} // namespace mindspore