Home
last modified time | relevance | path

Searched refs:input_index (Results 1 – 25 of 109) sorted by relevance

12345

/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/gpu/
Dgpu_kernel_factory.cc64 for (size_t input_index = 0; input_index < attr.GetInputSize(); ++input_index) { in SupportedTypeList() local
65 type_list = type_list + TypeId2String(attr.GetInputAttr(input_index).first) + in SupportedTypeList()
66 ((input_index == (attr.GetInputSize() - 1)) ? "" : " "); in SupportedTypeList()
69 for (size_t input_index = 0; input_index < attr.GetOutputSize(); ++input_index) { in SupportedTypeList() local
70 type_list = type_list + TypeId2String(attr.GetOutputAttr(input_index).first) + in SupportedTypeList()
71 ((input_index == (attr.GetOutputSize() - 1)) ? "" : " "); in SupportedTypeList()
91 for (size_t input_index = 0; input_index < kernel_info->GetInputNum(); input_index++) { in ReducePrecision() local
92 if (kernel_info->GetInputDeviceType(input_index) == kNumberTypeInt64 && in ReducePrecision()
93 …(iter->second)[attr_index].first.GetInputAttr(input_index % attr_size).first == kNumberTypeInt32) { in ReducePrecision()
94 builder->SetInputDeviceType(kNumberTypeInt32, input_index); in ReducePrecision()
[all …]
/third_party/mindspore/mindspore/lite/tools/converter/quantizer/quant_helper/
Dattention_quant_type_determiner.cc32 auto input_index = node->inputIndex; in DetermineQuantWeight() local
33 MS_CHECK_FALSE_MSG(input_index.empty(), false, "inputIndex is empty."); in DetermineQuantWeight()
34 MS_CHECK_TRUE_MSG(input_index.size() > kInputIndex, false, "invalid access."); in DetermineQuantWeight()
35 auto &input_tensor = graph.allTensors.at(input_index.at(kInputIndex)); in DetermineQuantWeight()
36 MS_CHECK_TRUE_MSG(input_index.size() > kWeightQueryIndex, false, "invalid access."); in DetermineQuantWeight()
37 auto &weight_query_tensor = graph.allTensors.at(input_index.at(kWeightQueryIndex)); in DetermineQuantWeight()
38 MS_CHECK_TRUE_MSG(input_index.size() > kWeightKeyIndex, false, "invalid access."); in DetermineQuantWeight()
39 auto &weight_key_tensor = graph.allTensors.at(input_index.at(kWeightKeyIndex)); in DetermineQuantWeight()
40 MS_CHECK_TRUE_MSG(input_index.size() > kWeightValueIndex, false, "invalid access."); in DetermineQuantWeight()
41 auto &weight_value_tensor = graph.allTensors.at(input_index.at(kWeightValueIndex)); in DetermineQuantWeight()
[all …]
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/gpu/cuda_impl/
Dunique_impl.cu30 int CalUnique(const T *input, int num_elements, S *input_index, S *sorted_index, T *output, S *inde… in CalUnique() argument
46 thrust::device_pointer_cast(input_index), in CalUnique()
49 thrust::device_pointer_cast(input_index), in CalUnique()
50 thrust::device_pointer_cast(input_index) + 1, in CalUnique()
53 thrust::device_pointer_cast(input_index), in CalUnique()
54 thrust::device_pointer_cast(input_index) + num_elements, in CalUnique()
55 thrust::device_pointer_cast(input_index)); in CalUnique()
57 thrust::device_pointer_cast(input_index), in CalUnique()
58 thrust::device_pointer_cast(input_index) + num_elements, in CalUnique()
69 template int CalUnique<float, int>(const float *input, int num_elements, int *input_index, int *sor…
[all …]
Dunsorted_segment_sum.cu23 …for (int input_index = blockIdx.x * blockDim.x + threadIdx.x; input_index < input_dim0 * input_dim… in UnsortedSegmentSum() local
24 input_index += blockDim.x * gridDim.x) { in UnsortedSegmentSum()
25 size_t j = input_index / input_dim1; in UnsortedSegmentSum()
26 size_t k = input_index % input_dim1; in UnsortedSegmentSum()
33 MsAtomicAdd(output_addr + output_index, input_addr[input_index]); in UnsortedSegmentSum()
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/format_type/
Dcheck_consistency.cc30 bool CheckFormatForConsistency(const CNodePtr &node, const size_t input_index) { in CheckFormatForConsistency() argument
33 auto prev_node = AnfAlgo::GetPrevNodeOutput(node, input_index); in CheckFormatForConsistency()
35 string selected_input_format = AnfAlgo::GetInputFormat(node, input_index); in CheckFormatForConsistency()
40 auto cur_groups = trans::GetAttrGroups(node, input_index); in CheckFormatForConsistency()
42 …MS_LOG(ERROR) << "Found inconsistent format! input format " << input_index << ": " << pre_output_f… in CheckFormatForConsistency()
64 …MS_LOG(ERROR) << "Found inconsistent format! input format " << input_index << ": " << pre_output_f… in CheckFormatForConsistency()
69 bool CheckDataTypeForConsistency(const CNodePtr &node, const size_t input_index) { in CheckDataTypeForConsistency() argument
71 TypeId input_data_type = AnfAlgo::GetPrevNodeOutputDeviceDataType(node, input_index); in CheckDataTypeForConsistency()
72 TypeId selected_data_type = AnfAlgo::GetInputDeviceDataType(node, input_index); in CheckDataTypeForConsistency()
76 …MS_LOG(ERROR) << "Found inconsistent dtype! input dtype " << input_index << ": " << TypeIdLabel(in… in CheckDataTypeForConsistency()
/third_party/mindspore/mindspore/ccsrc/runtime/device/ascend/
Dkernel_select_ascend.cc61 for (size_t input_index = 0; input_index < kernel_build_info.GetInputNum(); ++input_index) { in MatchInferOutputDataType() local
62 TypeId input_origin_type = AnfAlgo::GetPrevNodeOutputInferDataType(cnode, input_index); in MatchInferOutputDataType()
63 if (kernel_build_info.GetInputDeviceType(input_index) != input_origin_type) { in MatchInferOutputDataType()
145 for (size_t input_index = 0; input_index < input_num; ++input_index) { in UpdateCurMatchCounts() local
146 …ode = AnfAlgo::VisitKernelWithReturnType(AnfAlgo::GetInputNode(kernel_node, input_index), 0).first; in UpdateCurMatchCounts()
149 …auto base_score = AnfAlgo::IsFeatureMapInput(kernel_node, input_index) ? kFeatureMapBaseScore : kW… in UpdateCurMatchCounts()
153 …if (kernel_build_info.GetInputFormat(input_index) == AnfAlgo::GetPrevNodeOutputFormat(kernel_node,… in UpdateCurMatchCounts()
157 auto prev_device_type = AnfAlgo::GetPrevNodeOutputPrecision(kernel_node, input_index); in UpdateCurMatchCounts()
159 prev_device_type = AnfAlgo::GetPrevNodeOutputDeviceDataType(kernel_node, input_index); in UpdateCurMatchCounts()
161 if (kernel_build_info.GetInputDeviceType(input_index) == prev_device_type) { in UpdateCurMatchCounts()
[all …]
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/
Dkernel_build_info.cc22 std::string KernelBuildInfo::GetInputFormat(size_t input_index) const { in GetInputFormat()
23 if (input_index >= inputs_format_.size()) { in GetInputFormat()
24 MS_LOG(ERROR) << "The index [" << input_index << "] is exceed the number of input node"; in GetInputFormat()
27 return inputs_format_[input_index]; in GetInputFormat()
38 TypeId KernelBuildInfo::GetInputDeviceType(size_t input_index) const { in GetInputDeviceType()
39 if (input_index >= inputs_device_type_.size()) { in GetInputDeviceType()
40 MS_LOG(ERROR) << "The index [" << input_index << "] is exceed the number of input"; in GetInputDeviceType()
43 return inputs_device_type_[input_index]; in GetInputDeviceType()
68 std::string KernelBuildInfo::GetInputReshapeType(size_t input_index) const { in GetInputReshapeType()
72 if (input_index >= input_reshape_type_.size()) { in GetInputReshapeType()
[all …]
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/ir_fusion/
Drefresh_parameter_format.cc28 for (size_t input_index = 0; input_index < input_num; input_index++) { in DoRefresh() local
29 … auto input_kernel_node = AnfAlgo::VisitKernel(AnfAlgo::GetInputNode(cnode, input_index), 0).first; in DoRefresh()
34 auto cnode_input_format = AnfAlgo::GetInputFormat(cnode, input_index); in DoRefresh()
/third_party/mindspore/mindspore/lite/tools/converter/quantizer/
Dquant_cast.cc43 STATUS InsertCastNode(const FuncGraphPtr &graph, const CNodePtr &cnode, size_t input_index, bool is… in InsertCastNode() argument
49 auto input_node = cnode->input(input_index); in InsertCastNode()
56 MS_LOG(DEBUG) << "input: " << input_index << " " << input_cnode->fullname_with_scope() << ": " in InsertCastNode()
79 << " input_" << input_index << ": " in InsertCastNode()
86 if (curr_primitive_quant_param_holder->get_input_quant_params().size() < input_index) { in InsertCastNode()
91 … curr_primitive_quant_param_holder->get_input_quant_params()[input_index - 1]); in InsertCastNode()
105 std::to_string(input_index)); in InsertCastNode()
106 cnode->set_input(input_index, quant_cast_cnode); in InsertCastNode()
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/trt_pass/
Dgraph_partitioner.cc139 for (size_t input_index = 0; input_index < input_num; ++input_index) { in ExistCycleAfterMerge() local
140 auto input_node = AnfAlgo::GetInputNode(node->cast<CNodePtr>(), input_index); in ExistCycleAfterMerge()
163 for (size_t input_index = 0; input_index < input_num; ++input_index) { in MergeParentBranchRecursively() local
164 auto input_node = AnfAlgo::GetInputNode(node->cast<CNodePtr>(), input_index); in MergeParentBranchRecursively()
192 for (size_t input_index = 0; input_index < input_num; ++input_index) { in NodeGrouping() local
193 auto input_node = AnfAlgo::GetInputNode(node->cast<CNodePtr>(), input_index); in NodeGrouping()
/third_party/mindspore/mindspore/ccsrc/runtime/device/cpu/
Dkernel_select_cpu.cc36 bool IsInputNotCNode(const CNodePtr &kernel_node, size_t input_index) { in IsInputNotCNode() argument
37 auto input_node = AnfAlgo::VisitKernel(kernel_node->input(input_index + 1), 0).first; in IsInputNotCNode()
47 for (auto &input_index : input_not_cnode_indexes) { in UpdatePrevNotCNodeFormatDtype() local
48 auto input_node = AnfAlgo::VisitKernel(kernel_node->input(input_index + 1), 0).first; in UpdatePrevNotCNodeFormatDtype()
53 output_types.emplace_back(kernel_attr.GetInputAttr(input_index).first); in UpdatePrevNotCNodeFormatDtype()
82 for (size_t input_index = 0; input_index < input_num; ++input_index) { in GetInputDtypes() local
84 if (IsInputNotCNode(kernel_node, input_index)) { in GetInputDtypes()
85 input_no_cnode_indexes->emplace_back(input_index); in GetInputDtypes()
86 dtype = AnfAlgo::GetPrevNodeOutputInferDataType(kernel_node, input_index); in GetInputDtypes()
88 dtype = AnfAlgo::GetPrevNodeOutputDeviceDataType(kernel_node, input_index); in GetInputDtypes()
[all …]
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/cpu/
Dinsert_cast_cpu.cc72 for (size_t input_index = 0; input_index < in_num; ++input_index) { in InsertCast() local
73 auto prev_node = AnfAlgo::GetPrevNodeOutput(cnode, input_index); in InsertCast()
78 auto cur_input = AnfAlgo::GetInputNode(cnode, input_index); in InsertCast()
83 const std::string dev_fmt = AnfAlgo::GetInputFormat(cnode, input_index); in InsertCast()
86 …if (TypeId device_type = AnfAlgo::GetInputDeviceDataType(cnode, input_index); origin_type != devic… in InsertCast()
91 cnode->set_input(input_index + 1, cast); in InsertCast()
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/aicpu/
Daicpu_kernel_build.cc188 for (size_t input_index = 0; input_index < input_num; input_index++) { in SetNodeInputs() local
191 TypeId input_type = AnfAlgo::GetInputDeviceDataType(anf_node, input_index); in SetNodeInputs()
197 auto input_node = cnode->inputs()[input_index + 1]; in SetNodeInputs()
204 input_shape = AnfAlgo::GetInputDeviceShape(anf_node, input_index); in SetNodeInputs()
303 for (size_t input_index = 0; input_index < input_num; input_index++) { in SetExtInfoInputShapeType() local
304 TypeId input_type = AnfAlgo::GetInputDeviceDataType(anf_node, input_index); in SetExtInfoInputShapeType()
310 auto input_node = cnode->inputs()[input_index + 1]; in SetExtInfoInputShapeType()
317 input_shape = AnfAlgo::GetInputDeviceShape(anf_node, input_index); in SetExtInfoInputShapeType()
320 inputs[input_index].type = input_data_type; in SetExtInfoInputShapeType()
324 inputs[input_index].dims[input_shape_index] = SizeToLong(input_shape[input_shape_index]); in SetExtInfoInputShapeType()
[all …]
Daicpu_kernel_metadata.cc59 for (size_t input_index = 0; input_index < input_num; ++input_index) { in AicpuMetadataInfoForSpecialNodes() local
61 … (void)inputs_type.emplace_back(AnfAlgo::GetPrevNodeOutputInferDataType(kernel_node, input_index)); in AicpuMetadataInfoForSpecialNodes()
/third_party/ffmpeg/libavfilter/dnn/
Ddnn_backend_native_layer_mathbinary.c105 int input_index = 0; in ff_dnn_load_layer_math_binary() local
115 layer->input_operand_indexes[input_index] = (int32_t)avio_rl32(model_file_context); in ff_dnn_load_layer_math_binary()
116 if (layer->input_operand_indexes[input_index] >= operands_num) { in ff_dnn_load_layer_math_binary()
119 input_index++; in ff_dnn_load_layer_math_binary()
128 layer->input_operand_indexes[input_index] = (int32_t)avio_rl32(model_file_context); in ff_dnn_load_layer_math_binary()
129 if (layer->input_operand_indexes[input_index] >= operands_num) { in ff_dnn_load_layer_math_binary()
132 input_index++; in ff_dnn_load_layer_math_binary()
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/host/
Dhost_kernel_metadata.cc44 for (size_t input_index = 0; input_index < input_num; ++input_index) { in HostMetadataInfo() local
46 inputs_type.push_back(AnfAlgo::GetPrevNodeOutputInferDataType(kernel_node, input_index)); in HostMetadataInfo()
/third_party/mindspore/mindspore/ccsrc/runtime/device/ascend/profiling/reporter/
Dgraph_desc_reporter.cc38 auto input_index = input_node_with_index.second; in ReportData() local
41 element.data_type_ = AnfAlgo::GetOutputDeviceDataType(input_node, input_index); in ReportData()
42 element.data_format_ = AnfAlgo::GetOutputFormat(input_node, input_index); in ReportData()
43 element.data_shape_ = AnfAlgo::GetOutputDeviceShape(input_node, input_index); in ReportData()
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/pass/
Dreplace_node_by_proxy.cc34 for (size_t input_index = 0; input_index < input_num; ++input_index) { in GenerateKernelBuildInfo() local
35 inputs_device_format.push_back(AnfAlgo::GetInputFormat(cnode, input_index)); in GenerateKernelBuildInfo()
36 inputs_device_type.push_back(AnfAlgo::GetInputDeviceDataType(cnode, input_index)); in GenerateKernelBuildInfo()
/third_party/mindspore/mindspore/ccsrc/runtime/device/ascend/executor/
Daicpu_ext_info_handle.cc146 bool AicpuExtInfoHandler::UpdateInputShapeAndType(uint32_t input_index, const NotNull<AnfNodePtr> &… in UpdateInputShapeAndType() argument
147 if (input_index >= input_num_) { in UpdateInputShapeAndType()
148 …MS_LOG(ERROR) << "input_index: " << input_index << " >= input_num_: " << input_num_ << ", node: " … in UpdateInputShapeAndType()
152 auto input_shape = AnfAlgo::GetInputDeviceShape(anf_node, input_index); in UpdateInputShapeAndType()
155 if (input_index >= input_shape_and_type_.size()) { in UpdateInputShapeAndType()
156 MS_LOG(ERROR) << "Invalid input_index: " << input_index in UpdateInputShapeAndType()
164 return UpdateShapeAndType(tmp_shape, NOT_NULL(input_shape_and_type_[input_index])); in UpdateInputShapeAndType()
/third_party/mindspore/mindspore/lite/tools/converter/parser/tf/
Dtf_split_parser.cc42 int input_index; in Parse() local
45 input_index = 1; in Parse()
48 input_index = 0; in Parse()
91 if (AddOpInput(tf_op, input_index, inputs) != RET_OK) { in Parse()
/third_party/mindspore/mindspore/ccsrc/fl/server/kernel/
Doptimizer_kernel.h71 for (size_t input_index = 0; input_index < input_num; ++input_index) { in InitServerKernelInputOutputSize() local
72 std::vector<size_t> shape = AnfAlgo::GetPrevNodeOutputInferShape(kernel_node, input_index); in InitServerKernelInputOutputSize()
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/ir_fission/
Ddynamic_gru_v2_grad_fission.cc41 std::map<std::string, size_t> input_index = { variable
71 … (void)gru_v2_hidden_grad_cell_inputs.emplace_back(dynamic_gru_v2_grad_inputs[input_index["dh"]]); in CreateGRUV2HiddenGradCellNode()
81 (void)gru_v2_hidden_grad_cell_inputs.emplace_back(dynamic_gru_v2_grad_inputs[input_index["h"]]); in CreateGRUV2HiddenGradCellNode()
83 …(void)gru_v2_hidden_grad_cell_inputs.emplace_back(dynamic_gru_v2_grad_inputs[input_index["init_h"]… in CreateGRUV2HiddenGradCellNode()
85 (void)gru_v2_hidden_grad_cell_inputs.emplace_back(dynamic_gru_v2_grad_inputs[input_index["dy"]]); in CreateGRUV2HiddenGradCellNode()
86 auto input_dh = dynamic_gru_v2_grad_inputs[input_index["dh"]]; in CreateGRUV2HiddenGradCellNode()
94 …(void)gru_v2_hidden_grad_cell_inputs.emplace_back(dynamic_gru_v2_grad_inputs[input_index["update"]… in CreateGRUV2HiddenGradCellNode()
95 …(void)gru_v2_hidden_grad_cell_inputs.emplace_back(dynamic_gru_v2_grad_inputs[input_index["reset"]]… in CreateGRUV2HiddenGradCellNode()
96 (void)gru_v2_hidden_grad_cell_inputs.emplace_back(dynamic_gru_v2_grad_inputs[input_index["new"]]); in CreateGRUV2HiddenGradCellNode()
97 …(void)gru_v2_hidden_grad_cell_inputs.emplace_back(dynamic_gru_v2_grad_inputs[input_index["hidden_n… in CreateGRUV2HiddenGradCellNode()
[all …]
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/gpu/
Dadd_relu_v2_fusion.cc38 for (size_t input_index = 0; input_index < input_num; ++input_index) { in GenerateKernelBuildInfo() local
39 inputs_type.push_back(AnfAlgo::GetPrevNodeOutputInferDataType(node, input_index)); in GenerateKernelBuildInfo()
Dmatmul_biasadd_fusion.cc38 for (size_t input_index = 0; input_index < input_num; ++input_index) { in GenerateKernelBuildInfo() local
39 inputs_type.push_back(AnfAlgo::GetPrevNodeOutputInferDataType(node, input_index)); in GenerateKernelBuildInfo()
Dadd_relu_grad_v2_fusion.cc38 for (size_t input_index = 0; input_index < input_num; ++input_index) { in GenerateKernelBuildInfo() local
39 inputs_type.push_back(AnfAlgo::GetPrevNodeOutputInferDataType(node, input_index)); in GenerateKernelBuildInfo()

12345