Home
last modified time | relevance | path

Searched refs:transpose_b (Results 1 – 25 of 86) sorted by relevance

1234

/third_party/mindspore/mindspore/core/ops/
Dmat_mul.cc43 bool transpose_b = GetValue<bool>(transpose_b_ptr); in MatMulInferShape() local
45 int64_t y_row = y_last[static_cast<size_t>(transpose_b)]; in MatMulInferShape()
52 << ", x2 shape " << y_shp << "(transpose_b=" << transpose_b << "})"; in MatMulInferShape()
72 auto y_r = y_shp[(transpose_b ? 1 : 0)]; in MatMulInferShape()
81 auto make_shape = [&transpose_a, &transpose_b](ShapeVector &output, const ShapeVector xshp, in MatMulInferShape()
84 output.push_back(yshp[(transpose_b ? 0 : 1)]); in MatMulInferShape()
103 void MatMul::Init(bool transpose_a, bool transpose_b) { in Init() argument
105 set_transpose_b(transpose_b); in Init()
110 void MatMul::set_transpose_b(bool transpose_b) { (void)AddAttr(kTransposeB, MakeValue(transpose_b))… in set_transpose_b() argument
Dbatch_matmul.cc56 bool transpose_b = GetValue<bool>(transpose_b_ptr); in BatchMatmulInferShape() local
58 int64_t y_row = y_last[static_cast<size_t>(transpose_b)]; in BatchMatmulInferShape()
65 << ", x2 shape " << y_shp << "(transpose_b=" << transpose_b << "})"; in BatchMatmulInferShape()
86 auto y_r = y_shp[y_offset + (transpose_b ? 1 : 0)]; in BatchMatmulInferShape()
95 …auto make_shape = [&transpose_a, &transpose_b, &offset](ShapeVector &output, const ShapeVector xsh… in BatchMatmulInferShape()
110 output.push_back(yshp[y_offset + (transpose_b ? 0 : 1)]); in BatchMatmulInferShape()
129 void BatchMatmul::Init(bool transpose_a, bool transpose_b) { in Init() argument
131 set_transpose_b(transpose_b); in Init()
136 void BatchMatmul::set_transpose_b(bool transpose_b) { (void)AddAttr(kTransposeB, MakeValue(transpos… in set_transpose_b() argument
Daffine.cc22 …nit(const std::vector<int64_t> &contexts, int64_t output_dim, bool transpose_a, bool transpose_b) { in Init() argument
26 this->set_transpose_b(transpose_b); in Init()
37 void Affine::set_transpose_b(bool transpose_b) { (void)AddAttr(kTransposeB, MakeValue(transpose_b))… in set_transpose_b() argument
Dmat_mul.h40 void Init(bool transpose_a = false, bool transpose_b = false);
44 void set_transpose_b(bool transpose_b);
Dbatch_matmul.h37 void Init(bool transpose_a = false, bool transpose_b = false);
41 void set_transpose_b(bool transpose_b);
Daffine.h42 bool transpose_b = false);
58 void set_transpose_b(bool transpose_b);
/third_party/mindspore/tests/ut/python/parallel/
Dtest_auto_star_elimination.py53 def __init__(self, transpose_a=False, transpose_b=False): argument
55 self.fc = P.MatMul(transpose_a=transpose_a, transpose_b=transpose_b)
65 self.fc = CustomMatMul(transpose_b=True)
66 self.fc1 = CustomMatMul(transpose_b=True)
67 self.fc2 = CustomMatMul(transpose_b=True)
68 self.fc3 = CustomMatMul(transpose_b=True)
69 self.fc4 = CustomMatMul(transpose_b=True)
Dtest_batch_matmul.py25 …def __init__(self, mul_weight, batch_matmul_weight, transpose_b=False, strategy1=None, strategy2=N… argument
28 self.batch_matmul = P.BatchMatMul(transpose_b=transpose_b).shard(strategy2)
Dtest_loss_and_optimizer.py49 self.matmul = P.MatMul(transpose_a=False, transpose_b=True).shard(strategy1)
83 self.matmul = P.MatMul(transpose_a=False, transpose_b=True).shard(strategy1)
117 self.matmul = P.MatMul(transpose_a=False, transpose_b=True).shard(strategy1)
152 self.matmul = P.MatMul(transpose_a=False, transpose_b=True).shard(strategy1)
188 self.matmul = P.MatMul(transpose_a=False, transpose_b=True).shard(strategy1)
Dtest_different_type_for_div_op.py48 self.fc_nobias = P.MatMul(transpose_b=True).shard(strategy0)
71 self.fc_nobias = P.MatMul(transpose_b=True).shard(strategy0)
94 self.fc_nobias = P.MatMul(transpose_b=True).shard(strategy0)
Dtest_softmax_cross_entropy_loss.py59 self.matmul = P.MatMul(transpose_b=True).shard(strategy1)
84 self.matmul = P.MatMul(transpose_b=True).shard(strategy1)
109 self.matmul = P.MatMul(transpose_b=True)
Dtest_sum_as_loss.py48 self.fc_nobias = P.MatMul(transpose_b=True).shard(strategy0)
71 self.fc_nobias = P.MatMul(transpose_b=True).shard(strategy0)
Dtest_optimizer_clone_weight.py48 self.matmul = P.MatMul(transpose_a=False, transpose_b=True).shard(strategy1)
83 self.matmul = P.MatMul(transpose_a=False, transpose_b=True).shard(strategy1)
/third_party/mindspore/tests/st/ops/gpu/
Dtest_batch_matmul.py28 def __init__(self, transpose_a=False, transpose_b=False): argument
30 self.batch_matmul = P.BatchMatMul(transpose_a, transpose_b)
109 net = BatchMatMulNet(transpose_b=True)
131 net = BatchMatMulNet(transpose_a=True, transpose_b=True)
168 def __init__(self, transpose_a=False, transpose_b=False): argument
170 self.batch_matmul = P.BatchMatMul(transpose_a, transpose_b)
/third_party/mindspore/tests/st/ops/cpu/
Dtest_matmul.py27 def __init__(self, transpose_a=False, transpose_b=False): argument
29 self.matmul = P.MatMul(transpose_a, transpose_b)
93 net = MatMulNet(transpose_b=True)
108 net = MatMulNet(transpose_a=True, transpose_b=True)
Dtest_batch_matmul.py27 def __init__(self, transpose_a=False, transpose_b=False): argument
29 self.batch_matmul = P.BatchMatMul(transpose_a, transpose_b)
120 net = BatchMatMulNet(transpose_b=True)
145 net = BatchMatMulNet(transpose_a=True, transpose_b=True)
/third_party/mindspore/mindspore/_extends/graph_kernel/expanders/
Dmatmul.py30 self.transpose_b = self.attrs['transpose_b']
41 k_b = self.shape_b[-1] if self.transpose_b else self.shape_b[-2]
65 if self.transpose_b:
/third_party/mindspore/tests/ut/cpp/parallel/
Dstep_auto_parallel_test.cc76 ValuePtr transpose_b = MakeValue(false); in Create_Node() local
78 prim->set_attr("transpose_b", transpose_b); in Create_Node()
118 ValuePtr transpose_b = MakeValue(false); in Create_two_nodes() local
120 prim->set_attr("transpose_b", transpose_b); in Create_two_nodes()
132 prim2->set_attr("transpose_b", transpose_b); in Create_two_nodes()
Dstep_parallel_test.cc153 ValuePtr transpose_b = MakeValue(false); in Make_Manager() local
155 prim1->AddAttr("transpose_b", transpose_b); in Make_Manager()
177 prim2->AddAttr("transpose_b", transpose_b); in Make_Manager()
347 ValuePtr transpose_b = MakeValue(false); in TEST_F() local
349 prim->set_attr("transpose_b", transpose_b); in TEST_F()
502 ValuePtr transpose_b = MakeValue(false); in TEST_F() local
504 prim->set_attr("transpose_b", transpose_b); in TEST_F()
/third_party/mindspore/mindspore/core/abstract/
Dprim_maths.cc286 bool transpose_b = GetValue<bool>(transpose_b_ptr); in InferImplMatMul() local
299 auto y_row = y_shp[(transpose_b ? 1 : 0)]; in InferImplMatMul()
308 auto make_shape = [&transpose_a, &transpose_b](ShapeVector &output, const ShapeVector xshp, in InferImplMatMul()
311 output.push_back(yshp[(transpose_b ? 0 : 1)]); in InferImplMatMul()
353 bool transpose_b = GetValue<bool>(transpose_b_ptr); in InferImplBatchMatMul() local
367 auto y_row = y_shp[offset + (transpose_b ? 1 : 0)]; in InferImplBatchMatMul()
376 auto make_shape = [&transpose_a, &transpose_b](ShapeVector &output, const ShapeVector xshp, in InferImplBatchMatMul()
391 output.push_back(yshp[offset + (transpose_b ? 0 : 1)]); in InferImplBatchMatMul()
/third_party/mindspore/tests/st/auto_parallel/
Dparallel_strategy_search.py183 test_size, prelu_size, transpose_b, matmul_size, num_class): argument
216 self.matmul = P.MatMul(transpose_b=transpose_b)
335 … prelu_size=(1,), transpose_b=True, matmul_size=(1, 12),
342 … prelu_size=(1,), transpose_b=True, matmul_size=(1, 12),
364 … prelu_size=(1,), transpose_b=True, matmul_size=(1, 12),
371 … prelu_size=(1,), transpose_b=True, matmul_size=(1, 12),
/third_party/mindspore/mindspore/ops/composite/
Dmath_ops.py671 def _infer_shape_rem(shape1, shape2, ndim1, ndim2, transpose_b): argument
676 if transpose_b:
800 transpose_b = ndim2_orig == 1
804 ndim1_orig, ndim2_orig, transpose_b)
811 res = P.MatMul(False, transpose_b)(x1, x2)
820 res = P.BatchMatMul(False, transpose_b)(x1, x2)
/third_party/mindspore/tests/st/ops/graph_kernel/
Dtest_matmul_to_mul.py26 self.matmul = P.MatMul(transpose_a=False, transpose_b=False)
34 self.bmm = P.BatchMatMul(transpose_a=False, transpose_b=False)
Dtest_matmul.py26 self.matmul = P.MatMul(transpose_a=True, transpose_b=True)
34 self.matmul = P.MatMul(transpose_a=True, transpose_b=True)
/third_party/mindspore/mindspore/parallel/nn/
Dlayers.py330 transpose_b=True, argument
345 if transpose_b:
354 self.matmul = P.BatchMatMul(transpose_b=transpose_b)
358 self.matmul = P.MatMul(transpose_b=transpose_b)

1234