Home
last modified time | relevance | path

Searched refs:ori_shape (Results 1 – 23 of 23) sorted by relevance

/third_party/mindspore/mindspore/_extends/graph_kernel/expanders/
Dsquare_sum_v1.py31 ori_shape = x.shape
33 ori_shape = infer_shape_from_fractalnz(ori_shape)
36 for i, _ in enumerate(ori_shape):
43 axis[i] += len(ori_shape)
45 ori_reduced_shape = ori_shape
47 ori_reduced_shape = get_reduced_ori_shape(ori_shape, axis)
48 axis = to_frac_z_axis(ori_shape, axis)
Dsoftmax_grad_ext.py31 ori_shape = x.shape
33 ori_shape = infer_shape_from_fractalnz(ori_shape)
36 for i, _ in enumerate(ori_shape):
43 axis[i] += len(ori_shape)
45 ori_reduced_shape = ori_shape
47 ori_reduced_shape = get_reduced_ori_shape(ori_shape, axis)
48 axis = to_frac_z_axis(ori_shape, axis)
Dsoftmax.py32 ori_shape = input_x.shape
34 ori_shape = infer_shape_from_fractalnz(input_x.shape)
38 axis[i] += len(ori_shape)
40 ori_reduced_shape = get_reduced_ori_shape(ori_shape, axis)
43 axis = to_frac_z_axis(ori_shape, axis)
Dsquare_sum_all.py33 ori_shape = x0.shape
35 for i, _ in enumerate(ori_shape):
D_utils.py168 def to_frac_z_axis(ori_shape, ori_axis): argument
183 shape_len = len(ori_shape)
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_json/
Dsingle_tbe_json_creator.cc153 auto ori_shape = TbeJsonUtils::GetInputOriShapeForTbeBuild(anf_node, real_input_index); in GenInputDescJson() local
157 if (ori_shape.empty()) { in GenInputDescJson()
158 ori_shape.emplace_back(1); in GenInputDescJson()
163 format = TbeAdapter::FormatPass(format, ori_shape.size()); in GenInputDescJson()
168 (*input_desc)[kJOriShape] = ori_shape; in GenInputDescJson()
330 std::vector<int64_t> ori_shape; in GenDescJson() local
331 ori_shape = TbeJsonUtils::GetOutputOriShapeForTbeBuild(anf_node, node_out_idx); in GenDescJson()
332 if (ori_shape.empty()) { in GenDescJson()
333 ori_shape.emplace_back(1); in GenDescJson()
335 shape = ori_shape; in GenDescJson()
[all …]
Dtbe_json_creator.cc398 std::vector<int64_t> ori_shape; in GenDescJson() local
400 ori_shape = TbeJsonUtils::GetOutputOriShapeForTbeBuild(anf_node, node_out_idx); in GenDescJson()
404 if (ori_shape.empty()) { in GenDescJson()
405 ori_shape.emplace_back(1); in GenDescJson()
413 format = tbe::TbeAdapter::FormatPass(format, ori_shape.size()); in GenDescJson()
422 (*output_desc)[kJOriShape] = ori_shape; in GenDescJson()
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/ir_fission/
Ddiag_fission.cc40 const std::vector<size_t> &ori_shape) const { in CreateAssistNode()
43 std::vector<size_t> output_shape(ori_shape); in CreateAssistNode()
45 for (size_t i = 0; i < ori_shape.size(); i++) { in CreateAssistNode()
46 dims = dims * ori_shape[i]; in CreateAssistNode()
48 (void)output_shape.insert(output_shape.end(), ori_shape.begin(), ori_shape.end()); in CreateAssistNode()
Ddiag_fission.h35 const std::vector<size_t> &ori_shape) const;
Ddynamic_gru_v2_grad_fission.cc241 auto ori_shape = AnfAlgo::GetOutputInferShape(node, 0); in CreateHReshape() local
243 if (ori_shape.size() == k3Dims) { in CreateHReshape()
244 shape_tmp = {ori_shape}; in CreateHReshape()
246 shape_tmp = {{IntToSize(1), ori_shape[kDim0], ori_shape[kDim1]}}; in CreateHReshape()
/third_party/mindspore/mindspore/ops/_op_impl/_custom_op/
Dfused_abs_max1_impl.py100 def shape1(tik_instance, input_x_shape, ori_shape, input_x, res): argument
102 if ori_shape == (147, 147):
121 elif ori_shape in ((256, 256), None, (-1, -1)):
142 raise RuntimeError("origin shape %s is not supported" % str(ori_shape))
242 def shape3(tik_instance, input_x_shape, ori_shape, input_x, res): argument
244 if ori_shape == (1000, 1000):
246 elif ori_shape == (1001, 1001):
248 elif ori_shape in ((1024, 1024), None, (-1, -1)):
271 raise RuntimeError("origin shape %s is not supported" % str(ori_shape))
330 def shape6(tik_instance, ori_shape, input_x, res): argument
[all …]
/third_party/mindspore/mindspore/lite/micro/coder/opcoders/nnacl/fp32/
Dpad_fp32_coder.cc57 int PadFP32Coder::ExtendShape(int *shape, int length, const int *ori_shape, int rank) { in ExtendShape() argument
59 MS_CHECK_PTR(ori_shape); in ExtendShape()
64 shape[i] = ori_shape[i - (length - rank)]; in ExtendShape()
Dpad_fp32_coder.h40 int ExtendShape(int *shape, int length, const int *ori_shape, int rank);
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/ir_fusion/
Davgpool_3d_grad_fusion.cc121 AnfNodePtr ConstructMultiplier(const FuncGraphPtr &func_graph, const std::vector<size_t> &ori_shape, in ConstructMultiplier() argument
128 …(void)std::transform(ori_shape.begin(), ori_shape.end(), std::back_inserter(grad_shape), SizeToLon… in ConstructMultiplier()
182 AnfAlgo::SetOutputInferTypeAndShape({kNumberTypeFloat16}, {ori_shape}, value_node.get()); in ConstructMultiplier()
/third_party/mindspore/mindspore/ccsrc/runtime/device/ascend/
Dkernel_select_graph_kernel.cc117 std::vector<int64_t> DefaultToFracNZAxis(const std::vector<size_t> &ori_shape, const std::vector<in… in DefaultToFracNZAxis() argument
119 auto shape_len = SizeToLong(ori_shape.size()); in DefaultToFracNZAxis()
135 std::vector<size_t> GetReducedFracNZShape(const std::vector<size_t> &ori_shape, const std::vector<i… in GetReducedFracNZShape() argument
140 positive_idx.insert(a >= 0 ? LongToSize(a) : ori_shape.size() + LongToSize(a)); in GetReducedFracNZShape()
142 for (size_t i = 0; i < ori_shape.size(); ++i) { in GetReducedFracNZShape()
144 result.push_back(ori_shape[i]); in GetReducedFracNZShape()
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/fp32/
Dpad_fp32.h50 int ExtendShape(int *shape, int length, const int *ori_shape, int rank) const;
Dpad_fp32.cc183 int PadCPUKernel::ExtendShape(int *shape, int length, const int *ori_shape, int rank) const { in ExtendShape() argument
184 if (shape == nullptr || ori_shape == nullptr) { in ExtendShape()
191 shape[i] = ori_shape[i - (length - rank)]; in ExtendShape()
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/graph_kernel/
Ddecrease_compute_precision.cc92 auto ori_shape = AnfAlgo::GetOutputDeviceShape(in_node, in_index); in InsertCastForGraphKernel() local
109 …auto cast = AddCastCNode(func_graph, cur_input, dev_fmt, ori_dtype, new_dtype, ori_shape, new_dtyp… in InsertCastForGraphKernel()
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/tbe/
Dtbe_kernel_build.cc295 auto ori_shape = GetInputShapeForTbeBuild(anf_node, real_input_index); in GenValidInputDescJson() local
305 input_desc_json[kJOriShape] = ori_shape; in GenValidInputDescJson()
523 std::vector<int64_t> ori_shape = GetOutputShapeForTbeBuild(anf_node, *output_idx); in GenOutputList() local
532 output_obj[kJOriShape] = ori_shape; in GenOutputList()
1114 auto ori_shape = AnfAlgo::GetOutputInferShape(anf_node, node_out_idx); in GenDescJson() local
1115 if (ori_shape.empty()) { in GenDescJson()
1116 ori_shape.emplace_back(1); in GenDescJson()
1118 (*output_desc)[kJOriShape] = ori_shape; in GenDescJson()
1131 format = ori_shape.size() == kNCHWShapeSize ? kOpFormat_NCHW : kOpFormat_ND; in GenDescJson()
/third_party/mindspore/mindspore/
D_checkparam.py628 def check_reduce_shape(ori_shape, shape, axis, prim_name): argument
631 exp_shape = [ori_shape[i] for i in range(len(ori_shape)) if i not in axis]
/third_party/mindspore/mindspore/nn/loss/
Dloss.py1062 def _check_reduced_shape_valid(ori_shape, reduced_shape, axis, cls_name): argument
1064 validator.check_reduce_shape(ori_shape, reduced_shape, axis, cls_name)
/third_party/mindspore/mindspore/parallel/nn/
Dtransformer.py808 …query_tensor, key_tensor, value_tensor, batch_size, ori_shape = self._convert_to_2d_tensor(query_t…
882 output = F.reshape(output, ori_shape)
/third_party/mindspore/mindspore/numpy/
Dmath_ops.py5417 ori_shape = index.shape
5427 return P.Concat(0)(tup).reshape(ori_shape)