/third_party/mindspore/mindspore/ccsrc/frontend/operator/ |
D | cc_implementations.h | 31 using ValuePtrList = std::vector<ValuePtr>; 35 ValuePtr ScalarAdd(const ValuePtrList &list); 36 ValuePtr ScalarSub(const ValuePtrList &list); 37 ValuePtr ScalarMul(const ValuePtrList &list); 38 ValuePtr ScalarDiv(const ValuePtrList &list); 39 ValuePtr ScalarMod(const ValuePtrList &list); 40 ValuePtr ScalarPow(const ValuePtrList &list); 41 ValuePtr ScalarFloordiv(const ValuePtrList &list); 42 ValuePtr ScalarUAdd(const ValuePtrList &list); 43 ValuePtr ScalarUSub(const ValuePtrList &list); [all …]
|
D | cc_implementations.cc | 199 …ValuePtr Scalar##op_t(const ValuePtrList &list) { … 204 …ValuePtr x = list[0]; … 205 …ValuePtr y = list[1]; … 271 …ValuePtr Scalar##op_t(const ValuePtrList &list) { … in SCALAR_OP() 275 …ValuePtr x = list[0]; … in SCALAR_OP() 276 …ValuePtr y = list[1]; … in SCALAR_OP() 347 ValuePtr ScalarUAdd(const ValuePtrList &list) { 351 ValuePtr x = list[0]; 356 ValuePtr ScalarUSub(const ValuePtrList &list) { in ScalarUSub() 360 ValuePtr x = list[0]; in ScalarUSub() [all …]
|
/third_party/mindspore/mindspore/core/ir/ |
D | value.h | 41 …::transform(elements.begin(), elements.end(), std::back_inserter(t_list), [](const ValuePtr &ele) { in ValueSequeue() 48 …ValueSequeue(const std::initializer_list<ValuePtr> &elements) : elements_(elements.begin(), elemen… in ValueSequeue() 51 [](const ValuePtr &ele) { return ele->type(); }); in ValueSequeue() 60 const ValuePtr operator[](const std::size_t &dim) const; 74 explicit ValueTuple(const std::vector<ValuePtr> &elements) : ValueSequeue(elements) {} in ValueTuple() 75 ValueTuple(const std::initializer_list<ValuePtr> &elements) : ValueSequeue(elements) {} in ValueTuple() 87 explicit ValueList(const std::vector<ValuePtr> &elements) : ValueSequeue(elements) {} in ValueList() 88 ValueList(const std::initializer_list<ValuePtr> &elements) : ValueSequeue(elements) {} in ValueList() 98 inline ValuePtr MakeValue(const std::vector<ValuePtr> &v) { return std::make_shared<ValueTuple>(v);… in MakeValue() 99 inline ValuePtr MakeValue(std::initializer_list<ValuePtr> v) { return std::make_shared<ValueTuple>(… in MakeValue() [all …]
|
D | anf.h | 59 using ValuePtr = std::shared_ptr<Value>; variable 60 using ValuePtrList = std::vector<ValuePtr>; 274 void add_input_value(const ValuePtr &input_value, const std::string &id) { in add_input_value() 278 …void set_inputs_value(const std::vector<std::pair<ValuePtr, std::string>> &values) { inputs_value_… in set_inputs_value() argument 279 …const std::vector<std::pair<ValuePtr, std::string>> &inputs_value() const { return inputs_value_; } in inputs_value() 300 const std::unordered_map<std::string, ValuePtr> &attrs() const { return attrs_; } in attrs() 301 void set_attrs(const std::unordered_map<std::string, ValuePtr> &attrs) { in set_attrs() 305 void AddAttr(const std::string &name, const ValuePtr &attr) { attrs_[name] = attr; } in AddAttr() 307 ValuePtr GetAttr(const std::string &name) const { in GetAttr() 314 const std::unordered_map<std::string, ValuePtr> &primal_attrs() const { return primal_attrs_; } in primal_attrs() [all …]
|
D | primitive.h | 44 Primitive(const std::string &name, const std::unordered_map<std::string, ValuePtr> &attrs); 55 Primitive &AddAttr(const std::string &name, const ValuePtr &attr) { in AddAttr() 68 Primitive &SetAttrs(const std::unordered_map<std::string, ValuePtr> &attrs) { in SetAttrs() 75 void set_attr(const std::string &attrName, const ValuePtr &attr) { attrs_[attrName] = attr; } in set_attr() 79 ValuePtr GetAttr(const std::string &attrName) const { in GetAttr() 84 const std::unordered_map<std::string, ValuePtr> &attrs() const { return attrs_; } in attrs() 85 …const std::unordered_map<std::string, ValuePtr> &evaluate_added_attrs() const { return evaluate_ad… in evaluate_added_attrs() 86 void set_evaluate_added_attrs(const std::unordered_map<std::string, ValuePtr> &attrs) { in set_evaluate_added_attrs() 130 std::unordered_map<std::string, ValuePtr> attrs_; 131 std::unordered_map<std::string, ValuePtr> evaluate_added_attrs_;
|
D | primal_attr.h | 27 using ValuePtr = std::shared_ptr<Value>; variable 38 …void SetPrimalAttr(const std::unordered_map<std::string, ValuePtr> &primal_attrs) { primal_attrs_ … in SetPrimalAttr() 40 std::unordered_map<std::string, ValuePtr> GetCurrentPrimalAttr() { return primal_attrs_; } in GetCurrentPrimalAttr() 44 std::unordered_map<std::string, ValuePtr> primal_attrs_; 51 explicit PrimalAttrGuard(const std::unordered_map<std::string, ValuePtr> &primal_attrs) { in PrimalAttrGuard()
|
D | cell.h | 42 const std::unordered_map<std::string, ValuePtr> &attrs() const { return attrs_; } in attrs() 43 …void set_attrs(const std::unordered_map<std::string, ValuePtr> &attrs_input) { attrs_ = attrs_inpu… in set_attrs() 45 void AddAttr(const std::string &name, const ValuePtr &attr) { attrs_[name] = attr; } in AddAttr() 47 ValuePtr GetAttr(const std::string &attr_name) const { in GetAttr() 62 std::unordered_map<std::string, ValuePtr> attrs_;
|
/third_party/boost/boost/intrusive/detail/ |
D | tree_value_compare.hpp | 30 template <class From, class ValuePtr> 35 <ValuePtr> 40 < ValuePtr 41 , const typename boost::movelib::pointer_element<ValuePtr>::type>::type> 48 template< class ValuePtr, class KeyCompare, class KeyOfValue, class Ret = bool 50 <typename boost::movelib::pointer_element<ValuePtr>::type, typename KeyOfValue::type>::value > 55 boost::movelib::pointer_element<ValuePtr>::type value_type; 91 … , typename disable_if_smartref_to<U, ValuePtr>::type* = 0) const in operator ()() 108 … , typename disable_if_smartref_to<U, ValuePtr>::type* = 0) const in operator ()() 113 … , typename disable_if_smartref_to<U, ValuePtr>::type* = 0) const in operator ()() [all …]
|
/third_party/mindspore/tests/ut/cpp/parallel/auto_parallel/ |
D | dp_algo_test.cc | 173 ValuePtr transpose_a_0 = MakeValue(false); in SetUp() 174 ValuePtr transpose_b_0 = MakeValue(false); in SetUp() 175 …std::unordered_map<std::string, ValuePtr> attr_0 = {{"transpose_a", transpose_a_0}, {"transpose_b"… in SetUp() 183 ValuePtr transpose_a_1 = MakeValue(false); in SetUp() 184 ValuePtr transpose_b_1 = MakeValue(false); in SetUp() 185 …std::unordered_map<std::string, ValuePtr> attr_1 = {{"transpose_a", transpose_a_1}, {"transpose_b"… in SetUp() 193 ValuePtr transpose_a_2 = MakeValue(false); in SetUp() 194 ValuePtr transpose_b_2 = MakeValue(false); in SetUp() 195 …std::unordered_map<std::string, ValuePtr> attr_2 = {{"transpose_a", transpose_a_2}, {"transpose_b"… in SetUp() 203 ValuePtr transpose_a_3 = MakeValue(false); in SetUp() [all …]
|
D | edge_costmodel_test.cc | 63 ValuePtr transpose_a_1 = MakeValue(false); in SetUp() 64 ValuePtr transpose_b_1 = MakeValue(false); in SetUp() 65 …std::unordered_map<std::string, ValuePtr> attr_1 = {{"transpose_a", transpose_a_1}, {"transpose_b"… in SetUp() 72 ValuePtr transpose_a_2 = MakeValue(false); in SetUp() 73 ValuePtr transpose_b_2 = MakeValue(false); in SetUp() 74 …std::unordered_map<std::string, ValuePtr> attr_2 = {{"transpose_a", transpose_a_2}, {"transpose_b"… in SetUp() 81 ValuePtr transpose_a_3 = MakeValue(false); in SetUp() 82 ValuePtr transpose_b_3 = MakeValue(false); in SetUp() 83 …std::unordered_map<std::string, ValuePtr> attr_3 = {{"transpose_a", transpose_a_3}, {"transpose_b"… in SetUp() 90 ValuePtr transpose_a_4 = MakeValue(false); in SetUp() [all …]
|
D | graph_costmodel_test.cc | 72 ValuePtr transpose_a_0 = MakeValue(false); in SetUp() 73 ValuePtr transpose_b_0 = MakeValue(false); in SetUp() 74 …std::unordered_map<std::string, ValuePtr> attr_0 = {{"transpose_a", transpose_a_0}, {"transpose_b"… in SetUp() 81 ValuePtr transpose_a_1 = MakeValue(false); in SetUp() 82 ValuePtr transpose_b_1 = MakeValue(false); in SetUp() 83 …std::unordered_map<std::string, ValuePtr> attr_1 = {{"transpose_a", transpose_a_1}, {"transpose_b"… in SetUp() 90 ValuePtr transpose_a_2 = MakeValue(false); in SetUp() 91 ValuePtr transpose_b_2 = MakeValue(false); in SetUp() 92 …std::unordered_map<std::string, ValuePtr> attr_2 = {{"transpose_a", transpose_a_2}, {"transpose_b"… in SetUp() 99 ValuePtr transpose_a_3 = MakeValue(false); in SetUp() [all …]
|
/third_party/mindspore/mindspore/ccsrc/pipeline/jit/parse/ |
D | data_converter.cc | 42 using InstanceConvertFunc = std::function<ValuePtr(const py::object &, bool, const TypePtr &)>; 52 virtual ValuePtr ConvertPyObject(const py::object &obj, bool use_sig, const TypePtr &dtype) { in ConvertPyObject() 64 using ArgsObjConvertFunc = std::function<ValuePtr(const py::object &)>; 65 using ArgsObjSigConvertFunc = std::function<ValuePtr(const py::object &, bool)>; 66 using ArgsOjbTypeConvertFunc = std::function<ValuePtr(const py::object &, const TypePtr &)>; 74 explicit ByTypeDataConverter(const ValuePtr &converted_type) in ByTypeDataConverter() 76 …[converted_type](const py::object &, bool, const TypePtr &) -> ValuePtr { return converted_type; }… in ByTypeDataConverter() 80 …[convert_func](const py::object &obj, bool, const TypePtr &) -> ValuePtr { return convert_func(obj… in ByTypeDataConverter() 83 … : DataConverter([convert_func](const py::object &obj, bool use_sig, const TypePtr &) -> ValuePtr { in ByTypeDataConverter() 88 … : DataConverter([convert_func](const py::object &obj, bool, const TypePtr &dtype) -> ValuePtr { in ByTypeDataConverter() [all …]
|
/third_party/mindspore/mindspore/ccsrc/transform/graph_ir/ |
D | op_adapter_util.h | 28 static Q ConvertAnyUtil(const ValuePtr &value, const AnyTraits<P> &, const AnyTraits<Q> &) { in ConvertAnyUtil() 32 GeTensor ConvertAnyUtil(const ValuePtr &value, const AnyTraits<mindspore::tensor::Tensor> &traits); 34 std::vector<int64_t> ConvertAnyUtil(const ValuePtr &value, const std::string &name, 37 std::string ConvertAnyUtil(const ValuePtr &value, const AnyTraits<std::vector<int64_t>>, const AnyT… 39 std::vector<float> ConvertAnyUtil(const ValuePtr &value, const AnyTraits<std::vector<float>>, const… 41 std::vector<int64_t> ConvertAnyUtil(const ValuePtr &value, const std::string &format, 44 GeDataType ConvertAnyUtil(const ValuePtr &value, const AnyTraits<GEType>); 47 std::vector<Q> ConvertAnyUtil(const ValuePtr &value, AnyTraits<P>, const AnyTraits<std::vector<Q>>)… in ConvertAnyUtil() 61 GeTensor ConvertAnyUtil(const ValuePtr &value, const AnyTraits<AnyValue>);
|
D | op_adapter_util.cc | 30 GeTensor ConvertAnyUtil(const ValuePtr &value, const AnyTraits<mindspore::tensor::Tensor> &) { in ConvertAnyUtil() 38 std::vector<int64_t> ConvertAnyUtil(const ValuePtr &value, const std::string &name, in ConvertAnyUtil() 51 … [](const ValuePtr &val) { return static_cast<int64_t>(GetValue<int64_t>(val)); }); in ConvertAnyUtil() 61 std::string ConvertAnyUtil(const ValuePtr &value, const AnyTraits<std::vector<int64_t>>, const AnyT… in ConvertAnyUtil() 79 std::vector<float> ConvertAnyUtil(const ValuePtr &value, const AnyTraits<std::vector<float>>, const… in ConvertAnyUtil() 88 … [](const ValuePtr &val) { return static_cast<float>(GetValue<float>(val)); }); in ConvertAnyUtil() 92 std::vector<int64_t> ConvertAnyUtil(const ValuePtr &value, const std::string &format, in ConvertAnyUtil() 102 … [](const ValuePtr &val) { return static_cast<int64_t>(GetValue<int64_t>(val)); }); in ConvertAnyUtil() 116 GeDataType ConvertAnyUtil(const ValuePtr &value, const AnyTraits<GEType>) { in ConvertAnyUtil() 131 GeTensor VectorToTensorUtil(const ValuePtr &value) { in VectorToTensorUtil() [all …]
|
D | op_adapter.h | 41 std::unordered_map<std::string, ValuePtr> *extra_attr, in OpAdapterImpl() 91 int setAttr(const OperatorPtr &op, const std::string &attr_key, const ValuePtr &attr_value); 108 std::unordered_map<std::string, ValuePtr> *const extra_attr_; 270 …int setAttr(const OperatorPtr &op, const std::string &attrKey, const ValuePtr &attrValue) override… in setAttr() 282 std::unordered_map<std::string, ValuePtr> GetExtraAttr() override { return extra_attr_; } in GetExtraAttr() 286 static S ConvertAny(const ValuePtr &value, const AnyTraits<S> &) { in ConvertAny() 291 static bool ConvertAny(const ValuePtr &value, const AnyTraits<bool> &, bool reverse) { in ConvertAny() 296 …static Q ConvertAny(const ValuePtr &value, const AnyTraits<P> &traits_from, const AnyTraits<Q> &tr… in ConvertAny() 301 …static GeTensor ConvertAny(const ValuePtr &value, const AnyTraits<mindspore::tensor::Tensor> &trai… in ConvertAny() 307 static int64_t ConvertAny(const ValuePtr &value, const AnyTraits<int64_t>) { in ConvertAny() [all …]
|
/third_party/mindspore/tests/ut/cpp/ir/ |
D | value_test.cc | 43 ValuePtr boolv = std::make_shared<BoolImm>(true); in TEST_F() 51 ValuePtr i64v = std::make_shared<Int64Imm>(2); in TEST_F() 57 ValuePtr f32v = std::make_shared<FP32Imm>(1.0); in TEST_F() 63 ValuePtr sv = std::make_shared<StringImm>("_"); in TEST_F() 69 ValuePtr vv = std::make_shared<AnyValue>(); in TEST_F() 75 ValuePtr tv = std::make_shared<ValueTuple>(std::vector<ValuePtr>({boolv, i64v, f32v, sv, vv})); in TEST_F() 81 ValuePtr rv = std::make_shared<RefKey>("net.weight"); in TEST_F() 90 ValuePtr fv = MakeValue("test"); in TEST_F()
|
/third_party/mindspore/mindspore/core/ops/ |
D | getnext.cc | 32 void GetShapeVector(const ValuePtr &shape_attr, std::vector<std::vector<int64_t>> *shape_vec) { in GetShapeVector() 36 …std::vector<ValuePtr> shape = shape_attr->isa<ValueTuple>() ? shape_attr->cast<ValueTuplePtr>()->v… in GetShapeVector() 38 for (ValuePtr shape_elements : shape) { in GetShapeVector() 39 std::vector<ValuePtr> shape_elements_list = shape_elements->isa<ValueTuple>() in GetShapeVector() 45 [](const ValuePtr &e) -> int64_t { return GetValue<int64_t>(e); }); in GetShapeVector() 62 ValuePtr shape_attr = primitive->GetAttr("shapes"); in GetnextInferShape() 63 ValuePtr min_shape_attr = primitive->GetAttr("min_shapes"); in GetnextInferShape() 64 ValuePtr max_shape_attr = primitive->GetAttr("max_shapes"); in GetnextInferShape()
|
/third_party/mindspore/mindspore/core/abstract/ |
D | prim_statement.cc | 50 ValuePtr v = cond->GetValueTrack(); in InferImplSwitch() 115 std::vector<ValuePtr> GetSupportedTargetValue() { in GetSupportedTargetValue() 116 std::vector<ValuePtr> list = {kNone, MakeValue(false), MakeValue(true)}; in GetSupportedTargetValue() 120 bool SupportedIsTargetValue(const ValuePtr t) { in SupportedIsTargetValue() 122 auto match = std::any_of(list.begin(), list.end(), [&t](const ValuePtr &v) { return *v == *t; }); in SupportedIsTargetValue() 132 ValuePtr t = args_spec_list[1]->BuildValue(); in InferImplIs_() 137 ValuePtr x = args_spec_list[0]->BuildValue(); in InferImplIs_() 148 ValuePtr t = args_spec_list[1]->BuildValue(); in InferImplIsNot() 154 ValuePtr x = args_spec_list[0]->BuildValue(); in InferImplIsNot() 165 ValuePtr key_value = key->BuildValue(); in IsInDict() [all …]
|
D | abstract_value.h | 50 explicit AbstractBase(const ValuePtr &value = nullptr, const TypePtr &type = kAnyType, 60 void set_value(const ValuePtr &value) { value_ = value; } in set_value() 65 ValuePtr GetValueTrack() const { return value_; } in GetValueTrack() 71 ValuePtr BuildValue() const; 95 virtual ValuePtr RealBuildValue() const { return kAnyValue; } in RealBuildValue() 98 ValuePtr value_; 107 AbstractScalar(const ValuePtr &value, const TypePtr &type) : AbstractBase(value, type) {} in AbstractScalar() 108 explicit AbstractScalar(const ValuePtr &value) : AbstractBase(value, value->type()) {} in AbstractScalar() 176 AbstractScript(const ValuePtr &value, const TypePtr &type) : AbstractBase(value, type) {} in AbstractScript() 177 explicit AbstractScript(const ValuePtr &value) : AbstractBase(value, kString) {} in AbstractScript() [all …]
|
/third_party/mindspore/mindspore/ccsrc/utils/ |
D | convert_utils_py.cc | 110 using ConverterFunction = std::function<py::object(const ValuePtr &value)>; 118 [](const ValuePtr &value) -> py::object { return ScalarPtrToPyData(value->cast<ScalarPtr>()); }}, in __anone0198b6c0102() 121 [](const ValuePtr &value) -> py::object { in __anone0198b6c0202() 127 [](const ValuePtr &value) -> py::object { in __anone0198b6c0302() 134 [](const ValuePtr &value) -> py::object { in __anone0198b6c0402() 141 [](const ValuePtr &value) -> py::object { in __anone0198b6c0502() 148 [](const ValuePtr &value) -> py::object { in __anone0198b6c0602() 154 [](const ValuePtr &value) -> py::object { in __anone0198b6c0702() 167 [](const ValuePtr &value) -> py::object { in __anone0198b6c0802() 177 [](const ValuePtr &value) -> py::object { in __anone0198b6c0902() [all …]
|
/third_party/mindspore/mindspore/ccsrc/frontend/parallel/tensor_layout/ |
D | construct_operator.cc | 35 ValuePtr param_value = MakeValue(shape); in SkipRedisReshapeOP() 49 ValuePtr ptr = MakeValue(shape); in ReshapeOP() 55 ValuePtr param_value = MakeValue(shape); in ReshapeOP() 64 ValuePtr attr_value = MakeValue(value); in CreateStridedSliceOp() 72 ValuePtr param_begin_value = MakeValue(begin); in CreateStridedSliceOp() 74 ValuePtr param_end_value = MakeValue(end); in CreateStridedSliceOp() 77 ValuePtr param_strides_value = MakeValue(strides); in CreateStridedSliceOp() 155 ValuePtr attr_value = MakeValue(group_name); in AllGatherOP() 169 ValuePtr attr_value = MakeValue(concat_dim); in ConcatOP() 185 ValuePtr attr_value_axis = MakeValue(DEFAULT); in SplitOP() [all …]
|
/third_party/mindspore/mindspore/ccsrc/frontend/optimizer/ad/ |
D | kpynative.h | 37 …l bool KPynativeWithFProp(const CNodePtr &c_node, const ValuePtrList &op_args, const ValuePtr &out, 51 const ValuePtr &out); 56 const std::vector<ValuePtr> &input_param_values); 81 const ValuePtr &out); 90 const ValuePtr &out, const FuncGraphPtr &bprop_fg);
|
/third_party/mindspore/mindspore/ccsrc/frontend/parallel/graph_util/ |
D | generate_graph.cc | 53 ValuePtr CreatOpInstance(const OperatorAttrs &attrs, const OperatorName &op_name, const std::string… in CreatOpInstance() 65 ValuePtr op_instance = nullptr; in CreatOpInstance() 74 AnfNodePtr ValuePtrToAnfNodePtr(const ValuePtr &value_ptr) { in ValuePtrToAnfNodePtr() 87 ValuePtr value_ptr = MakeValue(tensor_ptr); in CreateInt32Tensor() 94 ValuePtr value_ptr = MakeValue(std::make_shared<Int>(value)); in CreatTypeInt() 99 ValuePtr value_ptr = MakeValue(std::make_shared<Int64Imm>(value)); in CreatInt64Imm() 104 std::vector<ValuePtr> value_list; in CreateTuple() 176 …ValuePtr pyop_instance = CreatOpInstance(attrs, op_name, instance_name_base_ + op_name + std::to_s… in NewOpInst() 187 …ValuePtr pyop_instance = CreatOpInstance(attrs, op_name, instance_name_base_ + std::to_string(name… in NewOpInst()
|
/third_party/mindspore/tests/ut/cpp/pipeline/static_analysis/ |
D | data_test.cc | 55 …std::vector<ValuePtr> value_list = {MakeValue(static_cast<int64_t>(1)), MakeValue(static_cast<int6… in TEST_F() 65 ValuePtr abs_f1_built = abs_f1->BuildValue(); in TEST_F() 70 ValuePtr abs_fg1_built = abs_fg1->BuildValue(); in TEST_F() 76 ValuePtr func_tuple_built = abs_func_tuple->BuildValue(); in TEST_F() 77 …ASSERT_EQ(*func_tuple_built, ValueTuple(std::vector<ValuePtr>{prim::kPrimReturn, prim::kPrimScalar… in TEST_F() 81 ValuePtr func_list_built = abs_func_list->BuildValue(); in TEST_F() 82 …ASSERT_EQ(*func_list_built, ValueList(std::vector<ValuePtr>{prim::kPrimReturn, prim::kPrimScalarAd… in TEST_F() 87 …ASSERT_EQ(*func_tuple_built, ValueTuple(std::vector<ValuePtr>{std::make_shared<Int64Imm>(1), prim:… in TEST_F() 125 std::vector<ValuePtr> vec({weight1, weight2}); in TEST_F() 161 std::unordered_map<std::string, ValuePtr> methods; in TEST_F()
|
/third_party/mindspore/mindspore/ccsrc/frontend/operator/composite/ |
D | do_signature.h | 40 explicit DoSignatureMetaFuncGraph(const std::string &name, const ValuePtr &function) in DoSignatureMetaFuncGraph() 48 const ValuePtr function() const { return function_; } in function() 55 ValuePtr function_; 66 …nerateCNode(const FuncGraphPtr &func_graph, const std::string &func_name, const ValuePtr &function,
|