Home
last modified time | relevance | path

Searched refs:kernel_info (Results 1 – 25 of 68) sorted by relevance

123

/third_party/mindspore/mindspore/_extends/parallel_compile/tbe_compiler/
Dhelper.py24 def _op_select_format(kernel_info): argument
35 op_name = kernel_info['op_info']['name']
36 te_set_version(kernel_info["op_info"]["socVersion"])
39 if 'impl_path' in kernel_info and kernel_info['impl_path'] is not None:
40 op_impl_path = os.path.realpath(kernel_info['impl_path'])
59 inputs_args = get_args(kernel_info['op_info'], 'inputs')
60 outputs_args = get_args(kernel_info['op_info'], 'outputs')
61 attrs_args = get_args(kernel_info['op_info'], 'attrs')
62 kernel_name = kernel_info['op_info']['kernel_name']
73 def _check_supported(kernel_info): argument
[all …]
Dcompiler.py68 kernel_info = json.loads(json_str)
69 check_kernel_info(kernel_info)
70 te_set_version(kernel_info["op_info"]["socVersion"])
71 op_name = kernel_info['op_info']['name']
72 op_type = kernel_info['op_info']['Type']
73 rl_tune_switch = kernel_info['op_info']['rl_tune_switch']
74 rl_tune_list = kernel_info['op_info']['rl_tune_list']
75 reset_op_info = kernel_info["reset_op_info"]
76 op_tune_switch = kernel_info['op_info']['op_tune_switch']
77 op_tune_list = kernel_info['op_info']['op_tune_list']
[all …]
Dtbe_common.py150 def check_kernel_info(kernel_info): argument
151 if 'op_info' not in kernel_info or not kernel_info['op_info']:
153 if 'name' not in kernel_info['op_info'] or not kernel_info['op_info']['name']:
155 if 'kernel_name' not in kernel_info['op_info'] or not kernel_info['op_info']['kernel_name']:
Dtbe_process.py67 kernel_info = json.loads(op_json)
68 check_kernel_info(kernel_info)
69 ret = _op_select_format(kernel_info)
92 kernel_info = json.loads(op_json)
93 check_kernel_info(kernel_info)
94 ret = _check_supported(kernel_info)
/third_party/mindspore/mindspore/_extends/graph_kernel/
Dexpander.py35 def extract_expand_info(kernel_info): argument
38 if 'input_desc' in kernel_info and kernel_info['input_desc']:
39 for desc in kernel_info['input_desc']:
42 if 'attr' in kernel_info and kernel_info['attr']:
43 for attr in kernel_info["attr"]:
46 "name": kernel_info["name"],
48 "output_desc": kernel_info["output_desc"],
50 "process": kernel_info["process"],
58 kernel_info = json.loads(json_str)
59 expand_info = extract_expand_info(kernel_info)
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/gpu/
Dgpu_kernel_factory.cc39 … GpuKernelFactory::CheckIOParam(const std::string &kernel_name, const KernelBuildInfo *kernel_info, in CheckIOParam() argument
42 if (kernel_info->GetInputNum() != iter_second->at(attr_index).first.GetInputSize()) { in CheckIOParam()
47 if (kernel_info->GetOutputNum() != iter_second->at(attr_index).first.GetOutputSize()) { in CheckIOParam()
81 auto kernel_info = builder->Build(); in ReducePrecision() local
82 MS_EXCEPTION_IF_NULL(kernel_info); in ReducePrecision()
91 for (size_t input_index = 0; input_index < kernel_info->GetInputNum(); input_index++) { in ReducePrecision()
92 if (kernel_info->GetInputDeviceType(input_index) == kNumberTypeInt64 && in ReducePrecision()
100 for (size_t output_index = 0; output_index < kernel_info->GetOutputNum(); output_index++) { in ReducePrecision()
101 if (kernel_info->GetOutputDeviceType(output_index) == kNumberTypeInt64 && in ReducePrecision()
112 void GpuKernelFactory::CheckSM(const KernelBuildInfo *kernel_info, const size_t &input_index) { in CheckSM() argument
[all …]
Dgpu_kernel_factory.h43 bool SearchRegistered(const std::string &kernel_name, const KernelBuildInfoPtr &kernel_info);
59 …ol, size_t> GpuKernelAttrCheck(const std::string &kernel_name, const KernelBuildInfo *kernel_info);
60 void CheckSM(const KernelBuildInfo *kernel_info, const size_t &input_index);
61 bool CheckIOParam(const std::string &kernel_name, const KernelBuildInfo *kernel_info,
/third_party/mindspore/mindspore/ccsrc/backend/session/
Danf_runtime_algorithm.cc665 auto kernel_info = dynamic_cast<device::KernelInfo *>(node->kernel_info()); in GetAllOutputFormats() local
666 MS_EXCEPTION_IF_NULL(kernel_info); in GetAllOutputFormats()
667 auto build_info = kernel_info->select_kernel_build_info(); in GetAllOutputFormats()
680 auto kernel_info = dynamic_cast<device::KernelInfo *>(node->kernel_info()); in GetAllInputFormats() local
681 MS_EXCEPTION_IF_NULL(kernel_info); in GetAllInputFormats()
682 auto build_info = kernel_info->select_kernel_build_info(); in GetAllInputFormats()
695 auto kernel_info = dynamic_cast<device::KernelInfo *>(node->kernel_info()); in GetAllInputDeviceTypes() local
696 MS_EXCEPTION_IF_NULL(kernel_info); in GetAllInputDeviceTypes()
697 auto build_info = kernel_info->select_kernel_build_info(); in GetAllInputDeviceTypes()
710 auto kernel_info = dynamic_cast<device::KernelInfo *>(node->kernel_info()); in GetAllOutputDeviceTypes() local
[all …]
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/format_type/
Dmerge_cast_to_op.cc33 if (node == nullptr || node->kernel_info() == nullptr || candidate_kernel_info == nullptr) { in AlternativeKernelInfoForInput()
73 bool CheckInputs(const CNodePtr &node, const std::shared_ptr<kernel::KernelBuildInfo> &kernel_info)… in CheckInputs() argument
74 MS_EXCEPTION_IF_NULL(kernel_info); in CheckInputs()
75 if (AnfAlgo::GetInputTensorNum(node) != kernel_info->GetInputNum()) { in CheckInputs()
79 for (size_t index = 0; index < kernel_info->GetInputNum(); ++index) { in CheckInputs()
80 if (AnfAlgo::GetInputFormat(node, index) != kernel_info->GetInputFormat(index) || in CheckInputs()
81 AnfAlgo::GetInputDeviceDataType(node, index) != kernel_info->GetInputDeviceType(index)) { in CheckInputs()
88 …heckOtherOutputs(const CNodePtr &node, const std::shared_ptr<kernel::KernelBuildInfo> &kernel_info, in CheckOtherOutputs() argument
90 MS_EXCEPTION_IF_NULL(kernel_info); in CheckOtherOutputs()
91 if (AnfAlgo::GetOutputTensorNum(node) != kernel_info->GetOutputNum()) { in CheckOtherOutputs()
[all …]
Ddeal_ref_and_split_unsupported_transdata.cc276 auto kernel_info = AnfAlgo::GetSelectKernelBuildInfo(cnode); in SplitTransdataIfNotSupported() local
277 MS_EXCEPTION_IF_NULL(kernel_info); in SplitTransdataIfNotSupported()
279 if (kHWSpecialFormatSet.find(kernel_info->GetInputFormat(0)) == kHWSpecialFormatSet.end() || in SplitTransdataIfNotSupported()
280 kHWSpecialFormatSet.find(kernel_info->GetOutputFormat(0)) == kHWSpecialFormatSet.end()) { in SplitTransdataIfNotSupported()
288 …r_info_to_default = std::make_shared<kernel::KernelBuildInfo::KernelBuildInfoBuilder>(kernel_info); in SplitTransdataIfNotSupported()
290 …to_special_foramt = std::make_shared<kernel::KernelBuildInfo::KernelBuildInfoBuilder>(kernel_info); in SplitTransdataIfNotSupported()
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/
Dcpu_kernel_factory.cc47 auto kernel_info = dynamic_cast<device::KernelInfo *>(apply_kernel->kernel_info()); in Create() local
48 MS_EXCEPTION_IF_NULL(kernel_info); in Create()
49 const KernelBuildInfo *kernel_build_Info = kernel_info->select_kernel_build_info(); in Create()
115 const KernelBuildInfo &kernel_info) { in CPUKernelAttrCheck() argument
137 if (CPUKernelSingleAttrCheck(kernel_attrs[index], kernel_info)) { in CPUKernelAttrCheck()
145 const KernelBuildInfo &kernel_info) const { in CPUKernelSingleAttrCheck()
146 for (size_t i = 0; i < kernel_info.GetInputNum(); ++i) { in CPUKernelSingleAttrCheck()
148 if (kernel_info.GetInputDeviceType(i) != dtype) { in CPUKernelSingleAttrCheck()
149 … MS_LOG(DEBUG) << "input index:" << i << ", kernel info type:" << kernel_info.GetInputDeviceType(i) in CPUKernelSingleAttrCheck()
154 for (size_t i = 0; i < kernel_info.GetOutputNum(); ++i) { in CPUKernelSingleAttrCheck()
[all …]
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/ir_fusion/
Dlayer_norm_beta_gamma_backprop_fusion.cc55 bool CheckKernelBuildInfo(const CNodePtr &cnode, const kernel::KernelBuildInfoPtr &kernel_info) { in CheckKernelBuildInfo() argument
57 MS_EXCEPTION_IF_NULL(kernel_info); in CheckKernelBuildInfo()
58 for (size_t i = 0; i < kernel_info->GetInputNum(); ++i) { in CheckKernelBuildInfo()
59 if (kernel_info->GetInputDeviceType(i) != kNumberTypeFloat16 || in CheckKernelBuildInfo()
60 kernel_info->GetInputFormat(i) != AnfAlgo::GetInputFormat(cnode, i)) { in CheckKernelBuildInfo()
64 for (size_t i = 0; i < kernel_info->GetOutputNum(); ++i) { in CheckKernelBuildInfo()
65 if (kernel_info->GetOutputDeviceType(i) != kNumberTypeFloat32 || in CheckKernelBuildInfo()
66 kernel_info->GetOutputFormat(i) != AnfAlgo::GetOutputFormat(cnode, i)) { in CheckKernelBuildInfo()
Dparameter_and_transop_fusion.cc64 auto kernel_info = dynamic_cast<device::KernelInfo *>(cast->kernel_info()); in GetKernelBuildInfo() local
65 MS_EXCEPTION_IF_NULL(kernel_info); in GetKernelBuildInfo()
66 auto cast_build_info = kernel_info->select_kernel_build_info(); in GetKernelBuildInfo()
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/
Dkernel_query.cc53 auto &kernel_info = kernel_info_list->at(index); in FilterInvalidKernelInfo() local
54 MS_EXCEPTION_IF_NULL(kernel_info); in FilterInvalidKernelInfo()
55 if (kernel_info->GetOutputNum() != output_tensor_num) { in FilterInvalidKernelInfo()
57 << " cannot match the kernel's output size [" << kernel_info->GetOutputNum() << "]"; in FilterInvalidKernelInfo()
60 << " cannot match the kernel's input size [" << kernel_info->GetInputNum() << "]"; in FilterInvalidKernelInfo()
62 MS_LOG(INFO) << "Kernel [ " << index << " ] :" << kernel_info->ToString() << buffer.str(); in FilterInvalidKernelInfo()
/third_party/mindspore/tests/ut/cpp/pre_activate/ascend/ir_fission/
Dtransdata_split_test.cc130 auto kernel_info = std::make_shared<device::KernelInfo>(); in TEST_F() local
131 kernel_info->set_select_kernel_build_info(builder.Build()); in TEST_F()
132 transpose->set_kernel_info(kernel_info); in TEST_F()
178 auto kernel_info = std::make_shared<device::KernelInfo>(); in TEST_F() local
179 kernel_info->set_select_kernel_build_info(builder.Build()); in TEST_F()
180 transpose->set_kernel_info(kernel_info); in TEST_F()
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/ir_fission/
Dbn_split.cc51 auto kernel_info = std::make_shared<device::KernelInfo>(); in CreateOutputsOfBNTrainingReduce() local
52 MS_EXCEPTION_IF_NULL(kernel_info); in CreateOutputsOfBNTrainingReduce()
53 bn_training_reduce->set_kernel_info(kernel_info); in CreateOutputsOfBNTrainingReduce()
91 auto kernel_info = std::make_shared<device::KernelInfo>(); in CreateOutputsOfBNTrainingUpdate() local
92 MS_EXCEPTION_IF_NULL(kernel_info); in CreateOutputsOfBNTrainingUpdate()
93 bn_training_update->set_kernel_info(kernel_info); in CreateOutputsOfBNTrainingUpdate()
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/akg/
Dakg_kernel_json_decoder.cc228 auto kernel_info = std::make_shared<device::KernelInfo>(); in CreateKernelInfo() local
238 kernel_info->set_feature_map_flag(!is_weight); in CreateKernelInfo()
251 kernel_info->set_feature_map_flag(true); in CreateKernelInfo()
254 AnfAlgo::SetNodeAttr(kIsFeatureMapOutput, MakeValue(kernel_info->is_feature_map()), cnode_); in CreateKernelInfo()
257 cnode_->set_kernel_info(kernel_info); in CreateKernelInfo()
307 auto kernel_info = std::make_shared<device::KernelInfo>(); in DecodeValueNode() local
308 value_node->set_kernel_info(kernel_info); in DecodeValueNode()
347 auto kernel_info = std::make_shared<device::KernelInfo>(); in DecodeParameter() local
348 new_parameter->set_kernel_info(kernel_info); in DecodeParameter()
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/gpu/
Dcombine_momentum_fusion.cc84 auto kernel_info = std::make_shared<device::KernelInfo>(); in Run() local
86 MS_EXCEPTION_IF_NULL(kernel_info); in Run()
87 combine_mom->set_kernel_info(kernel_info); in Run()
Dcombine_cast_fusion.cc101 auto kernel_info = std::make_shared<device::KernelInfo>(); in Run() local
103 MS_EXCEPTION_IF_NULL(kernel_info); in Run()
104 cast_all->set_kernel_info(kernel_info); in Run()
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/cpu/
Dinsert_cast_cpu.cc49 if (cast->kernel_info() == nullptr) { in AddCastOpNodeToGraph()
50 auto kernel_info = std::make_shared<device::KernelInfo>(); in AddCastOpNodeToGraph() local
51 cast->set_kernel_info(kernel_info); in AddCastOpNodeToGraph()
58 MS_LOG(EXCEPTION) << "Operator[Cast] " << cast->kernel_info() << " is not support."; in AddCastOpNodeToGraph()
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/pass/
Dreplace_node_by_proxy.cc72 auto kernel_info = std::make_shared<device::KernelInfo>(); in Run() local
73 MS_EXCEPTION_IF_NULL(kernel_info); in Run()
74 proxy_node->set_kernel_info(kernel_info); in Run()
/third_party/mindspore/mindspore/ccsrc/profiler/device/gpu/
Dgpu_data_saver.cc29 ? "\"" + std::to_string(basic_info_->kernel_info.grid_x) + ',' + in ActivityData()
30 std::to_string(basic_info_->kernel_info.grid_y) + ',' + in ActivityData()
31 std::to_string(basic_info_->kernel_info.grid_z) + "\"" in ActivityData()
34 ? "\"" + std::to_string(basic_info_->kernel_info.block_x) + ',' + in ActivityData()
35 std::to_string(basic_info_->kernel_info.block_y) + ',' + in ActivityData()
36 std::to_string(basic_info_->kernel_info.block_z) + "\"" in ActivityData()
/third_party/mindspore/tests/ut/cpp/pre_activate/ascend/ir_fusion/
Dtranspose_transdata_fusion_test.cc109 auto kernel_info = std::make_shared<device::KernelInfo>(); in TEST_F() local
110 kernel_info->set_select_kernel_build_info(builder.Build()); in TEST_F()
111 transpose->set_kernel_info(kernel_info); in TEST_F()
/third_party/mindspore/tests/ut/cpp/session/
Danf_runtime_algorithm_test.cc253 auto d_kernel_info = dynamic_cast<KernelInfo *>(add->kernel_info()); in TEST_F()
272 auto d_kernel_info = dynamic_cast<KernelInfo *>(add->kernel_info()); in TEST_F()
291 auto d_kernel_info = dynamic_cast<KernelInfo *>(pre_add->kernel_info()); in TEST_F()
371 auto d_kernel_info = dynamic_cast<KernelInfo *>(add->kernel_info()); in TEST_F()
404 auto d_kernel_info = dynamic_cast<KernelInfo *>(add->kernel_info()); in TEST_F()
458 auto d_kernel_info = dynamic_cast<KernelInfo *>(add->kernel_info()); in TEST_F()
475 auto d_kernel_info = dynamic_cast<KernelInfo *>(add->kernel_info()); in TEST_F()
493 auto d_kernel_info = dynamic_cast<KernelInfo *>(pre_add->kernel_info()); in TEST_F()
514 auto d_kernel_info = dynamic_cast<KernelInfo *>(add->kernel_info()); in TEST_F()
529 auto d_kernel_info = dynamic_cast<KernelInfo *>(pre_add->kernel_info()); in TEST_F()
[all …]
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/tbe/
Dtbe_dynaminc_shape_util.cc377 auto kernel_info = dynamic_cast<device::KernelInfo *>(anf_node->kernel_info()); in GetInputDynamicRange() local
378 MS_EXCEPTION_IF_NULL(kernel_info); in GetInputDynamicRange()
380kernel_info->select_kernel_build_info() == nullptr ? def_format : AnfAlgo::GetInputFormat(anf_node… in GetInputDynamicRange()
401 auto kernel_info = dynamic_cast<device::KernelInfo *>(anf_node->kernel_info()); in GetOutputDynamicRange() local
402 MS_EXCEPTION_IF_NULL(kernel_info); in GetOutputDynamicRange()
404kernel_info->select_kernel_build_info() == nullptr ? def_format : AnfAlgo::GetOutputFormat(anf_nod… in GetOutputDynamicRange()

123