Browse Source

Change make tuple in core.ops

tags/v1.2.0-rc1
l00591931 4 years ago
parent
commit
680324f225
73 changed files with 82 additions and 82 deletions
  1. +1
    -1
      mindspore/_extends/graph_kernel/model/model.py
  2. +1
    -1
      mindspore/_extends/parse/resources.py
  3. +1
    -1
      mindspore/_extends/parse/trope.py
  4. +1
    -1
      mindspore/ccsrc/debug/anf_ir_utils.cc
  5. +1
    -1
      mindspore/ccsrc/frontend/parallel/ops_info/ops_utils.h
  6. +1
    -1
      mindspore/ccsrc/pipeline/jit/parse/parse_base.h
  7. +1
    -1
      mindspore/ccsrc/pipeline/jit/static_analysis/prim.cc
  8. +1
    -1
      mindspore/ccsrc/transform/graph_ir/convert.cc
  9. +2
    -2
      mindspore/core/base/core_ops.h
  10. +1
    -1
      mindspore/core/ops/lrn.h
  11. +1
    -1
      mindspore/ops/functional.py
  12. +2
    -2
      tests/st/graph_kernel/model/test_split.py
  13. +1
    -1
      tests/ut/cpp/operator/ops_test.cc
  14. +4
    -4
      tests/ut/cpp/python_input/gtest_input/optimizer/opt_test.py
  15. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/adam_apply_one_fusion_test.py
  16. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/adam_apply_one_with_decay_rule.py
  17. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/addn_fission_test.py
  18. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/batch_norm_bert_fission_test.py
  19. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/batch_norm_grad_infer_fission_test.py
  20. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/batch_norm_grad_split.py
  21. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/batchnorm_to_bninfer.py
  22. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/batchnormgrad_to_bninfergrad.py
  23. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/bn_grad_split.py
  24. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/bn_split.py
  25. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/buffer_fusion_test.py
  26. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/check_consistency.py
  27. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/clip_by_norm_no_div_square_sum_fusion.py
  28. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/clip_by_value_fusion.py
  29. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/confusion_mul_grad_fusion.py
  30. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/confusion_softmax_grad_rule.py
  31. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/const_to_attr_strided_slice_grad.py
  32. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/convert_const_input_test.py
  33. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/convert_tuple_input_to_dynamic_input_test.py
  34. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/convert_tuple_output_to_maketuple_test.py
  35. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/derelu_fusion.py
  36. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/eliminate_redundant_op_test.py
  37. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/fused_batch_norm_fusion_test.py
  38. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/getitem_tuple.py
  39. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/hw_opt_test.py
  40. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/insert_memcpy_async_for_getnext.py
  41. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/insert_memcpy_async_for_hccl_op.py
  42. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/insert_trans_op_test.py
  43. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/ir_fusion_test.py
  44. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/lamb_next_mv_rule_test.py
  45. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/lamb_next_mv_with_decay_rule_test.py
  46. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/lamb_next_mv_with_decay_v1_rule.py
  47. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/lamb_next_right_rule_test.py
  48. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/lamb_update_with_lr_rule_fusion.py
  49. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/lamb_update_with_lr_v2_test.py
  50. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/lars_v2_fission_test.py
  51. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/layer_norm_grad_split.py
  52. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/matmul_biasadd_fusion_test.py
  53. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/merge_cast_to_op.py
  54. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/mixed_precision_test.py
  55. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/momentum_lossscale_fusion_test.py
  56. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/mul_add_fusion_test.py
  57. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/mul_addn_fusion_test.py
  58. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/optimize_dependence_test.py
  59. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/reduce_min_fission_test.py
  60. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/remove_internal_output_test.py
  61. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/reshape_transpose_fusion_test.py
  62. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/single_batch_norm_fission_test.py
  63. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/softmax_grad_ext_fusion.py
  64. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/split_fission_test.py
  65. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/square_sum_fusion.py
  66. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/stack_fission_test.py
  67. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/tensor_scatter_update_fission_test.py
  68. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/transdata_split_test.py
  69. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/transpose_reshape_fusion_test.py
  70. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/transpose_transdata_fusion_test.py
  71. +1
    -1
      tests/ut/cpp/python_input/gtest_input/pre_activate/unsorted_segment_sum_fission.py
  72. +1
    -1
      tests/ut/cpp/transform/convert_test.cc
  73. +5
    -5
      tests/ut/python/optimizer/test_python_pass.py

+ 1
- 1
mindspore/_extends/graph_kernel/model/model.py View File

@@ -176,7 +176,7 @@ class PrimLib:
'ReduceSum': Prim(REDUCE),
'ReduceMax': Prim(REDUCE),
'ReduceMin': Prim(REDUCE),
'make_tuple': Prim(CONTROL),
'MakeTuple': Prim(CONTROL),
'ControlDepend': Prim(CONTROL),
'Assign': Prim(ELEMWISE),
'Tanh': Prim(ELEMWISE),


+ 1
- 1
mindspore/_extends/parse/resources.py View File

@@ -121,7 +121,7 @@ convert_object_map = {
T.next: M.ms_next,
T.hasnext: M.hasnext,

T.make_tuple: F.make_tuple,
T.MakeTuple: F.make_tuple,
T.make_dict: F.make_dict,
T.make_list: F.make_list,
T.make_slice: F.make_slice,


+ 1
- 1
mindspore/_extends/parse/trope.py View File

@@ -48,7 +48,7 @@ __all__ = ['add', 'sub', 'mul', 'truediv', 'floordiv', 'mod', 'eq', 'ne', 'lt',
'exp', 'log', 'sin', 'cos', 'tan']


def make_tuple(*elts): # pragma: no cover
def MakeTuple(*elts): # pragma: no cover
"""Tuple builder."""
raise RuntimeError('This operation is not meant to be called directly.')



+ 1
- 1
mindspore/ccsrc/debug/anf_ir_utils.cc View File

@@ -2153,7 +2153,7 @@ class IrParser {

std::vector<ValuePtr> elems;
std::vector<AnfNodePtr> nodes;
nodes.push_back(std::make_shared<ValueNode>(std::make_shared<Primitive>("make_tuple")));
nodes.push_back(std::make_shared<ValueNode>(std::make_shared<Primitive>("MakeTuple")));
ValuePtr elem = nullptr;
AnfNodePtr node = nullptr;
bool node_is_valid = false;


+ 1
- 1
mindspore/ccsrc/frontend/parallel/ops_info/ops_utils.h View File

@@ -325,7 +325,7 @@ constexpr char UNIQUE[] = "Unique";

// Parallel don't care
constexpr char STRING_EQUAL[] = "string_equal";
constexpr char MAKE_TUPLE[] = "make_tuple";
constexpr char MAKE_TUPLE[] = "MakeTuple";
constexpr char MAKE_LIST[] = "make_list";
constexpr char MAKE_DICT[] = "make_dict";
constexpr char MAKE_SLICE[] = "make_slice";


+ 1
- 1
mindspore/ccsrc/pipeline/jit/parse/parse_base.h View File

@@ -118,7 +118,7 @@ const char NAMED_PRIMITIVE_GETITEM[] = "getitem";
const char NAMED_PRIMITIVE_SETITEM[] = "setitem";
const char NAMED_PRIMITIVE_HASNEXT[] = "hasnext";
const char NAMED_PRIMITIVE_BOOL[] = "bool_"; // bool: P.identity
const char NAMED_PRIMITIVE_MAKETUPLE[] = "make_tuple";
const char NAMED_PRIMITIVE_MAKETUPLE[] = "MakeTuple";
const char NAMED_PRIMITIVE_MAKELIST[] = "make_list";
const char NAMED_PRIMITIVE_MAKESLICE[] = "make_slice";
const char NAMED_PRIMITIVE_MAKEDICT[] = "make_dict";


+ 1
- 1
mindspore/ccsrc/pipeline/jit/static_analysis/prim.cc View File

@@ -47,7 +47,7 @@ namespace abstract {
using mindspore::parse::PyObjectWrapper;

std::unordered_set<std::string> prims_to_skip_undetermined_infer{
"make_tuple", "make_list", "switch", "env_setitem", "env_getitem", "Load", "UpdateState"};
"MakeTuple", "make_list", "switch", "env_setitem", "env_getitem", "Load", "UpdateState"};

EvalResultPtr DoSignatureEvaluator::Run(AnalysisEnginePtr engine, const ConfigPtrList &args_conf_list,
AnfNodeConfigPtr out_conf) {


+ 1
- 1
mindspore/ccsrc/transform/graph_ir/convert.cc View File

@@ -625,7 +625,7 @@ void DfGraphConvertor::TraceOutput(const AnfNodePtr node) {
name = GetCNodeTargetFuncName(c);
}

if (name == "make_tuple") {
if (name == "MakeTuple") {
for (unsigned int i = 1; i < c->inputs().size(); i++) {
TraceOutput(c->input(i));
}


+ 2
- 2
mindspore/core/base/core_ops.h View File

@@ -264,7 +264,7 @@ inline const PrimitivePtr kPrimMomentum = std::make_shared<Primitive>("Momentum"
inline const PrimitivePtr kPrimApplyMomentum = std::make_shared<Primitive>("ApplyMomentum");
inline const PrimitivePtr kPrimApplyFtrl = std::make_shared<Primitive>("ApplyFtrl");
inline const PrimitivePtr kPrimLayerNorm = std::make_shared<Primitive>("LayerNorm");
inline const PrimitivePtr kPrimLrn = std::make_shared<Primitive>("Lrn");
inline const PrimitivePtr kPrimLrn = std::make_shared<Primitive>("LRN");
inline const PrimitivePtr kPrimLayerNormGrad = std::make_shared<Primitive>("LayerNormGrad");
inline const PrimitivePtr kPrimLayerNormXBackprop = std::make_shared<Primitive>("LayerNormXBackprop");
inline const PrimitivePtr kPrimLayerNormBetaGammaBackprop = std::make_shared<Primitive>("LayerNormBetaGammaBackprop");
@@ -410,7 +410,7 @@ inline const PrimitivePtr kPrimAssignSub = std::make_shared<Primitive>("AssignSu
inline const PrimitivePtr kPrimSelect = std::make_shared<Primitive>("Select");
inline const PrimitivePtr kPrimCall = std::make_shared<Primitive>("call");

inline const PrimitivePtr kPrimMakeTuple = std::make_shared<Primitive>("make_tuple");
inline const PrimitivePtr kPrimMakeTuple = std::make_shared<Primitive>("MakeTuple");
inline const PrimitivePtr kPrimMakeSlice = std::make_shared<Primitive>("make_slice");
inline const PrimitivePtr kPrimTupleGetItem = std::make_shared<Primitive>(kTupleGetItem);
inline const PrimitivePtr kPrimArrayGetItem = std::make_shared<Primitive>("array_getitem");


+ 1
- 1
mindspore/core/ops/lrn.h View File

@@ -26,7 +26,7 @@

namespace mindspore {
namespace ops {
constexpr auto kNameLRN = "Lrn";
constexpr auto kNameLRN = "LRN";
class LRN : public PrimitiveC {
public:
LRN() : PrimitiveC(kNameLRN) { InitIOName({"x"}, {"y"}); }


+ 1
- 1
mindspore/ops/functional.py View File

@@ -132,7 +132,7 @@ tuple_len = Primitive("tuple_len")
list_len = Primitive("list_len")
tuple_reversed = Primitive("tuple_reversed")
make_range = Primitive("make_range")
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
make_dict = Primitive('make_dict')
make_list = Primitive('make_list')
make_slice = Primitive('make_slice')


+ 2
- 2
tests/st/graph_kernel/model/test_split.py View File

@@ -38,7 +38,7 @@ def first_connected(sp, space):
nodes = [sp.nodes[i] for i in cand[0]]
graphs = sp.resolve_connnected_graphs(nodes)
if len(graphs) != 1:
print("connect check faied: ", nodes)
print("connect check failed: ", nodes)
return False
return True

@@ -245,7 +245,7 @@ def graph_pat_7():
a1 = gb.tensor([1024, 1024], "float32", name="a1")
a = gb.emit("Abs", a0, 'a')
b = gb.emit("Abs", a1, 'b')
c = gb.emit("make_tuple", [a, b], 'c')
c = gb.emit("MakeTuple", [a, b], 'c')
d = gb.tensor([1024, 1024], "float32", name="d")
gb.op("AddN", d, [c])
gb.emit("Abs", d, 'f')


+ 1
- 1
tests/ut/cpp/operator/ops_test.cc View File

@@ -173,7 +173,7 @@ TEST_F(TestOps, HasTypeTest) {

// Data structures
TEST_F(TestOps, MakeTupleTest) {
auto prim = std::make_shared<Primitive>("make_tuple");
auto prim = std::make_shared<Primitive>("MakeTuple");
ASSERT_EQ(prim->name(), kPrimMakeTuple->name());
}



+ 4
- 4
tests/ut/cpp/python_input/gtest_input/optimizer/opt_test.py View File

@@ -579,7 +579,7 @@ def test_elim_sum_shape_one(tag):
def test_tuple_getitem(tag):
""" test_tuple_getitem """
fns = FnDict()
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')

@fns
def make_get_0(x, y):
@@ -603,7 +603,7 @@ def test_tuple_getitem(tag):
def test_tuple_setitem(tag):
""" test_tuple_setitem """
fns = FnDict()
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_setitem = Primitive('tuple_setitem')

@fns
@@ -924,7 +924,7 @@ def test_convert_switch_ops(tag):
add = Primitive(Constants.kScalarAdd)
neg = Primitive('Neg')
tuple_getitem = Primitive(Constants.kTupleGetItem)
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')

@fns
def before(cond, x, y):
@@ -1032,7 +1032,7 @@ def test_reducesum_one(tag):
def test_print_tuple_wrapper(tag):
fns = FnDict()
print_ = Primitive('Print')
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')

@fns
def before1(x, y):


+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/adam_apply_one_fusion_test.py View File

@@ -25,7 +25,7 @@ RealDiv = P.RealDiv()
Sqrt = P.Sqrt()
Square = P.Square()
Assign = P.Assign()
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)
AdamApplyOne = Primitive('AdamApplyOne')
AdamApplyOneAssign = Primitive('AdamApplyOneAssign')


+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/adam_apply_one_with_decay_rule.py View File

@@ -25,7 +25,7 @@ sqrt = P.Sqrt()
real_div = P.RealDiv()
sub = P.Sub()
Assign = P.Assign()
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)
adam_apply_one_with_decay = Primitive('AdamApplyOneWithDecay')
adam_apply_one_with_decay_assign = Primitive('AdamApplyOneWithDecayAssign')


+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/addn_fission_test.py View File

@@ -17,7 +17,7 @@ from mindspore.ops import Primitive
from mindspore.ops import operations as P

addn = P.AddN()
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')


class FnDict:


+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/batch_norm_bert_fission_test.py View File

@@ -16,7 +16,7 @@ from mindspore.ops import Primitive
from mindspore.ops import operations as P
from mindspore.ops import _constants as Constants

make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)
BatchNorm = P.BatchNorm()
BNTrainingReduce = Primitive('BNTrainingReduce')


+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/batch_norm_grad_infer_fission_test.py View File

@@ -16,7 +16,7 @@ from mindspore.ops import Primitive
from mindspore.ops.operations import _grad_ops as G
from mindspore.ops import _constants as Constants

make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)
BatchNormGradTraining = G.BatchNormGrad(is_training=True)
BatchNormGradInfer = G.BatchNormGrad(is_training=False)


+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/batch_norm_grad_split.py View File

@@ -20,7 +20,7 @@ from mindspore.ops import _constants as Constants
batch_norm_grad = G.BatchNormGrad(is_training=True)
bn_training_update_grad = Primitive('BNTrainingUpdateGrad')
bn_training_reduce_grad = Primitive('BNTrainingReduceGrad')
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)




+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/batchnorm_to_bninfer.py View File

@@ -19,7 +19,7 @@ from mindspore.ops import _constants as Constants

batch_norm = P.BatchNorm(is_training=False)
bn_infer = Primitive('BNInfer')
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)




+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/batchnormgrad_to_bninfergrad.py View File

@@ -19,7 +19,7 @@ from mindspore.ops import _constants as Constants

batch_norm_grad = G.BatchNormGrad(is_training=False)
bn_infer_grad = Primitive('BNInferGrad')
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)




+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/bn_grad_split.py View File

@@ -19,7 +19,7 @@ from mindspore.ops import _constants as Constants
from mindspore.common.tensor import Tensor
import mindspore.common.dtype as mstype

make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)
bn_grad = G.BatchNormGrad(is_training=True)
sync_bn_grad = G.SyncBatchNormGrad()


+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/bn_split.py View File

@@ -20,7 +20,7 @@ from mindspore.ops import _constants as Constants
from mindspore.common.tensor import Tensor
import mindspore.common.dtype as mstype

make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)
bn = P.BatchNorm(is_training=True)
sync_bn = inner.SyncBatchNorm()


+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/buffer_fusion_test.py View File

@@ -33,7 +33,7 @@ Fusion_matmul_relu = Primitive('FusionOp_MatMul_ReLU')

Add = P.Add()
Sub = P.Sub()
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')


class FnDict:


+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/check_consistency.py View File

@@ -15,7 +15,7 @@

from mindspore.ops import Primitive

make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
cast = Primitive('Cast')




+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/clip_by_norm_no_div_square_sum_fusion.py View File

@@ -21,7 +21,7 @@ maximum = P.Maximum()
sqrt = P.Sqrt()
greater = P.Greater()
clip_by_norm_no_div_square_sum = Primitive('ClipByNormNoDivSum')
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)




+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/clip_by_value_fusion.py View File

@@ -19,7 +19,7 @@ from mindspore.ops import _constants as Constants
maximum = P.Maximum()
minimum = P.Minimum()
clip_by_value = Primitive('ClipByValue')
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)




+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/confusion_mul_grad_fusion.py View File

@@ -20,7 +20,7 @@ addn = P.AddN()
mul = P.Mul()
reduce_sum = P.ReduceSum()
confusion_mul_grad = Primitive('ConfusionMulGrad')
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)
axis = 1



+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/confusion_softmax_grad_rule.py View File

@@ -20,7 +20,7 @@ mul = P.Mul()
reduce_sum = P.ReduceSum(keep_dims=True)
sub = P.Sub()
confusion_softmax_grad = Primitive('ConfusionSoftmaxGrad')
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)
axis = 2



+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/const_to_attr_strided_slice_grad.py View File

@@ -17,7 +17,7 @@ from mindspore.ops.operations import _grad_ops as G

stridedslicegrad = G.StridedSliceGrad()
backend_stridedslicegrad = Primitive('StridedSliceGrad')
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')


class FnDict:


+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/convert_const_input_test.py View File

@@ -19,7 +19,7 @@ from mindspore.ops import Primitive
from mindspore.ops import operations as P
from mindspore.ops.operations import _grad_ops as G

make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
reshape = P.Reshape()
backend_reshape = Primitive('Reshape')
cast = P.Cast()


+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/convert_tuple_input_to_dynamic_input_test.py View File

@@ -18,7 +18,7 @@ from mindspore.common.tensor import Tensor
from mindspore.ops import Primitive
from mindspore.ops import operations as P

make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
concat = P.Concat()
add = P.Add()



+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/convert_tuple_output_to_maketuple_test.py View File

@@ -16,7 +16,7 @@ from mindspore.ops import Primitive
from mindspore.ops import operations as P
from mindspore.ops import _constants as Constants

make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_get_item = Primitive(Constants.kTupleGetItem)
LSTM = P.LSTM(input_size=10, hidden_size=2, num_layers=1, has_bias=True, bidirectional=False, dropout=0.0)
add = P.Add()


+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/derelu_fusion.py View File

@@ -20,7 +20,7 @@ relu = P.ReLU()
relu_grad = Primitive('ReluGrad')
relu_v2 = Primitive('ReLUV2')
relu_grad_v2 = Primitive('ReluGradV2')
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)




+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/eliminate_redundant_op_test.py View File

@@ -17,7 +17,7 @@ from mindspore.ops import operations as P

add = P.Add()
sub = P.Sub()
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
four2five = Primitive('Four2Five')
five2four = Primitive('Five2Four')
transdata = Primitive("TransData")


+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/fused_batch_norm_fusion_test.py View File

@@ -23,7 +23,7 @@ from mindspore.ops import _constants as Constants
AssignSub = P.AssignSub()
Mul = P.Mul()
Sub = P.Sub()
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)
update_state = Primitive('UpdateState')
U = monad.U


+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/getitem_tuple.py View File

@@ -16,7 +16,7 @@
from mindspore.ops import Primitive
from mindspore.ops import _constants as Constants

make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)




+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/hw_opt_test.py View File

@@ -23,7 +23,7 @@ add = P.Add()
sub = P.Sub()
mul = P.Mul()
max_pool = P.MaxPoolWithArgmax(pad_mode="same", kernel_size=3, strides=2)
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
four2five = Primitive('Four2Five')
five2four = Primitive('Five2Four')
cast = Primitive('Cast')


+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/insert_memcpy_async_for_getnext.py View File

@@ -20,7 +20,7 @@ from mindspore.ops import operations as P

get_next = P.GetNext([ms.float32, ms.int32], [[32, 64], [32]], 2, "")
memcpy_async = Primitive('memcpy_async')
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)




+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/insert_memcpy_async_for_hccl_op.py View File

@@ -21,7 +21,7 @@ depend = P.Depend()
all_reduce = P.AllReduce()
broadcast = P.Broadcast(1)
memcpy_async = Primitive('memcpy_async')
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)
assign_add = P.AssignAdd()
apply_momentun = P.ApplyMomentum()


+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/insert_trans_op_test.py View File

@@ -19,7 +19,7 @@ from mindspore.ops import _constants as Constants
tuple_getitem = Primitive(Constants.kTupleGetItem)
add = P.Add()
max_pool = P.MaxPoolWithArgmax(pad_mode="same", kernel_size=3, strides=2)
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
transdata = Primitive("TransData")




+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/ir_fusion_test.py View File

@@ -23,7 +23,7 @@ tuple_getitem = Primitive(Constants.kTupleGetItem)
add = P.Add()
allreduce = P.AllReduce()
allreduce.add_prim_attr('fusion', 1)
make_tuple = Primitive("make_tuple")
make_tuple = Primitive("MakeTuple")
conv = P.Conv2D(out_channel=64, kernel_size=7, mode=1, pad_mode="valid", pad=0, stride=1, dilation=1, group=1)
bn = P.FusedBatchNorm()
relu = P.ReLU()


+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/lamb_next_mv_rule_test.py View File

@@ -21,7 +21,7 @@ Mul = P.Mul()
RealDiv = P.RealDiv()
Rsqrt = P.Rsqrt()
Sqrt = P.Sqrt()
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)
LambNextMV = Primitive('LambNextMV')



+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/lamb_next_mv_with_decay_rule_test.py View File

@@ -21,7 +21,7 @@ Mul = P.Mul()
RealDiv = P.RealDiv()
Rsqrt = P.Rsqrt()
Sqrt = P.Sqrt()
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)
LambNextMVWithDecay = Primitive('LambNextMVWithDecay')



+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/lamb_next_mv_with_decay_v1_rule.py View File

@@ -21,7 +21,7 @@ mul = P.Mul()
real_div = P.RealDiv()
rsqrt = P.Rsqrt()
sqrt = P.Sqrt()
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)
LambNextMVWithDecayV1 = Primitive('LambNextMVWithDecayV1')



+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/lamb_next_right_rule_test.py View File

@@ -20,7 +20,7 @@ Add = P.Add()
Mul = P.Mul()
Sqrt = P.Sqrt()
Square = P.Square()
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)
LambNextRight = Primitive('LambNextRight')



+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/lamb_update_with_lr_rule_fusion.py View File

@@ -24,7 +24,7 @@ real_div = P.RealDiv()
mul = P.Mul()
sub = P.Sub()
lamb_update_with_lr = Primitive('LambUpdateWithLR')
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)




+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/lamb_update_with_lr_v2_test.py View File

@@ -21,7 +21,7 @@ Mul = P.Mul()
RealDiv = P.RealDiv()
Select = P.Select()
Greater = P.Greater()
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)
LambUpdateWithLrV2 = Primitive('LambUpdateWithLrV2')



+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/lars_v2_fission_test.py View File

@@ -19,7 +19,7 @@ from mindspore.ops import _constants as Constants
lars_v2 = Primitive('LarsV2')
square_sum_all = Primitive('SquareSumAll')
lars_v2_update = Primitive('LarsV2Update')
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)




+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/layer_norm_grad_split.py View File

@@ -17,7 +17,7 @@ from mindspore.ops import Primitive
from mindspore.ops.operations import _grad_ops as G
from mindspore.ops import _constants as Constants

make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)
layer_norm_grad = G.LayerNormGrad()
layer_norm_x_backprop = Primitive('LayerNormXBackprop')


+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/matmul_biasadd_fusion_test.py View File

@@ -17,7 +17,7 @@ from mindspore.ops import operations as P

MatMul = P.MatMul()
BiasAdd = P.BiasAdd()
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')


class FnDict:


+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/merge_cast_to_op.py View File

@@ -15,7 +15,7 @@

from mindspore.ops import Primitive

make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
four2five = Primitive('Four2Five')
five2four = Primitive('Five2Four')
cast = Primitive('Cast')


+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/mixed_precision_test.py View File

@@ -23,7 +23,7 @@ add = P.Add()
sub = P.Sub()
mul = P.Mul()
max_pool = P.MaxPoolWithArgmax(pad_mode="same", kernel_size=3, strides=2)
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
cast = Primitive('Cast')




+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/momentum_lossscale_fusion_test.py View File

@@ -24,7 +24,7 @@ Mul = P.Mul()
ApplyMomentum = P.ApplyMomentum()
FusedMulApplyMomentum = Primitive('FusedMulApplyMomentum')
tuple_getitem = Primitive(Constants.kTupleGetItem)
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
constant = Tensor(1.0, mstype.float32)




+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/mul_add_fusion_test.py View File

@@ -19,7 +19,7 @@ from mindspore.ops import _constants as Constants
add = P.Add()
mul = P.Mul()
fused_mul_add = Primitive('FusedMulAdd')
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)




+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/mul_addn_fusion_test.py View File

@@ -21,7 +21,7 @@ from mindspore.ops import _constants as Constants
addn = P.AddN()
mul = P.Mul()
fused_mul_addn = Primitive('FusedMulAddN')
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)
scalar = Tensor(1.0, mstype.float32)



+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/optimize_dependence_test.py View File

@@ -18,7 +18,7 @@ from mindspore.ops import operations as P
depend = P.Depend()
TransData = Primitive('TransData')
add = P.Add()
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')


class FnDict:


+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/reduce_min_fission_test.py View File

@@ -17,7 +17,7 @@ from mindspore.ops import Primitive
from mindspore.ops import operations as P
from mindspore.ops import _constants as Constants

make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)
reduce_min = P.ReduceMin(keep_dims=False)
reduce_min1 = Primitive('ReduceMin')


+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/remove_internal_output_test.py View File

@@ -19,7 +19,7 @@ from mindspore.ops import _constants as Constants
tuple_getitem = Primitive(Constants.kTupleGetItem)
add = P.Add()
max_pool = P.MaxPoolWithArgmax(pad_mode="same", kernel_size=3, strides=2)
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
trans_data = Primitive("TransData")




+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/reshape_transpose_fusion_test.py View File

@@ -18,7 +18,7 @@ from mindspore.ops import operations as P
Transpose = P.Transpose()
Reshape = P.Reshape()
ConfusionTransposeD = Primitive('ConfusionTransposeD')
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')


class FnDict:


+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/single_batch_norm_fission_test.py View File

@@ -16,7 +16,7 @@ from mindspore.ops import Primitive
from mindspore.ops import operations as P
from mindspore.ops import _constants as Constants

make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)
BatchNorm = P.BatchNorm(is_training=True)
BNTrainingReduce = Primitive('BNTrainingReduce')


+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/softmax_grad_ext_fusion.py View File

@@ -20,7 +20,7 @@ Mul = P.Mul()
ReduceSum = P.ReduceSum(keep_dims=True)
Sub = P.Sub()
SoftmaxGradExt = Primitive('SoftmaxGradExt')
MakeTuple = Primitive('make_tuple')
MakeTuple = Primitive('MakeTuple')
TupleGetItem = Primitive(Constants.kTupleGetItem)
axes = (2, 3)



+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/split_fission_test.py View File

@@ -18,7 +18,7 @@ from mindspore.ops import operations as P
from mindspore.ops import _constants as Constants

split = P.Split(0, 8)
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)
splitv = Primitive('SplitV')



+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/square_sum_fusion.py View File

@@ -16,7 +16,7 @@ from mindspore.ops import Primitive
from mindspore.ops import operations as P
from mindspore.ops import _constants as Constants

make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)
square = P.Square()
reduce_sum = P.ReduceSum()


+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/stack_fission_test.py View File

@@ -18,7 +18,7 @@ from mindspore.ops import Primitive

stack = P.Stack()
concat = P.Concat()
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')


class FnDict:


+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/tensor_scatter_update_fission_test.py View File

@@ -19,7 +19,7 @@ from mindspore.ops import _constants as Constants
tensor_scatter_update = P.TensorScatterUpdate()
tensor_move = Primitive('TensorMove')
scatter_nd_update = Primitive('ScatterNdUpdate')
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)




+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/transdata_split_test.py View File

@@ -19,7 +19,7 @@ from mindspore.ops import _constants as Constants
tuple_getitem = Primitive(Constants.kTupleGetItem)
add = P.Add()
max_pool = P.MaxPoolWithArgmax(pad_mode="same", kernel_size=3, strides=2)
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
four2five = Primitive('Four2Five')
five2four = Primitive('Five2Four')
transdata = Primitive("TransData")


+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/transpose_reshape_fusion_test.py View File

@@ -18,7 +18,7 @@ from mindspore.ops import operations as P
Transpose = P.Transpose()
Reshape = P.Reshape()
ConfusionTransposeD = Primitive('ConfusionTransposeD')
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')


class FnDict:


+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/transpose_transdata_fusion_test.py View File

@@ -19,7 +19,7 @@ from mindspore.ops import _constants as Constants
tuple_getitem = Primitive(Constants.kTupleGetItem)
add = P.Add()
max_pool = P.MaxPoolWithArgmax(pad_mode="same", kernel_size=3, strides=2)
make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
transdata = Primitive("TransData")
Transpose = P.Transpose()



+ 1
- 1
tests/ut/cpp/python_input/gtest_input/pre_activate/unsorted_segment_sum_fission.py View File

@@ -16,7 +16,7 @@ from mindspore.ops import Primitive
from mindspore.ops import operations as P
from mindspore.ops import _constants as Constants

make_tuple = Primitive('make_tuple')
make_tuple = Primitive('MakeTuple')
tuple_getitem = Primitive(Constants.kTupleGetItem)
unsorted_segment_sum = P.UnsortedSegmentSum()
num_segments = 4


+ 1
- 1
tests/ut/cpp/transform/convert_test.cc View File

@@ -803,7 +803,7 @@ TEST_F(TestConvert, TestConvertGeTensor) {
TEST_F(TestConvert, TestConvertMakeTuple) {
FuncGraphPtr func_graph = std::make_shared<FuncGraph>();
std::vector<AnfNodePtr> inputs;
inputs.push_back(NewValueNode(std::make_shared<Primitive>("make_tuple")));
inputs.push_back(NewValueNode(std::make_shared<Primitive>("MakeTuple")));
for (int i = 0; i < 3; i++) {
auto input = func_graph->add_parameter();
input->set_name("x" + std::to_string(i));


+ 5
- 5
tests/ut/python/optimizer/test_python_pass.py View File

@@ -274,12 +274,12 @@ def test_newparameter_pattern():
new_para_0 = NewParameter("Merlin", default_tensor0)
new_para_1 = NewParameter("Arthur", default_tensor1)
target_0 = Call(P.MatMul(), [new_para_0, new_para_1])
target = Call("make_tuple", [target_0])
target = Call("MakeTuple", [target_0])
return pattern, target
transformed_repr = get_func_graph(softmax_model, inputs).get_return().expanded_str(5)
unregiste_pass(softmax_addn_pass)
assert "MatMul" in transformed_repr
assert "make_tuple" in transformed_repr
assert "MakeTuple" in transformed_repr
assert "Softmax" not in transformed_repr

def test_imm_target():
@@ -296,12 +296,12 @@ def test_imm_target():
x = Any()
pattern = Call(P.Softmax(), [x])
imm = Imm(0)
target_0 = Call("make_tuple", [pattern])
target_0 = Call("MakeTuple", [pattern])
target = Call(Constants.kTupleGetItem, [target_0, imm])
return pattern, target
transformed_repr = get_func_graph(softmax_model, inputs).get_return().expanded_str(5)
unregiste_pass(softmax_pass)
assert "make_tuple" in transformed_repr
assert "MakeTuple" in transformed_repr
assert Constants.kTupleGetItem in transformed_repr
assert "Softmax" in transformed_repr

@@ -323,7 +323,7 @@ def test_gen_new_parameter():
softmax = P.Softmax()
pattern = Call(softmax, [x])

target = Call("make_tuple", [pattern, new_para])
target = Call("MakeTuple", [pattern, new_para])
return pattern, target
transformed_repr = get_func_graph(softmax_model, inputs).get_return().expanded_str(5)
assert "Merlin" in transformed_repr


Loading…
Cancel
Save