Home
last modified time | relevance | path

Searched refs:matmul (Results 1 – 25 of 166) sorted by relevance

1234567

/third_party/mindspore/tests/ut/python/parallel/
Dtest_comparison_function_info.py60 self.matmul = P.MatMul().shard(strategy1)
64 out = self.matmul(x, y)
83 self.matmul = P.MatMul().shard(strategy1)
87 out = self.matmul(x, y)
106 self.matmul = P.MatMul().shard(strategy1)
110 out = self.matmul(x, y)
130 self.matmul = P.MatMul().shard(strategy1)
134 out = self.matmul(x, y)
154 self.matmul = P.MatMul().shard(strategy1)
158 out = self.matmul(x, y)
[all …]
Dtest_element_wise_function.py60 self.matmul = P.MatMul().shard(strategy1)
65 out = self.matmul(x, y)
86 self.matmul = P.MatMul().shard(strategy1)
91 out = self.matmul(x, y)
112 self.matmul = P.MatMul().shard(strategy1)
117 out = self.matmul(x, y)
137 self.matmul = P.MatMul().shard(strategy1)
142 out = self.matmul(x, y)
162 self.matmul = P.MatMul().shard(strategy1)
167 out = self.matmul(x, y)
[all …]
Dtest_arithmetic.py59 self.matmul = P.MatMul().shard(strategy1)
63 out = self.matmul(x, y)
83 self.matmul = P.MatMul().shard(strategy1)
87 out = self.matmul(x, y)
107 self.matmul = P.MatMul().shard(strategy1)
111 out = self.matmul(x, y)
130 self.matmul = P.MatMul().shard(strategy1)
134 out = self.matmul(x, y)
153 self.matmul = P.MatMul().shard(strategy1)
157 out = self.matmul(x, y)
[all …]
Dtest_auto_parallel_four_matmul.py91 self.matmul = P.MatMul()
94 out = self.matmul(x, y)
95 out = self.matmul(out, z)
96 out = self.matmul(out, w)
97 out = self.matmul(out, b)
117 self.matmul = P.MatMul()
120 out = self.matmul(x, y)
122 out = self.matmul(out, w)
Dtest_loss_and_optimizer.py49 self.matmul = P.MatMul(transpose_a=False, transpose_b=True).shard(strategy1)
53 out = self.matmul(x, self.weight)
83 self.matmul = P.MatMul(transpose_a=False, transpose_b=True).shard(strategy1)
87 out = self.matmul(x, self.weight)
117 self.matmul = P.MatMul(transpose_a=False, transpose_b=True).shard(strategy1)
121 out = self.matmul(x, self.weight)
152 self.matmul = P.MatMul(transpose_a=False, transpose_b=True).shard(strategy1)
156 out = self.matmul(x, self.weight)
188 self.matmul = P.MatMul(transpose_a=False, transpose_b=True).shard(strategy1)
192 out = self.matmul(x, self.weight)
Dtest_auto_parallel_arithmetic.py64 self.matmul = P.MatMul()
68 out = self.matmul(x, y)
93 self.matmul = P.MatMul()
97 out = self.matmul(x, y)
122 self.matmul = P.MatMul()
126 out = self.matmul(x, y)
151 self.matmul = P.MatMul()
155 out = self.matmul(x, y)
Dtest_softmax_cross_entropy_loss.py59 self.matmul = P.MatMul(transpose_b=True).shard(strategy1)
63 out = self.matmul(x, y)
84 self.matmul = P.MatMul(transpose_b=True).shard(strategy1)
88 out = self.matmul(x, y)
109 self.matmul = P.MatMul(transpose_b=True)
113 out = self.matmul(x, y)
Dtest_neighborexchange.py50 self.matmul = P.MatMul()
58 out = self.matmul(x1, x2)
78 self.matmul = P.MatMul()
85 out = self.matmul(x1, x2)
171 self.matmul = P.MatMul()
178 out = self.matmul(x1, x2)
199 self.matmul = P.MatMul()
207 out = self.matmul(x1, x2)
228 self.matmul = P.MatMul()
236 out = self.matmul(x1, x2)
[all …]
Dtest_control_flow.py61 self.matmul = P.MatMul()
66 out = self.matmul(x, self.weight)
74 self.matmul = P.MatMul().shard(strategy1)
84 out = self.matmul(x, self.weight)
Dtest_two_matmul.py134 self.matmul = P.MatMul().shard(strategy1)
135 self.matmul.add_prim_attr("forward_reduce_scatter", True)
139 out = self.matmul(x, y)
158 self.matmul = P.MatMul(transpose_b=True).shard(strategy1)
159 self.matmul.add_prim_attr("forward_reduce_scatter", True)
163 out = self.matmul(x, y)
Dtest_optimizer_clone_weight.py48 self.matmul = P.MatMul(transpose_a=False, transpose_b=True).shard(strategy1)
52 out = self.matmul(x, self.weight)
83 self.matmul = P.MatMul(transpose_a=False, transpose_b=True).shard(strategy1)
87 out = self.matmul(x, self.weight)
Dtest_auto_parallel_reshape.py56 self.matmul = P.MatMul()
61 out = self.matmul(out, self.matmul_weight)
104 self.matmul = P.MatMul()
110 out = self.matmul(out, self.matmul_weight)
130 self.matmul = P.MatMul()
137 out = self.matmul(out, self.matmul_weight)
159 self.matmul = P.MatMul()
164 out = self.matmul(out, self.matmul_weight)
185 self.matmul = P.MatMul()
192 out = self.matmul(out, w)
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/ir_fusion/
Dmatmul_biasadd_fusion.cc27 VectorRef matmul({matmul_var_, x0_, x1_}); in DefinePattern() local
28 VectorRef pattern({prim::kPrimBiasAdd, matmul, x2_}); in DefinePattern()
40 auto matmul = GetAnfNodeByVar(equiv, matmul_var_); in Process() local
41 if (matmul == nullptr || !matmul->isa<CNode>()) { in Process()
47 if (!IsStateEquivalent(node, matmul)) { in Process()
61 AnfAlgo::CopyNodeAttrs(matmul, new_node); in Process()
/third_party/mindspore/tests/st/ops/gpu/
Dtest_matmul_op.py29 self.matmul = P.MatMul()
32 return self.matmul(x, y)
39 self.matmul = P.MatMul()
44 return self.matmul(x, y)
50 self.matmul = C.matmul
53 return self.matmul(x, y)
67 expect1 = np.matmul(x1, y1)
73 expect2 = np.matmul(x2, y2)
88 expect = np.matmul(x, y)
105 expect = np.matmul(x, y)
[all …]
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/buffer_fusion/
Dmatmul_confusiontranspose_fusion_pass.cc31 auto matmul = cnode->input(kIndex1); in MatchMatmulConfusionTranpose() local
32 MS_EXCEPTION_IF_NULL(matmul); in MatchMatmulConfusionTranpose()
33 if (matmul->isa<CNode>() && (AnfAlgo::CheckPrimitiveType(matmul, prim::kPrimMatMul) || in MatchMatmulConfusionTranpose()
34 AnfAlgo::CheckPrimitiveType(matmul, prim::kPrimBatchMatMul))) { in MatchMatmulConfusionTranpose()
35 std::unordered_set<AnfNodePtr> record{cnode, matmul}; in MatchMatmulConfusionTranpose()
/third_party/mindspore/tests/st/ops/ascend/test_tbe_ops/
Dtest_matmul.py27 self.matmul = P.MatMul()
31 return self.matmul(x1_, x2_)
40 matmul = Net()
41 output = matmul(Tensor(x1), Tensor(x2))
47 matmul = Net()
48 output = matmul(Tensor(x1), Tensor(x2))
Dtest_matmul_failed.py29 self.matmul = P.MatMul(transpose_b=True)
33 return self.matmul(x1_, x2_)
41 matmul = Net()
42 output = matmul(Tensor(x1), Tensor(x2))
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/graph_kernel/
Dinsert_pad.cc105 std::tuple<bool, bool, bool> NeedPad(const CNodePtr &matmul, vec *pad_shape_a, vec *pad_shape_b, ve… in NeedPad() argument
107 auto mm_attrs = AnfAlgo::GetCNodePrimitive(matmul)->attrs(); in NeedPad()
114 auto shape_a = AnfAlgo::GetInputDeviceShape(matmul, 0); in NeedPad()
115 auto shape_b = AnfAlgo::GetInputDeviceShape(matmul, 1); in NeedPad()
133 SetNodeAttrSafely("Akg", MakeValue(false), matmul); in NeedPad()
136 SetNodeAttrSafely("Akg", MakeValue(true), matmul); in NeedPad()
149 void InsertPad(const CNodePtr &matmul, const FuncGraphPtr &func_graph, const FuncGraphManagerPtr &m… in InsertPad() argument
152 AnfNodePtrList pad_inp = {NewValueNode(opt::kPrimPadAkg), matmul->input(input_index)}; in InsertPad()
163 std::vector<TypeId> pad_type = {AnfAlgo::GetPrevNodeOutputInferDataType(matmul, 0)}; in InsertPad()
172 std::vector<std::string> input_formats = AnfAlgo::GetAllInputFormats(matmul); in InsertPad()
[all …]
/third_party/mindspore/tests/syntax/simple_expression/
Dtest_super.py31 self.matmul = P.MatMul()
35 out = self.matmul(x, y)
50 self.matmul = P.MatMul()
54 out = self.matmul(x, y)
69 self.matmul = P.MatMul()
73 out = self.matmul(x, y)
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/format_type/
Ddynamic_rnn_grad_reformat.cc37 auto matmul = CheckAnfNodeIfCNodeAndInputSize(split_v->input(1), kMatMulInputTensorNum); in Process() local
38 MS_EXCEPTION_IF_NULL(matmul); in Process()
39 auto input_node_with_idx = AnfAlgo::GetPrevNodeOutput(matmul, 0); in Process()
48 auto matmul_kernel_build_info = AnfAlgo::GetSelectKernelBuildInfo(matmul); in Process()
58 AnfAlgo::SetSelectKernelBuildInfo(matmul_new_builder->Build(), matmul.get()); in Process()
59 AnfAlgo::SetNodeAttr("insert_backend", MakeValue(true), matmul); in Process()
/third_party/mindspore/tests/st/ops/ascend/
Dtest_matmul.py29 self.matmul = P.MatMul()
33 return self.matmul(x1_, x2_)
41 matmul = Net()
42 output = matmul(Tensor(x1), Tensor(x2))
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/gpu/
Dmatmul_biasadd_fusion.cc77 const AnfNodePtr &matmul = AnfAlgo::GetInputNode(utils::cast<CNodePtr>(node), 0); in Process() local
78 MS_EXCEPTION_IF_NULL(matmul); in Process()
79 auto outlist = GetRealNodeUsedList(graph, matmul); in Process()
96 AnfAlgo::CopyNodeAttrs(matmul, fused_node); in Process()
/third_party/mindspore/tests/st/ops/cpu/
Dtest_sparse_tensor_dense_matmul_op.py30 self.matmul = nn.SparseTensorDenseMatmul(adjoint_st, adjoint_dt)
33 return self.matmul(indices, values, dens_shape, dense)
67 out_np = np.matmul(sparse_np, dense_np)
97 out_np = np.matmul(np.transpose(sparse_np, perm), dense_np)
127 out_np = np.matmul(sparse_np, np.transpose(dense_np, perm))
157 out_np = np.matmul(np.transpose(sparse_np, perm), np.transpose(dense_np, perm))
/third_party/mindspore/tests/st/ops/graph_kernel/
Dtest_matmul.py26 self.matmul = P.MatMul(transpose_a=True, transpose_b=True)
29 return self.matmul(x, y)
34 self.matmul = P.MatMul(transpose_a=True, transpose_b=True)
38 res = self.matmul(x, y)
/third_party/mindspore/mindspore/lite/src/ops/populate/
Daffine_populate.cc24 static void ReleaseParam(AffineParameter *affine, MatMulParameter *matmul) { in ReleaseParam() argument
28 if (matmul != nullptr) { in ReleaseParam()
29 free(matmul); in ReleaseParam()

1234567