/third_party/mindspore/mindspore/core/abstract/ |
D | primitive_infer_map.cc | 43 const auto kOneHot = prim::kPrimOneHot->name(); in GetDependsFormMap() 44 const auto kDropoutGenMask = prim::kPrimDropoutGenMask->name(); in GetDependsFormMap() 45 const auto kTranspose = prim::kPrimTranspose->name(); in GetDependsFormMap() 46 const auto kReduceSum = prim::kPrimReduceSum->name(); in GetDependsFormMap() 47 const auto kUnsortedSegmentSum = prim::kPrimUnsortedSegmentSum->name(); in GetDependsFormMap() 48 const auto kUnsortedSegmentMin = prim::kPrimUnsortedSegmentMin->name(); in GetDependsFormMap() 49 const auto kUnsortedSegmentMax = prim::kPrimUnsortedSegmentMax->name(); in GetDependsFormMap() 50 const auto kGather = prim::kPrimGather->name(); in GetDependsFormMap() 51 const auto kGatherV2 = prim::kPrimGatherV2->name(); in GetDependsFormMap() 52 const auto kDynamicShape = prim::kPrimDynamicShape->name(); in GetDependsFormMap() [all …]
|
/third_party/mindspore/tests/ut/cpp/operator/ |
D | ops_test.cc | 28 namespace prim { namespace 38 auto prim = std::make_shared<Primitive>(prim::kScalarAdd); in TEST_F() local 39 ASSERT_EQ(prim->name(), kPrimScalarAdd->name()); in TEST_F() 43 auto prim = std::make_shared<Primitive>(prim::kScalarSub); in TEST_F() local 44 ASSERT_EQ(prim->name(), kPrimScalarSub->name()); in TEST_F() 48 auto prim = std::make_shared<Primitive>(prim::kScalarMul); in TEST_F() local 49 ASSERT_EQ(prim->name(), kPrimScalarMul->name()); in TEST_F() 53 auto prim = std::make_shared<Primitive>(prim::kScalarDiv); in TEST_F() local 54 ASSERT_EQ(prim->name(), kPrimScalarDiv->name()); in TEST_F() 58 auto prim = std::make_shared<Primitive>(prim::kScalarMod); in TEST_F() local [all …]
|
/third_party/mindspore/mindspore/ccsrc/frontend/optimizer/ |
D | irpass.cc | 59 … {prim::kPrimScalarAdd, prim::kPrimScalarMul, prim::kPrimAdd, in OptimizeIRPassLib() 60 … prim::kPrimIdentity, prim::kPrimMomentum, prim::kPrimMul, prim::kPrimPow}); in OptimizeIRPassLib() 62 …MakeSubstitution(std::make_shared<ArithmeticSimplify2>(), "arithmetic_simplify2", {prim::kPrimMul}… in OptimizeIRPassLib() 65 {prim::kPrimInsertGradientOf, prim::kPrimStopGradient, prim::kPrimHookBackward, in OptimizeIRPassLib() 66 … prim::kPrimPrintShapeType, prim::kPrimGetRefValue, prim::kPrimMirror, prim::kPrimVirtualDiv}); in OptimizeIRPassLib() 69 …MakeSubstitution(std::make_shared<ZeroLikeFillZero>(), "zero_like_fill_zero", prim::kPrimZerosLike… in OptimizeIRPassLib() 71 …MakeSubstitution(std::make_shared<AdjustAllReduceMulAdd>(), "adjust_all_reduce_mul_add", prim::kPr… in OptimizeIRPassLib() 77 {prim::kPrimTupleGetItem, prim::kPrimListGetItem}); in OptimizeIRPassLib() 80 {prim::kPrimTupleGetItem, prim::kPrimListGetItem}); in OptimizeIRPassLib() 83 {prim::kPrimTupleSetItem, prim::kPrimListSetItem}); in OptimizeIRPassLib() [all …]
|
/third_party/mindspore/mindspore/ccsrc/frontend/optimizer/irpass/ |
D | less_batch_normalization.cc | 41 {prim::kPrimTupleGetItem, prim::kPrimBatchNorm, prim::kPrimConv2D, prim::kPrimRelu}, 44 {prim::kPrimTupleGetItem, prim::kPrimBatchNorm, prim::kPrimConv2D}, 57 {prim::kPrimTupleGetItem, prim::kPrimBatchNorm, prim::kPrimConv2D, prim::kPrimRelu}, 59 …{kSecondBranchPattern2, {prim::kPrimRelu}, {kSecondBranchStartIndexPattern2, kSecondBranchEndIndex… 71 …{prim::kPrimTupleGetItem, prim::kPrimBatchNorm, prim::kPrimConv2D, prim::kPrimRelu, prim::kPrimTup… 72 …prim::kPrimBatchNorm, prim::kPrimConv2D, prim::kPrimRelu, prim::kPrimTupleGetItem, prim::kPrimBatc… 73 prim::kPrimConv2D}, 76 {prim::kPrimTupleGetItem, prim::kPrimBatchNorm, prim::kPrimConv2D}, 87 {prim::kPrimTupleGetItem, prim::kPrimBatchNorm, prim::kPrimConv2D, prim::kPrimRelu}, 90 {prim::kPrimTupleGetItem, prim::kPrimBatchNorm, prim::kPrimConv2D}, [all …]
|
/third_party/mindspore/mindspore/ccsrc/pipeline/jit/ |
D | resource.cc | 46 {"__and__", prim::kPrimBoolAnd}, // P.bool_and in GetMethodMap() 47 {"__or__", prim::kPrimBoolOr}, // P.bool_or in GetMethodMap() 48 {"__eq__", prim::kPrimBoolEq}, // P.bool_eq in GetMethodMap() 50 {"__bool__", prim::kPrimIdentity} // P.identity in GetMethodMap() 54 … {"__add__", prim::kPrimScalarAdd}, // P.scalar_add in GetMethodMap() 55 … {"__sub__", prim::kPrimScalarSub}, // P.scalar_sub in GetMethodMap() 56 … {"__mul__", prim::kPrimScalarMul}, // P.scalar_mul in GetMethodMap() 59 … {"__mod__", prim::kPrimScalarMod}, // P.scalar_mod in GetMethodMap() 60 … {"__pow__", prim::kPrimScalarPow}, // P.scalar_pow in GetMethodMap() 61 … {"__floor__", prim::kPrimIdentity}, // P.identity in GetMethodMap() [all …]
|
/third_party/mindspore/mindspore/lite/tools/converter/parser/onnx/ |
D | onnx_arithmetic_operation_parser.cc | 52 auto prim = std::make_unique<ops::AddFusion>(); in Parse() local 53 MS_CHECK_TRUE_RET(prim != nullptr, nullptr); in Parse() 54 return prim.release(); in Parse() 58 auto prim = std::make_unique<ops::SubFusion>(); in Parse() local 59 MS_CHECK_TRUE_RET(prim != nullptr, nullptr); in Parse() 60 return prim.release(); in Parse() 64 auto prim = std::make_unique<ops::DivFusion>(); in Parse() local 65 MS_CHECK_TRUE_RET(prim != nullptr, nullptr); in Parse() 66 return prim.release(); in Parse() 70 auto prim = std::make_unique<ops::MulFusion>(); in Parse() local [all …]
|
D | onnx_activation_parser.cc | 29 auto prim = std::make_unique<ops::Activation>(); in Parse() local 30 MS_CHECK_TRUE_RET(prim != nullptr, nullptr); in Parse() 31 prim->set_activation_type(mindspore::ActivationType::RELU); in Parse() 33 return prim.release(); in Parse() 37 auto prim = std::make_unique<ops::Activation>(); in Parse() local 38 MS_CHECK_TRUE_RET(prim != nullptr, nullptr); in Parse() 42 prim->set_alpha(onnx_node_attr.f()); in Parse() 46 prim->set_activation_type(mindspore::ActivationType::LEAKY_RELU); in Parse() 48 return prim.release(); in Parse() 52 auto prim = std::make_unique<ops::PReLUFusion>(); in Parse() local [all …]
|
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/ir_fusion/ |
D | adam_apply_one_with_decay_rule.cc | 38 PrimitivePtr prim = nullptr; in GetFusionNodeInputs() local 39 if (AnfAlgo::CheckPrimitiveType(final_node, prim::kPrimDepend)) { in GetFusionNodeInputs() 40 prim = std::make_shared<Primitive>(kAdamApplyOneWithDecayAssignOpName); in GetFusionNodeInputs() 42 prim = std::make_shared<Primitive>(kAdamApplyOneWithDecayOpName); in GetFusionNodeInputs() 44 …return {NewValueNode(prim), input0, input1, input2, input3, input4, mul0_x, mul1_x, mul2_x, mul3_x… in GetFusionNodeInputs() 50 VectorRef mul0({prim::kPrimMul, mul0_x_, input2_}); in DefinePattern() 51 VectorRef mul1({prim::kPrimMul, mul1_x_, input0_}); in DefinePattern() 52 VectorRef square0({prim::kPrimSquare, input0_}); in DefinePattern() 54 VectorRef mul2({prim::kPrimMul, mul2_x_, input1_}); in DefinePattern() 55 VectorRef mul3({prim::kPrimMul, mul3_x_, square0}); in DefinePattern() [all …]
|
D | adam_apply_one_fusion.cc | 25 VectorRef mul2 = VectorRef({prim::kPrimMul, mul_x_input_vars_[kIndex2], input_vars_[kIndex1]}); in DefinePattern() 27 …VectorRef({prim::kPrimMul, mul_x_input_vars_[kIndex3], VectorRef({prim::kPrimSquare, input_vars_[k… in DefinePattern() 29 VectorRef mul1 = VectorRef({prim::kPrimMul, mul_x_input_vars_[kIndex1], input_vars_[kIndex0]}); in DefinePattern() 30 VectorRef mul0 = VectorRef({prim::kPrimMul, mul_x_input_vars_[kIndex0], input_vars_[kIndex2]}); in DefinePattern() 32 …VectorRef true_div0 = VectorRef({prim_real_div, add0, VectorRef({prim::kPrimAdd, sqrt0, add2_y_})}… in DefinePattern() 34 …{prim::kPrimSub, input_vars_[kIndex3], VectorRef({prim::kPrimMul, input_vars_[kIndex4], true_div0}… in DefinePattern() 40 VectorRef mul2 = VectorRef({prim::kPrimMul, mul_x_input_vars_[kIndex2], input_vars_[kIndex1]}); in DefinePattern() 42 …VectorRef({prim::kPrimMul, mul_x_input_vars_[kIndex3], VectorRef({prim::kPrimSquare, input_vars_[k… in DefinePattern() 44 VectorRef mul1 = VectorRef({prim::kPrimMul, mul_x_input_vars_[kIndex1], input_vars_[kIndex0]}); in DefinePattern() 45 VectorRef mul0 = VectorRef({prim::kPrimMul, mul_x_input_vars_[kIndex0], input_vars_[kIndex2]}); in DefinePattern() [all …]
|
/third_party/mindspore/mindspore/lite/tools/converter/parser/tflite/ |
D | tflite_custom_parser.cc | 77 auto prim = std::make_unique<ops::DetectionPostProcess>(); in DetectPostProcess() local 78 MS_CHECK_TRUE_RET(prim != nullptr, nullptr); in DetectPostProcess() 80 prim->set_format(mindspore::Format::NHWC); in DetectPostProcess() 81 prim->set_input_size(tflite_op->inputs.size()); in DetectPostProcess() 84 …prim->set_scale({attr_map["h_scale"].AsFloat(), attr_map["w_scale"].AsFloat(), attr_map["x_scale"]… in DetectPostProcess() 86 prim->set_nms_iou_threshold(attr_map["nms_iou_threshold"].AsFloat()); in DetectPostProcess() 87 prim->set_nms_score_threshold(attr_map["nms_score_threshold"].AsFloat()); in DetectPostProcess() 88 prim->set_max_detections(attr_map["max_detections"].AsInt64()); in DetectPostProcess() 90 prim->set_detections_per_class(100); in DetectPostProcess() 92 prim->set_detections_per_class(attr_map["detections_per_class"].AsInt64()); in DetectPostProcess() [all …]
|
D | tflite_arithmetic_parser.cc | 58 auto prim = std::make_unique<ops::AddFusion>(); in Parse() local 59 MS_CHECK_TRUE_RET(prim != nullptr, nullptr); in Parse() 63 prim->set_activation_type(GetActivationFunctionType(tflite_attr->fused_activation_function)); in Parse() 65 return prim.release(); in Parse() 74 auto prim = std::make_unique<ops::MulFusion>(); in Parse() local 75 MS_CHECK_TRUE_RET(prim != nullptr, nullptr); in Parse() 81 prim->set_activation_type(GetActivationFunctionType(tflite_attr->fused_activation_function)); in Parse() 83 return prim.release(); in Parse() 92 auto prim = std::make_unique<ops::DivFusion>(); in Parse() local 93 MS_CHECK_TRUE_RET(prim != nullptr, nullptr); in Parse() [all …]
|
D | tflite_activation_parser.cc | 33 auto prim = std::make_unique<ops::Activation>(); in Parse() local 34 MS_CHECK_TRUE_RET(prim != nullptr, nullptr); in Parse() 35 prim->set_activation_type(mindspore::ActivationType::RELU); in Parse() 37 return prim.release(); in Parse() 46 auto prim = std::make_unique<ops::Activation>(); in Parse() local 47 MS_CHECK_TRUE_RET(prim != nullptr, nullptr); in Parse() 48 prim->set_activation_type(mindspore::ActivationType::RELU6); in Parse() 50 return prim.release(); in Parse() 59 auto prim = std::make_unique<ops::Activation>(); in Parse() local 60 MS_CHECK_TRUE_RET(prim != nullptr, nullptr); in Parse() [all …]
|
D | tflite_conv_parser.cc | 37 auto prim = std::make_unique<ops::Conv2DFusion>(); in Parse() local 38 MS_CHECK_TRUE_RET(prim != nullptr, nullptr); in Parse() 40 prim->set_pad({0, 0, 0, 0}); in Parse() 41 prim->set_group(1); in Parse() 42 prim->set_format(mindspore::Format::NHWC); in Parse() 49 prim->set_stride({tflite_attr->stride_h, tflite_attr->stride_w}); in Parse() 50 prim->set_dilation({tflite_attr->dilation_h_factor, tflite_attr->dilation_w_factor}); in Parse() 52 prim->set_pad_mode(padMode); in Parse() 53 prim->set_activation_type(GetActivationFunctionType(tflite_attr->fused_activation_function)); in Parse() 70 prim->set_in_channel(weight_shape[kWeightChannelIn]); in Parse() [all …]
|
/third_party/mindspore/tests/ut/cpp/transform/ |
D | convert_test.cc | 71 bool MakeDfGraph(PrimitivePtr prim, unsigned int nparam) { in MakeDfGraph() argument 72 std::shared_ptr<FuncGraph> anf_graph = MakeFuncGraph(prim, nparam); in MakeDfGraph() 78 …MS_LOG(ERROR) << "DfGraphConvertor convert " << prim->name() << " error, error code is: " << conve… in MakeDfGraph() 82 MS_LOG(ERROR) << "DfGraphConvertor get " << prim->name() << " compute func_graph failed"; in MakeDfGraph() 91 PrimitivePtr conv2d = prim::kPrimConv2D; in TEST_F() 105 auto prim = std::make_shared<Primitive>("MaxPool"); in TEST_F() local 106 FuncGraphPtr anf_graph = MakeFuncGraph(prim, 5); // ary, ksize, stride, padding, data_format in TEST_F() 116 auto prim = prim::kPrimRelu; in TEST_F() local 117 prim->AddAttr("T", MakeValue(static_cast<int64_t>(0))); in TEST_F() 119 auto func_graph = MakeFuncGraph(prim, 1); in TEST_F() [all …]
|
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/common/ |
D | const_input_to_attr_registry.cc | 25 Register(prim::kPrimCast->name(), {1}); in ConstInputToAttrInfoRegistry() 26 Register(prim::kPrimAvgPoolGradVm->name(), {0}); in ConstInputToAttrInfoRegistry() 27 Register(prim::kPrimAvgPool3DGrad->name(), {0}); in ConstInputToAttrInfoRegistry() 29 Register(prim::kPrimConv3DTranspose->name(), {2}); in ConstInputToAttrInfoRegistry() 30 Register(prim::kPrimConv2DBackpropInput->name(), {2}); in ConstInputToAttrInfoRegistry() 31 Register(prim::kPrimConv2DBackpropFilter->name(), {2}); in ConstInputToAttrInfoRegistry() 32 Register(prim::kPrimConv3DBackpropInput->name(), {2}); in ConstInputToAttrInfoRegistry() 33 Register(prim::kPrimConv3DBackpropFilter->name(), {2}); in ConstInputToAttrInfoRegistry() 34 Register(prim::kPrimDepthwiseConv2dNativeBackpropFilter->name(), {1}); in ConstInputToAttrInfoRegistry() 35 Register(prim::kPrimDepthwiseConv2dNativeBackpropInput->name(), {0}); in ConstInputToAttrInfoRegistry() [all …]
|
/third_party/mindspore/mindspore/lite/tools/converter/parser/ |
D | tf_bidirection_gru_cf_fusion.cc | 33 BaseRef GetPrim(const PrimitivePtr &prim) { in GetPrim() argument 34 auto ptr = std::make_shared<CondVar>(std::bind(IsOpType, p1, prim)); in GetPrim() 40 auto prim = std::make_shared<Primitive>(prim_name); in GetPrim() local 41 MS_CHECK_TRUE_MSG(prim != nullptr, nullptr, "is nullptr."); in GetPrim() 42 return GetPrim(prim); in GetPrim() 59 auto concat = VectorRef({GetPrim(prim::kPrimConcat), in_ta_read, switch3_true}); in DefineGruCellPattern() 61 auto matmul = VectorRef({GetPrim(prim::kPrimMatMul), concat, matmul_enter}); in DefineGruCellPattern() 63 auto bias = VectorRef({GetPrim(prim::kPrimBiasAdd), matmul, bias_enter}); in DefineGruCellPattern() 64 auto sigmoid = VectorRef({GetPrim(prim::kPrimActivation), bias}); in DefineGruCellPattern() 65 auto split = VectorRef({GetPrim(prim::kPrimSplit), sigmoid}); in DefineGruCellPattern() [all …]
|
/third_party/mindspore/mindspore/ccsrc/frontend/optimizer/ad/ |
D | kprim.cc | 128 FuncGraphPtr ImportBpropFromMindIR(const PrimitivePtr &prim) { in ImportBpropFromMindIR() argument 129 MS_EXCEPTION_IF_NULL(prim); in ImportBpropFromMindIR() 133 FileUtils::GetRealPath(common::SafeCStr(bprop_mindir_path + prim->name() + kBpropMindIRSuffix)); in ImportBpropFromMindIR() 148 void ExportBpropToMindIR(const PrimitivePtr &prim, const FuncGraphPtr &func_graph) { in ExportBpropToMindIR() argument 149 MS_EXCEPTION_IF_NULL(prim); in ExportBpropToMindIR() 154 Common::CreatePrefixPath(bprop_mindir_path + prim->name() + kBpropMindIRSuffix, true); in ExportBpropToMindIR() 156 …MS_LOG(ERROR) << "Failed to get the realpath of bprop mindir: " << bprop_mindir_path << prim->name… in ExportBpropToMindIR() 163 MS_LOG(WARNING) << "Failed to cache the bprop of op \"" << prim->name() << "\" to file \"" in ExportBpropToMindIR() 170 …Ptr GetPythonOps(const FuncGraphPtr &fg, const AnfNodePtr &origin_node, const PrimitivePtr &prim) { in GetPythonOps() argument 173 MS_EXCEPTION_IF_NULL(prim); in GetPythonOps() [all …]
|
/third_party/mindspore/mindspore/lite/mindir/src/ |
D | mindir.cc | 39 auto prim = static_cast<const schema::Primitive *>(primitive); in MindIR_Activation_GetActivationType() local 40 auto value = prim->value_as_Activation(); in MindIR_Activation_GetActivationType() 41 if (prim != nullptr && value != nullptr) { in MindIR_Activation_GetActivationType() 55 auto prim = static_cast<schema::Primitive *>(*primitive); in MindIR_Activation_SetActivationType() local 56 auto value = prim->value_as_Activation(); in MindIR_Activation_SetActivationType() 57 if (prim != nullptr && value != nullptr) { in MindIR_Activation_SetActivationType() 65 auto new_addr = MindIRMemoryManager::GetInstance()->CreatePrimitiveFromBuilder(fbb, prim); in MindIR_Activation_SetActivationType() 73 auto prim = static_cast<const schema::Primitive *>(primitive); in MindIR_Activation_GetAlpha() local 74 auto value = prim->value_as_Activation(); in MindIR_Activation_GetAlpha() 75 if (prim != nullptr && value != nullptr) { in MindIR_Activation_GetAlpha() [all …]
|
/third_party/mindspore/mindspore/lite/tools/converter/parser/tf/ |
D | tf_arithmetic_parser.cc | 55 auto prim = std::make_unique<ops::AddFusion>(); in Parse() local 56 MS_CHECK_TRUE_RET(prim != nullptr, nullptr); in Parse() 63 return prim.release(); in Parse() 69 auto prim = std::make_unique<ops::SubFusion>(); in Parse() local 70 MS_CHECK_TRUE_RET(prim != nullptr, nullptr); in Parse() 77 return prim.release(); in Parse() 83 auto prim = std::make_unique<ops::MulFusion>(); in Parse() local 84 MS_CHECK_TRUE_RET(prim != nullptr, nullptr); in Parse() 91 return prim.release(); in Parse() 97 auto prim = std::make_unique<ops::DivFusion>(); in Parse() local [all …]
|
D | tf_conv_parser.cc | 30 auto prim = std::make_unique<ops::Conv2DFusion>(); in Parse() local 31 MS_CHECK_TRUE_RET(prim != nullptr, nullptr); in Parse() 32 prim->set_pad({0, 0, 0, 0}); in Parse() 33 prim->set_group(1); in Parse() 36 prim->AddAttr(mindspore::ops::kOriginalFormat, MakeValue<int64_t>(format)); in Parse() 43 prim->set_dilation(dilations); in Parse() 50 prim->set_stride(strides); in Parse() 59 prim->set_kernel_size({kernels[0], kernels[1]}); in Parse() 60 prim->set_out_channel(kernels[3]); in Parse() 61 prim->set_in_channel(kernels[2]); in Parse() [all …]
|
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/graph_kernel/ |
D | graph_kernel_expander.cc | 53 {kAllTarget, OpLevel_0, prim::kPrimAddN}, in GetExpandOps() 54 {kAllTarget, OpLevel_0, prim::kPrimAssignAdd}, in GetExpandOps() 55 {kAllTarget, OpLevel_0, prim::kPrimErfc}, in GetExpandOps() 56 {kAllTarget, OpLevel_1, prim::kPrimExpandDims}, in GetExpandOps() 57 {kAllTarget, OpLevel_0, prim::kPrimGeLU}, in GetExpandOps() 58 {kAllTarget, OpLevel_0, prim::kPrimGeLUGrad}, in GetExpandOps() 59 {kAllTarget, OpLevel_0, prim::kPrimSquare}, in GetExpandOps() 60 {kAllTarget, OpLevel_0, prim::kPrimTile}, in GetExpandOps() 61 {kAscendDevice, OpLevel_0, prim::kLambApplyOptimizerAssign}, in GetExpandOps() 62 {kAscendDevice, OpLevel_0, prim::kLambApplyWeightAssign}, in GetExpandOps() [all …]
|
D | graph_kernel_cluster.cc | 35 {kAllTarget, OpLevel_0, prim::kPrimAbs}, in GetClusterableOpList() 36 {kAllTarget, OpLevel_0, prim::kPrimAdd}, in GetClusterableOpList() 37 {kAllTarget, OpLevel_0, prim::kPrimCast}, in GetClusterableOpList() 38 {kAllTarget, OpLevel_0, prim::kPrimEqual}, in GetClusterableOpList() 39 {kAllTarget, OpLevel_0, prim::kPrimExp}, in GetClusterableOpList() 40 {kAllTarget, OpLevel_0, prim::kPrimInplaceAssign}, in GetClusterableOpList() 41 {kAllTarget, OpLevel_0, prim::kPrimLog}, in GetClusterableOpList() 42 {kAllTarget, OpLevel_0, prim::kPrimMaximum}, in GetClusterableOpList() 43 {kAllTarget, OpLevel_0, prim::kPrimMinimum}, in GetClusterableOpList() 44 {kAllTarget, OpLevel_0, prim::kPrimMul}, in GetClusterableOpList() [all …]
|
/third_party/mindspore/mindspore/lite/tools/converter/parser/caffe/ |
D | caffe_activation_parser.cc | 25 auto prim = std::make_unique<ops::Activation>(); in Parse() local 26 MS_CHECK_TRUE_RET(prim != nullptr, nullptr); in Parse() 27 prim->set_activation_type(mindspore::ActivationType::RELU); in Parse() 32 prim->set_activation_type(mindspore::ActivationType::LEAKY_RELU); in Parse() 33 prim->set_alpha(negative_slope); in Parse() 37 return prim.release(); in Parse() 41 auto prim = std::make_unique<ops::Activation>(); in Parse() local 42 MS_CHECK_TRUE_RET(prim != nullptr, nullptr); in Parse() 43 prim->set_activation_type(mindspore::ActivationType::RELU6); in Parse() 45 return prim.release(); in Parse() [all …]
|
/third_party/mesa3d/src/mesa/tnl/ |
D | t_split_inplace.c | 47 const struct _mesa_prim *prim; member 115 struct _mesa_prim *prim = &split->dstprim[split->dstprim_nr++]; in next_outprim() local 116 memset(prim, 0, sizeof(*prim)); in next_outprim() 117 return prim; in next_outprim() 124 const struct _mesa_prim *prim) in update_index_bounds() argument 126 split->min_index = MIN2(split->min_index, prim->start); in update_index_bounds() 127 split->max_index = MAX2(split->max_index, prim->start + prim->count - 1); in update_index_bounds() 137 const struct _mesa_prim *prim) in get_max_vertices() argument 139 if ((prim->start > split->min_index && in get_max_vertices() 140 prim->start - split->min_index >= split->limit) || in get_max_vertices() [all …]
|
/third_party/mindspore/mindspore/lite/tools/optimizer/graph/ |
D | update_conv2d_param_pass.cc | 25 void SetConvAttr(const PrimitivePtr &prim, const std::vector<int64_t> &kernel_size, int64_t in_chan… in SetConvAttr() argument 27 MS_ASSERT(prim != nullptr); in SetConvAttr() 28 if (prim->GetAttr(ops::kKernelSize) == nullptr) { in SetConvAttr() 29 prim->AddAttr(ops::kKernelSize, MakeValue(kernel_size)); in SetConvAttr() 31 auto origin_kernel_size = GetValue<std::vector<int64_t>>(prim->GetAttr(ops::kKernelSize)); in SetConvAttr() 33 prim->AddAttr(ops::kKernelSize, MakeValue(kernel_size)); in SetConvAttr() 36 …if (prim->GetAttr(ops::kInChannel) == nullptr || GetValue<int64_t>(prim->GetAttr(ops::kInChannel))… in SetConvAttr() 37 prim->AddAttr(ops::kInChannel, MakeValue(in_channel)); in SetConvAttr() 39 …if (prim->GetAttr(ops::kOutChannel) == nullptr || GetValue<int64_t>(prim->GetAttr(ops::kOutChannel… in SetConvAttr() 40 prim->AddAttr(ops::kOutChannel, MakeValue(out_channel)); in SetConvAttr() [all …]
|