Home
last modified time | relevance | path

Searched refs:relu_grad (Results 1 – 19 of 19) sorted by relevance

/third_party/mindspore/mindspore/ccsrc/backend/optimizer/gpu/
Drelu_v2_pass.cc34 CNodePtr GetRelu(const CNodePtr &relu_grad) { in GetRelu() argument
35 MS_EXCEPTION_IF_NULL(relu_grad); in GetRelu()
36 CheckCNodeInputSize(relu_grad, kReluGradInputTensorNum); in GetRelu()
37 auto relu_anf = relu_grad->input(2); in GetRelu()
95 CNodePtr CreateReluGradV2(const FuncGraphPtr &graph, const CNodePtr &relu_grad, const AnfNodePtr &s… in CreateReluGradV2() argument
97 MS_EXCEPTION_IF_NULL(relu_grad); in CreateReluGradV2()
101 std::vector<AnfNodePtr> inputs = {NewValueNode(prim), relu_grad->input(1), second_input}; in CreateReluGradV2()
104 new_node->set_scope(relu_grad->scope()); in CreateReluGradV2()
105 new_node->set_abstract(relu_grad->abstract()); in CreateReluGradV2()
109 size_t output_num = AnfAlgo::GetOutputTensorNum(relu_grad); in CreateReluGradV2()
[all …]
Dbatch_norm_add_relu_grad_fusion.cc68 …AndType(const CNodePtr &bn_add_relu_grad, const AnfNodePtr &bn_grad, const AnfNodePtr &relu_grad) { in SetShapeAndType() argument
78 outputs_type.push_back(AnfAlgo::GetOutputInferDataType(relu_grad, 0)); in SetShapeAndType()
79 outputs_shape.push_back(AnfAlgo::GetOutputInferShape(relu_grad, 0)); in SetShapeAndType()
83 …id ReplaceOutput(const FuncGraphPtr &graph, const AnfNodePtr &bn_grad, const AnfNodePtr &relu_grad, in ReplaceOutput() argument
111 manager->Replace(relu_grad, bn_add_relu_grad_output[kBNAddReluGradOutputNum - 1]); in ReplaceOutput()
129 auto relu_grad = AnfAlgo::GetInputNode(utils::cast<CNodePtr>(node), 0); in PatternCheck() local
130 MS_EXCEPTION_IF_NULL(relu_grad); in PatternCheck()
131 auto relu_users = GetRealNodeUsedList(graph, relu_grad); in PatternCheck()
152 VectorRef relu_grad = VectorRef({prim::kPrimReluGrad, dy_, y_}); in DefinePattern() local
154 VectorRef({prim::kPrimBatchNormGrad, relu_grad, x_, scale_, save_mean_, save_var_, reserve_}); in DefinePattern()
[all …]
Dbatch_norm_relu_grad_fusion.cc32 VectorRef relu_grad = VectorRef({prim::kPrimReluGrad, dy_, y_}); in DefinePattern() local
34 VectorRef({prim::kPrimBatchNormGrad, relu_grad, x_, scale_, save_mean_, save_var_, reserve_}); in DefinePattern()
63 auto relu_grad = AnfAlgo::GetInputNode(utils::cast<CNodePtr>(node), 0); in Process() local
64 MS_EXCEPTION_IF_NULL(relu_grad); in Process()
66 auto outlist = GetRealNodeUsedList(graph, relu_grad); in Process()
72 auto dy = AnfAlgo::GetInputNode(utils::cast<CNodePtr>(relu_grad), 0); in Process()
74 auto y = AnfAlgo::GetInputNode(utils::cast<CNodePtr>(relu_grad), 1); in Process()
Dadd_relu_grad_v2_fusion.cc56 …VectorRef relu_grad = VectorRef({prim::kPrimReluGradV2, VectorRef({prim::kPrimAdd, x1_, x2_}), mas… in DefinePattern() local
57 return relu_grad; in DefinePattern()
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/ir_fusion/
Dderelu_fusion.cc32 CNodePtr GetRelu(const CNodePtr &relu_grad) { in GetRelu() argument
33 MS_EXCEPTION_IF_NULL(relu_grad); in GetRelu()
34 CheckCNodeInputSize(relu_grad, kReluGradInputTensorNum); in GetRelu()
35 auto relu_anf = relu_grad->input(kIndex2); in GetRelu()
83 CNodePtr CreateReluGradV2(const FuncGraphPtr &graph, const CNodePtr &relu_grad, const AnfNodePtr &s… in CreateReluGradV2() argument
85 MS_EXCEPTION_IF_NULL(relu_grad); in CreateReluGradV2()
89 std::vector<AnfNodePtr> inputs = {NewValueNode(prim), relu_grad->input(1), second_input}; in CreateReluGradV2()
92 new_node->set_scope(relu_grad->scope()); in CreateReluGradV2()
93 new_node->set_abstract(relu_grad->abstract()); in CreateReluGradV2()
102 VectorRef relu_grad({prim::kPrimReluGrad, i0, relu}); in DefinePattern() local
[all …]
/third_party/mindspore/tests/st/ops/cpu/
Dtest_relu_grad_op.py32 self.relu_grad = G.ReluGrad()
41 return self.relu_grad(self.dy, self.x)
48 relu_grad = NetReluGrad()
49 output = relu_grad()
Dtest_relu6_grad_op.py48 relu_grad = NetReluGrad()
49 output = relu_grad()
/third_party/mindspore/tests/st/ops/gpu/
Dtest_relu_v2.py30 self.relu_grad = G.ReluGrad()
34 dx = self.relu_grad(dy, y)
67 self.relu_grad = G.ReluGrad()
72 dx = self.relu_grad(dy, y)
108 self.relu_grad = G.ReluGrad()
113 dx = self.relu_grad(dy, y)
Dtest_relu_grad_grad_op.py62 relu_grad = NetReluGrad()
63 net = NetReluGradGrad(relu_grad)
/third_party/mindspore/tests/ut/cpp/python_input/gtest_input/pre_activate/
Dderelu_fusion.py20 relu_grad = Primitive('ReluGrad') variable
44 res = relu_grad(i0, relu_res)
/third_party/mindspore/tests/st/ops/graph_kernel/
Dtest_relu_grad.py26 self.relu_grad = G.ReluGrad()
29 return self.relu_grad(y_backprop, x)
/third_party/mindspore/tests/vm_impl/
Dvm_impl_function.py22 y_backprop = vm.relu_grad(x.copy()) * y_backprop
Dvm_interface.py45 setattr(vm, 'relu_grad', relu_grad)
Dnn_ops_vm_impl.py229 y_backprop = vm.relu_grad(x.copy()) * y_backprop
Dvm_me.py493 def relu_grad(y): function
/third_party/mindspore/mindspore/_extends/graph_kernel/expanders/
D__init__.py48 from .relu_grad import ReluGrad
/third_party/mindspore/tests/ut/python/pynative_mode/vm/
Dtest_vm.py242 y = vm.relu_grad(y)
/third_party/mindspore/mindspore/ops/_op_impl/tbe/
D__init__.py83 from .relu_grad import _relu_grad_tbe
/third_party/mindspore/config/
Dop_info.config214 … "TBE", "async_flag": false, "binfile_name": "relu_grad.so", "compute_cost": 10, "kernel_name": "r…
215 … "TBE", "async_flag": false, "binfile_name": "relu_grad.so", "compute_cost": 10, "kernel_name": "r…