Home
last modified time | relevance | path

Searched refs:kernel_with_index (Results 1 – 25 of 28) sorted by relevance

12

/third_party/mindspore/mindspore/ccsrc/runtime/device/cpu/
Dcpu_simple_mem_plan.cc30 auto kernel_with_index = AnfAlgo::GetPrevNodeOutput(kernel, i); in MemPlan() local
31 MS_EXCEPTION_IF_NULL(kernel_with_index.first); in MemPlan()
32 if (kernel_with_index.first->isa<Parameter>()) { in MemPlan()
35 … auto address = AnfAlgo::GetOutputAddr(kernel_with_index.first, kernel_with_index.second, true); in MemPlan()
74 auto kernel_with_index = AnfAlgo::GetPrevNodeOutput(kernel, i); in MemAssign() local
75 MS_EXCEPTION_IF_NULL(kernel_with_index.first); in MemAssign()
76 if (kernel_with_index.first->isa<Parameter>()) { in MemAssign()
79 …auto address = AnfAlgo::GetMutableOutputAddr(kernel_with_index.first, kernel_with_index.second, tr… in MemAssign()
Dcpu_kernel_runtime.h62 …sorForOutput(session::KernelGraph *kernel_graph, const session::KernelWithIndex &kernel_with_index,
Dcpu_kernel_runtime.cc248 const session::KernelWithIndex &kernel_with_index, in CreatTensorForOutput() argument
250 auto &input_node = kernel_with_index.first; in CreatTensorForOutput()
251 auto index = kernel_with_index.second; in CreatTensorForOutput()
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/graph_kernel/
Dtsa_atomic_add_to_first_tensor.cc104 auto kernel_with_index = AnfAlgo::VisitKernel(tsa_first_input, 0); in ProcessTsaFirstNode() local
105 parameter->set_abstract(GetOutputAbstract(kernel_with_index.first, kernel_with_index.second)); in ProcessTsaFirstNode()
109 if (utils::isa<ValueNodePtr>(kernel_with_index.first)) { in ProcessTsaFirstNode()
110 auto tensor = GetValueNode<tensor::TensorPtr>(kernel_with_index.first); in ProcessTsaFirstNode()
115 parameter_format = AnfAlgo::GetOutputFormat(kernel_with_index.first, kernel_with_index.second); in ProcessTsaFirstNode()
116 …parameter_type = AnfAlgo::GetOutputDeviceDataType(kernel_with_index.first, kernel_with_index.secon… in ProcessTsaFirstNode()
168 auto kernel_with_index = AnfAlgo::VisitKernel(modified_input, 0); in CorrectKernelBuildInfo() local
170 AnfAlgo::GetOutputFormat(kernel_with_index.first, kernel_with_index.second); in CorrectKernelBuildInfo()
172 AnfAlgo::GetOutputDeviceDataType(kernel_with_index.first, kernel_with_index.second); in CorrectKernelBuildInfo()
Dgraph_kernel_helper.cc325 auto kernel_with_index = AnfAlgo::VisitKernel(inputs[i], 0); in SetNewKernelInfo() local
326 if (kernel_with_index.first->isa<ValueNode>()) { in SetNewKernelInfo()
327 auto tensor = GetValueNode<tensor::TensorPtr>(kernel_with_index.first); in SetNewKernelInfo()
332 … auto input_format = AnfAlgo::GetOutputFormat(kernel_with_index.first, kernel_with_index.second); in SetNewKernelInfo()
334 …auto input_type = AnfAlgo::GetOutputDeviceDataType(kernel_with_index.first, kernel_with_index.seco… in SetNewKernelInfo()
337 auto input_abs = GetOutputAbstract(kernel_with_index.first, kernel_with_index.second); in SetNewKernelInfo()
355 auto kernel_with_index = AnfAlgo::VisitKernel(new_outputs[i], 0); in SetNewKernelInfo() local
356 … auto output_format = AnfAlgo::GetOutputFormat(kernel_with_index.first, kernel_with_index.second); in SetNewKernelInfo()
357 …auto output_type = AnfAlgo::GetOutputDeviceDataType(kernel_with_index.first, kernel_with_index.sec… in SetNewKernelInfo()
393 auto kernel_with_index = AnfAlgo::VisitKernel(inputs[i], 0); in CreateNewFuseCNode() local
[all …]
Dadd_atomic_clean.cc255 auto kernel_with_index = AnfAlgo::VisitKernel(new_input, 0); in CorrectKernelBuildInfo() local
256 …new_inputs_format.push_back(AnfAlgo::GetOutputFormat(kernel_with_index.first, kernel_with_index.se… in CorrectKernelBuildInfo()
257 …inputs_type.push_back(AnfAlgo::GetOutputDeviceDataType(kernel_with_index.first, kernel_with_index.… in CorrectKernelBuildInfo()
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_json/
Dtbe_json_utils.cc81 session::KernelWithIndex kernel_with_index = AnfAlgo::GetPrevNodeOutput(anf_node, real_idx); in GetInputOriShapeForTbeBuild() local
82 return GetOutputOriShapeForTbeBuild(kernel_with_index.first, kernel_with_index.second); in GetInputOriShapeForTbeBuild()
88 session::KernelWithIndex kernel_with_index = AnfAlgo::GetPrevNodeOutput(anf_node, real_idx); in GetInputDeviceShapeForTbeBuild() local
90 …shape = AnfAlgo::GetOutputDeviceShapeForTbeBuild(kernel_with_index.first, kernel_with_index.second… in GetInputDeviceShapeForTbeBuild()
/third_party/mindspore/tests/ut/cpp/session/
Danf_runtime_algorithm_test.cc41 KernelWithIndex kernel_with_index; in TEST_F() local
46 kernel_with_index = AnfAlgo::VisitKernel(value_node, 0); in TEST_F()
47 EXPECT_NE(kernel_with_index.first->cast<ValueNodePtr>(), nullptr); in TEST_F()
48 EXPECT_EQ((kernel_with_index.first->cast<ValueNodePtr>()).get(), value_node.get()); in TEST_F()
49 EXPECT_EQ(kernel_with_index.second, 0); in TEST_F()
52 kernel_with_index = AnfAlgo::VisitKernel(parameter_node, 0); in TEST_F()
53 EXPECT_NE(kernel_with_index.first->cast<ParameterPtr>(), nullptr); in TEST_F()
54 EXPECT_EQ((kernel_with_index.first->cast<ParameterPtr>()).get(), parameter_node.get()); in TEST_F()
55 EXPECT_EQ(kernel_with_index.second, 0); in TEST_F()
59 kernel_with_index = AnfAlgo::VisitKernel(add, 0); in TEST_F()
[all …]
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/enhancer/
Dinsert_tensor_move_for_hccl_op.cc34 auto kernel_with_index = AnfAlgo::VisitKernelWithReturnType(node, 0, true); in IsParameterOrValueNode() local
35 auto real_node = kernel_with_index.first; in IsParameterOrValueNode()
79 auto kernel_with_index = AnfAlgo::VisitKernelWithReturnType(input, 0, false); in NeedInsertTensorMove() local
80 auto real_input = kernel_with_index.first; in NeedInsertTensorMove()
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/format_type/
Ddeal_ref_and_split_unsupported_transdata.cc30 session::KernelWithIndex kernel_with_index = AnfAlgo::VisitKernel(node, 0); in FindRefOriginNode() local
31 AnfNodePtr cur_node = kernel_with_index.first; in FindRefOriginNode()
32 size_t cur_out_index = kernel_with_index.second; in FindRefOriginNode()
61 return kernel_with_index; in FindRefOriginNode()
71 …session::KernelWithIndex kernel_with_index = AnfAlgo::VisitKernel(AnfAlgo::GetInputNode(cnode, inp… in AddRefNodePairToKernelGraph() local
72 kernel_graph->AddRefCorrespondPairs(final_pair, kernel_with_index); in AddRefNodePairToKernelGraph()
/third_party/mindspore/mindspore/ccsrc/backend/session/
Danf_runtime_algorithm.cc797 KernelWithIndex kernel_with_index = AnfAlgo::GetPrevNodeOutput(anf_node, input_idx); in GetPrevNodeOutputFormat() local
798 return AnfRuntimeAlgorithm::GetOutputFormat(kernel_with_index.first, kernel_with_index.second); in GetPrevNodeOutputFormat()
802 KernelWithIndex kernel_with_index = AnfAlgo::GetPrevNodeOutput(node, input_idx); in GetPrevNodeOutputReshapeType() local
803 return GetOutputReshapeType(kernel_with_index.first, kernel_with_index.second); in GetPrevNodeOutputReshapeType()
851 KernelWithIndex kernel_with_index = AnfAlgo::GetPrevNodeOutput(node, input_idx); in GetPrevNodeOutputInferShape() local
852 …return AnfRuntimeAlgorithm::GetOutputInferShape(kernel_with_index.first, kernel_with_index.second); in GetPrevNodeOutputInferShape()
973 KernelWithIndex kernel_with_index = AnfAlgo::GetPrevNodeOutput(node, input_idx); in GetPrevNodeOutputInferDataType() local
974 …return AnfRuntimeAlgorithm::GetOutputInferDataType(kernel_with_index.first, kernel_with_index.seco… in GetPrevNodeOutputInferDataType()
1024 KernelWithIndex kernel_with_index = AnfAlgo::GetPrevNodeOutput(anf_node, input_idx); in GetPrevNodeOutputDeviceDataType() local
1025 …return AnfRuntimeAlgorithm::GetOutputDeviceDataType(kernel_with_index.first, kernel_with_index.sec… in GetPrevNodeOutputDeviceDataType()
[all …]
Dsession_basic.cc1293 auto kernel_with_index = AnfAlgo::VisitKernel(input, 0); in GetRefCount() local
1294 const auto &node = kernel_with_index.first; in GetRefCount()
1296 (*ref_count)[kernel_with_index] += 1; in GetRefCount()
1307 for (auto &kernel_with_index : input_kernel) { in HandleOpInputs() local
1308 MS_EXCEPTION_IF_NULL(kernel_with_index.first); in HandleOpInputs()
1309 if (!kernel_with_index.first->isa<CNode>()) { in HandleOpInputs()
1312 auto ref_iter = ref_count->find(kernel_with_index); in HandleOpInputs()
1315 … << kernel_with_index.first->DebugString() << ", index = " << kernel_with_index.second; in HandleOpInputs()
1323 auto output_iter = op_output_map->find(kernel_with_index); in HandleOpInputs()
1326 … << kernel_with_index.first->DebugString() << ", index = " << kernel_with_index.second; in HandleOpInputs()
[all …]
Dascend_session.cc166 TensorPtr GetCNodeOutputStubTensor(const KernelWithIndex &kernel_with_index, in GetCNodeOutputStubTensor() argument
170 const auto &iter = node_output_info.find(kernel_with_index); in GetCNodeOutputStubTensor()
172 …MS_LOG(EXCEPTION) << "Can not find output stub tensor of cnode " << kernel_with_index.first->Debug… in GetCNodeOutputStubTensor()
187 KernelWithIndex kernel_with_index = std::make_pair(kernel, out_idx++); in GenOpOutputStubTensor() local
188 if (cnode_refcount.find(kernel_with_index) == cnode_refcount.end()) { in GenOpOutputStubTensor()
218 (*op_output_info)[kernel_with_index] = output_tensor_info; in GenOpOutputStubTensor()
1089 auto kernel_with_index = AnfAlgo::VisitKernel(input, 0); in GetOpInputStubTensors() local
1090 auto real_input = kernel_with_index.first; in GetOpInputStubTensors()
1094 tensor = GetValueNodeOutputTensor(real_input, kernel_with_index.second); in GetOpInputStubTensors()
1104 tensor = GetCNodeOutputStubTensor(kernel_with_index, node_output_info, &output_is_weight); in GetOpInputStubTensors()
[all …]
Danf_runtime_algorithm.h244 static AnfNodePtr GetOutputOfGraphkernel(const KernelWithIndex &kernel_with_index);
/third_party/mindspore/mindspore/ccsrc/debug/data_dump/
Dcpu_e2e_dump.cc63 auto kernel_with_index = AnfAlgo::GetPrevNodeOutput(node, j); in DumpInputImpl() local
64 auto input = kernel_with_index.first; in DumpInputImpl()
65 auto index = kernel_with_index.second; in DumpInputImpl()
De2e_dump.cc169 auto kernel_with_index = AnfAlgo::GetPrevNodeOutput(node, j); in DumpInputImpl() local
170 auto input = kernel_with_index.first; in DumpInputImpl()
171 auto index = kernel_with_index.second; in DumpInputImpl()
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/mem_reuse/
Dmem_swap_manager.cc214 auto kernel_with_index = AnfAlgo::GetPrevNodeOutput(user.first, IntToSize(user.second)); in IsInplaceRelevantOp() local
215 if (tensor.output_idx_ == kernel_with_index.second) { in IsInplaceRelevantOp()
247 … auto kernel_with_index = AnfAlgo::GetPrevNodeOutput(user_kernel, IntToSize(node_pair.second - 1)); in SaveUserKernelTopoOrder() local
248 auto &output_idx = kernel_with_index.second; in SaveUserKernelTopoOrder()
249 if (kernel_with_index.first.get() != kernel.get()) { in SaveUserKernelTopoOrder()
Dmem_reuse_checker.cc384 auto kernel_with_index = AnfAlgo::VisitKernel(input, 0); in CheckNormalIR() local
385 if (kernel_with_index.first->isa<Parameter>()) { in CheckNormalIR()
/third_party/mindspore/mindspore/ccsrc/runtime/device/
Dkernel_runtime.cc283 KernelWithIndex kernel_with_index = AnfAlgo::GetPrevNodeOutput(kernel, input_index, true); in ResetNodeAddress() local
284 auto index = kernel_with_index.second; in ResetNodeAddress()
285 auto &input_node = kernel_with_index.first; in ResetNodeAddress()
638 auto kernel_with_index = AnfAlgo::VisitKernelWithReturnType(node, 0, true); in AssignStaticMemoryOutput() local
639 MS_EXCEPTION_IF_NULL(kernel_with_index.first); in AssignStaticMemoryOutput()
640 if (!kernel_with_index.first->isa<CNode>() || !AnfAlgo::IsRealKernel(kernel_with_index.first)) { in AssignStaticMemoryOutput()
643 if (AnfAlgo::IsCommunicationOp(kernel_with_index.first)) { in AssignStaticMemoryOutput()
644 AssignCommunicationNodeMem(kStaticMem, kernel_with_index.first); in AssignStaticMemoryOutput()
646 non_communication_op.emplace_back(kernel_with_index); in AssignStaticMemoryOutput()
1315 auto kernel_with_index = AnfAlgo::GetPrevNodeOutput(kernel, real_input, true); in AssignKernelAddress() local
[all …]
Dkernel_adjust.cc704 …session::KernelWithIndex kernel_with_index = AnfAlgo::VisitKernel(AnfAlgo::GetInputNode(assign_add… in CreateStreamAssignAddnOP() local
705 kernel_graph_ptr->AddRefCorrespondPairs(final_pair, kernel_with_index); in CreateStreamAssignAddnOP()
987 …session::KernelWithIndex kernel_with_index = AnfAlgo::VisitKernel(AnfAlgo::GetInputNode(assign_add… in CreateAssignAdd() local
988 kernel_graph_ptr->AddRefCorrespondPairs(final_pair, kernel_with_index); in CreateAssignAdd()
1036 …session::KernelWithIndex kernel_with_index = AnfAlgo::VisitKernel(AnfAlgo::GetInputNode(assign_cno… in CreateAssign() local
1037 kernel_graph_ptr->AddRefCorrespondPairs(final_pair, kernel_with_index); in CreateAssign()
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/tbe/
Dtbe_kernel_build.cc167 session::KernelWithIndex kernel_with_index = AnfAlgo::GetPrevNodeOutput(anf_node, real_index); in GetInputShapeForTbeBuild() local
168 return GetOutputShapeForTbeBuild(kernel_with_index.first, kernel_with_index.second); in GetInputShapeForTbeBuild()
175 session::KernelWithIndex kernel_with_index = AnfAlgo::GetPrevNodeOutput(anf_node, real_index); in GetInputDeviceShapeForTbeBuild() local
177 shape = GetOutputShapeForTbeBuild(kernel_with_index.first, kernel_with_index.second); in GetInputDeviceShapeForTbeBuild()
180 …shape = AnfAlgo::GetOutputDeviceShapeForTbeBuild(kernel_with_index.first, kernel_with_index.second… in GetInputDeviceShapeForTbeBuild()
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/
Dascend_helper.cc430 auto kernel_with_index = AnfAlgo::VisitKernelWithReturnType(cur_input, 0); in InsertCastForInput() local
431 auto real_input_node = kernel_with_index.first; in InsertCastForInput()
/third_party/mindspore/mindspore/ccsrc/runtime/device/ascend/
Dkernel_select_graph_kernel.cc66 auto kernel_with_index = AnfAlgo::VisitKernel(input_kernel_node, 0); in ResetKernelBuildInfo() local
67 if (!kernel::IsWeightBoundary(kernel_with_index.first)) { in ResetKernelBuildInfo()
/third_party/mindspore/mindspore/ccsrc/runtime/framework/
Dgraph_scheduler.cc896 const auto &kernel_with_index = GetFrontNodeByKernelGraph(from_kernel, graph); in LinkDataArrow() local
898 AnfAlgo::VisitKernelWithReturnType(kernel_with_index.first, kernel_with_index.second); in LinkDataArrow()
1262 auto kernel_with_index = AnfAlgo::GetPrevNodeOutput(skipped_node, i, false); in LinkControlArrowBySkippedNode() local
1263 MS_EXCEPTION_IF_NULL(kernel_with_index.first); in LinkControlArrowBySkippedNode()
1264 …auto from_actor = dynamic_cast<KernelActor *>(FetchActor(kernel_with_index.first->fullname_with_sc… in LinkControlArrowBySkippedNode()
1858 const auto &kernel_with_index = AnfAlgo::VisitKernelWithReturnType(input_node, 0); in LinkDataArrowByControlNode() local
1860 graph_compiler_info.control_node_parser_->GetBackendKernelByFrontKernel(kernel_with_index); in LinkDataArrowByControlNode()
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/common/
Dhelper.cc441 …auto kernel_with_index = AnfAlgo::GetPrevNodeOutput(output_info.first, IntToSize(output_info.secon… in GetRealNodeUsedListByOutputIdx() local
442 if (kernel_with_index.first.get() != node.get()) { in GetRealNodeUsedListByOutputIdx()
445 used_output_index = kernel_with_index.second; in GetRealNodeUsedListByOutputIdx()

12