Home
last modified time | relevance | path

Searched refs:input_idx (Results 1 – 25 of 46) sorted by relevance

12

/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/enhancer/
Dinsert_pad_for_nms_with_mask.cc65 for (size_t input_idx = 0; input_idx < input_num; input_idx++) { in Process() local
66 auto cur_input = AnfAlgo::GetInputNode(cnode, input_idx); in Process()
67 auto origin_type = AnfAlgo::GetPrevNodeOutputInferDataType(cnode, input_idx); in Process()
68 auto origin_shape = AnfAlgo::GetPrevNodeOutputInferShape(cnode, input_idx); in Process()
/third_party/mindspore/mindspore/ccsrc/backend/session/
Danf_runtime_algorithm.h151 static std::string GetInputFormat(const AnfNodePtr &node, size_t input_idx);
153 …static KernelWithIndex GetPrevNodeOutput(const AnfNodePtr &anf_node, size_t input_idx, bool visit_…
155 static std::string GetPrevNodeOutputFormat(const AnfNodePtr &node, size_t input_idx);
157 static std::string GetPrevNodeOutputReshapeType(const AnfNodePtr &node, size_t input_idx);
163 static std::vector<size_t> GetPrevNodeOutputInferShape(const AnfNodePtr &node, size_t input_idx);
167 static std::vector<size_t> GetInputDeviceShape(const AnfNodePtr &node, size_t input_idx);
179 static TypeId GetPrevNodeOutputInferDataType(const AnfNodePtr &node, size_t input_idx);
183 static TypeId GetInputDeviceDataType(const AnfNodePtr &node, size_t input_idx);
185 static TypeId GetPrevNodeOutputDeviceDataType(const AnfNodePtr &node, size_t input_idx);
195 static const DeviceAddress *GetPrevNodeOutputAddr(const AnfNodePtr &node, size_t input_idx,
[all …]
Danf_runtime_algorithm.cc757 std::string AnfRuntimeAlgorithm::GetInputFormat(const AnfNodePtr &node, size_t input_idx) { in GetInputFormat() argument
759 if (input_idx > GetInputTensorNum(node)) { in GetInputFormat()
760 MS_LOG(EXCEPTION) << "Input index :" << input_idx in GetInputFormat()
766 return GetPrevNodeOutputFormat(node, input_idx); in GetInputFormat()
772 auto format = build_info->GetInputFormat(input_idx); in GetInputFormat()
781 KernelWithIndex AnfRuntimeAlgorithm::GetPrevNodeOutput(const AnfNodePtr &anf_node, size_t input_idx, in GetPrevNodeOutput() argument
791 auto input_node = AnfAlgo::GetInputNode(anf_node->cast<CNodePtr>(), input_idx); in GetPrevNodeOutput()
796 …string AnfRuntimeAlgorithm::GetPrevNodeOutputFormat(const AnfNodePtr &anf_node, size_t input_idx) { in GetPrevNodeOutputFormat() argument
797 KernelWithIndex kernel_with_index = AnfAlgo::GetPrevNodeOutput(anf_node, input_idx); in GetPrevNodeOutputFormat()
801 …tring AnfRuntimeAlgorithm::GetPrevNodeOutputReshapeType(const AnfNodePtr &node, size_t input_idx) { in GetPrevNodeOutputReshapeType() argument
[all …]
Dcpu_session.cc174 for (size_t input_idx = 0; input_idx < input_nodes.size(); ++input_idx) { in LoadInputData() local
175 auto &input_node = input_nodes[input_idx]; in LoadInputData()
181 auto tensor = inputs_const[input_idx]; in LoadInputData()
Dsession_basic.cc181 for (size_t input_idx = 0; input_idx < graph->inputs().size(); input_idx++) { in GetNodeOutputTensorFromInputs() local
182 if (input_idx >= input_tensors.size()) { in GetNodeOutputTensorFromInputs()
183 MS_LOG(EXCEPTION) << "Input idx:" << input_idx << "out of range:" << input_tensors.size(); in GetNodeOutputTensorFromInputs()
185 if (graph->inputs()[input_idx] == node) { in GetNodeOutputTensorFromInputs()
186 return input_tensors[input_idx]; in GetNodeOutputTensorFromInputs()
393 for (size_t input_idx = 0; input_idx < graph->inputs().size(); input_idx++) { in CreateNodeOutputPlaceholder() local
394 if (input_idx >= input_tensors.size()) { in CreateNodeOutputPlaceholder()
395 MS_LOG(EXCEPTION) << "Input idx:" << input_idx << "out of range:" << input_tensors.size(); in CreateNodeOutputPlaceholder()
397 if (graph->inputs()[input_idx] == node) { in CreateNodeOutputPlaceholder()
398 return input_tensors[input_idx]; in CreateNodeOutputPlaceholder()
[all …]
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/graph_kernel/
Dsplit_umonad.cc40 AnfNodePtr ProcessNode(const FuncGraphPtr &func_graph, const AnfNodePtr &node, size_t input_idx) { in ProcessNode() argument
50 …AnfNodePtrList depend_inputs = {NewValueNode(prim::kPrimDepend), original_inputs[input_idx], origi… in ProcessNode()
52 depend_cnode->set_abstract(original_inputs[input_idx]->abstract()); in ProcessNode()
57 if (i == input_idx) { in ProcessNode()
Dsplit_umonad.h33 explicit OpUMonadExpander(size_t input_idx) : input_idx_(input_idx) {} in OpUMonadExpander() argument
/third_party/mindspore/mindspore/_extends/graph_kernel/model/
Dmodel.py110 def default_reshape_relation(self, op, input_idx): argument
112 axis_relation, elem_relation = self.unknown_relation(op, input_idx)
116 def default_elemwise_broadcast_relation(self, op, input_idx): argument
119 in_shape = op.inputs[input_idx].shape
134 def default_reduce_relation(self, op, input_idx): argument
136 axis_relation, elem_relation = self.default_elemwise_broadcast_relation(op, input_idx)
141 def unknown_relation(self, op, input_idx): argument
144 in_shape = op.inputs[input_idx].shape
253 def input_relation(cls, op, input_idx): argument
255 return cls.get_prim(op).relation_func(op, input_idx)
[all …]
/third_party/mindspore/mindspore/lite/tools/converter/parser/tflite/
Dtflite_model_parser.cc391 for (auto input_idx : op->inputs) { in ConvertOpQuantParams() local
392 if (input_idx < 0) { in ConvertOpQuantParams()
393 input_idx += tflite_subgraph->tensors.size(); in ConvertOpQuantParams()
395 const auto &input_tensor = tflite_subgraph->tensors[input_idx]; in ConvertOpQuantParams()
691 auto input_idx = op->inputs.at(i); in ConvertInputTensor() local
692 if (tflite_op_type == tflite::BuiltinOperator_FULLY_CONNECTED && input_idx == -1) { in ConvertInputTensor()
695 if (input_idx < 0) { in ConvertInputTensor()
696 input_idx += tflite_subgraph->tensors.size(); in ConvertInputTensor()
698 const auto &input_tensor = tflite_subgraph->tensors[input_idx]; in ConvertInputTensor()
700 if (anf_node_map->find(input_idx) != anf_node_map->end()) { in ConvertInputTensor()
[all …]
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/
Dunique_cpu_kernel.h241 IndexType *input_idx = params->input_idx_; in Unique() local
245 MS_EXCEPTION_IF_NULL(input_idx); in Unique()
254 input_idx[i] = i; in Unique()
256 std::sort(input_idx, input_idx + params->input_size_, in Unique()
260 auto curr = input[input_idx[i]]; in Unique()
266 inverse_idx[input_idx[i]] = j; in Unique()
269 inverse_idx[input_idx[i]] = j; in Unique()
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/gpu/cuda_impl/
Dloss_with_reduction_impl.cu308 int input_idx; in NLLLossKernel() local
315 input_idx = c * i + target_class; in NLLLossKernel()
317 MultiplyDevice(-weight[target_class], input[input_idx], output + i); in NLLLossKernel()
345 int input_idx; in NLLLossGradKernel() local
352 input_idx = (i * c) + target_class; in NLLLossGradKernel()
354 MultiplyDevice(-weight[target_class], dloss[i], dinput + input_idx); in NLLLossGradKernel()
360 input_idx = (i * c) + target_class; in NLLLossGradKernel()
363 MultiplyDevice(tmp_quot, dloss[0], dinput + input_idx); in NLLLossGradKernel()
369 input_idx = (i * c) + target_class; in NLLLossGradKernel()
371 MultiplyDevice(-weight[target_class], dloss[0], dinput + input_idx); in NLLLossGradKernel()
Dtranspose_impl_opt.cu123 …int input_idx = input_block_start_idx + shm_row_id * input_dims[2] + shm_col_id; // the input idx… in Swap3DTensorLast2DimKernel_shared() local
131 input[input_idx]; // each thread load one input data into shared mem in Swap3DTensorLast2DimKernel_shared()
132 input_idx += input_step; // calculate the next input idx this thread should load in Swap3DTensorLast2DimKernel_shared()
138 shm_tile[row_id * (TileWidth + 1) + shm_col_id] = input[input_idx]; in Swap3DTensorLast2DimKernel_shared()
139 input_idx += input_step; in Swap3DTensorLast2DimKernel_shared()
Done_hot_impl.cu30 size_t input_idx = left_idx * right_dim_size + right_idx; in OneHotKernel() local
32 if (indices[input_idx] == d_idx) { in OneHotKernel()
/third_party/ffmpeg/libavfilter/
Df_interleave.c67 int i, nb_eofs = 0, input_idx = -1; in activate() local
119 input_idx = i; in activate()
123 if (input_idx >= 0) { in activate()
127 ret = ff_inlink_consume_frame(ctx->inputs[input_idx], &frame); in activate()
Daf_join.c92 int input_idx, out_ch_idx, in_ch_idx; in parse_maps() local
134 input_idx = strtol(cur, &cur, 0); in parse_maps()
135 if (input_idx < 0 || input_idx >= s->inputs) { in parse_maps()
137 input_idx); in parse_maps()
151 s->channels[out_ch_idx].input = input_idx; in parse_maps()
/third_party/mindspore/mindspore/ccsrc/fl/server/kernel/
Doptimizer_kernel_factory.cc41 size_t input_idx = input_name_to_idx.at(name); in Matched() local
42 TypeId kernel_node_input_type = AnfAlgo::GetPrevNodeOutputInferDataType(kernel_node, input_idx); in Matched()
Daggregation_kernel_factory.cc42 size_t input_idx = input_name_to_idx.at(name); in Matched() local
43 TypeId kernel_node_input_type = AnfAlgo::GetPrevNodeOutputInferDataType(kernel_node, input_idx); in Matched()
/third_party/mindspore/mindspore/ccsrc/runtime/device/cpu/
Dcpu_kernel_runtime.cc290 size_t input_idx = 0; in CreateOutputTensors() local
293 input_param_tensor_map_[item] = inputs[input_idx]; in CreateOutputTensors()
294 input_idx++; in CreateOutputTensors()
313 for (size_t input_idx = 0; input_idx < input_nodes.size(); ++input_idx) { in BindInputTensorAddressPtr() local
314 auto &item = input_nodes[input_idx]; in BindInputTensorAddressPtr()
320 auto tensor = inputs[input_idx]; in BindInputTensorAddressPtr()
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/fp16_grad/
Dstrided_slice_grad.c55 size_t input_idx = in DoStridedSliceFp16Grad() local
61 output[input_idx] = inputs[pos]; in DoStridedSliceFp16Grad()
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/fp32_grad/
Dstrided_slice_grad.c54 size_t input_idx = in DoStridedSliceGrad() local
62 output[input_idx] = inputs[pos]; in DoStridedSliceGrad()
/third_party/mindspore/mindspore/lite/tools/converter/legacy_optimizer/graph/
Dtopological_sort_pass.cc88 … [&](size_t input_idx) { return IsContain(sinked_tensor_idxes, size_t(input_idx)); }); in IsNodeNonDepend() argument
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/mem_reuse/
Dmem_reuse.cc264 KernelRefCountPtr MemReuseUtil::GetKernelInputRef(const CNodePtr &kernel, size_t input_idx) { in GetKernelInputRef() argument
265 if (input_idx >= AnfAlgo::GetInputTensorNum(kernel)) { in GetKernelInputRef()
266 MS_LOG(EXCEPTION) << "Input index " << input_idx << " is larger than input number " in GetKernelInputRef()
269 auto input_node = kernel->input(input_idx + 1); in GetKernelInputRef()
280 …MS_LOG(EXCEPTION) << "Input node [" << input_node->DebugString() << "]'s input " << input_idx << "… in GetKernelInputRef()
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/fp32/
Dtranspose_fp32.c196 int input_idx = 0; in TransposeDimsFp32() local
202 input_idx += (position * strides[perm[i]]); in TransposeDimsFp32()
205 out_data[output_idx] = in_data[input_idx]; in TransposeDimsFp32()
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/fp16/
Dtranspose_fp16.c198 int input_idx = 0; in TransposeDimsFp16() local
204 input_idx += (position * strides[perm[i]]); in TransposeDimsFp16()
207 out_data[output_idx] = in_data[input_idx]; in TransposeDimsFp16()
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/int8/
Dtranspose_int8.c246 int input_idx = 0; in TransposeDimsInt8() local
252 input_idx += (position * strides[perm[i]]); in TransposeDimsInt8()
255 out_data[output_idx] = in_data[input_idx]; in TransposeDimsInt8()

12