forked from mindspore-Ecosystem/mindspore
!2134 fix cododex & pclint with tbe kernel
Merge pull request !2134 from jjfeing/master
This commit is contained in:
commit
14b997448a
|
@ -74,14 +74,6 @@ TypeId DtypeToTypeId(const std::string &dtypes) {
|
|||
return iter->second;
|
||||
}
|
||||
|
||||
std::string DtypeToString(const std::string &dtypes) {
|
||||
auto iter = type_str_maps.find(dtypes);
|
||||
if (iter == type_str_maps.end()) {
|
||||
MS_LOG(EXCEPTION) << "Illegal input dtype: " << dtypes;
|
||||
}
|
||||
return iter->second;
|
||||
}
|
||||
|
||||
std::string TypeIdToString(TypeId type_id) {
|
||||
auto iter = type_id_str_maps.find(type_id);
|
||||
if (iter == type_id_str_maps.end()) {
|
||||
|
|
|
@ -28,8 +28,6 @@ namespace tbe {
|
|||
constexpr auto kProcessorAiCore = "aicore";
|
||||
TypeId DtypeToTypeId(const std::string &dtypes);
|
||||
|
||||
std::string DtypeToString(const std::string &dtypes);
|
||||
|
||||
std::string TypeIdToString(TypeId type_id);
|
||||
|
||||
size_t GetDtypeNbyte(const std::string &dtypes);
|
||||
|
|
|
@ -615,7 +615,7 @@ void TbeKernelBuild::GenDescJson(const std::shared_ptr<mindspore::AnfNode> &anf_
|
|||
spec_shape.emplace_back(shape[2] * shape[3]);
|
||||
spec_shape.emplace_back(shape[4]);
|
||||
(*output_desc)["shape"] = spec_shape;
|
||||
} else if (fusion_data_type == kFusionReLUGradV2 && (*output_desc)["data_type"] == "uint8") {
|
||||
} else if (fusion_data_type == kFusionReLUGradV2) {
|
||||
std::vector<size_t> spec_shape = {};
|
||||
spec_shape.emplace_back(shape[0]);
|
||||
spec_shape.emplace_back(shape[1]);
|
||||
|
|
|
@ -51,7 +51,6 @@ class TbeKernelBroadCastSelecter {
|
|||
std::vector<std::vector<size_t>> input_shapes_;
|
||||
std::vector<std::vector<size_t>> output_shapes_;
|
||||
};
|
||||
|
||||
} // namespace kernel
|
||||
} // namespace mindspore
|
||||
#endif // MINDSPORE_TBE_KERNEL_BROADCAST_SELECTER_HELPER_H
|
||||
|
|
|
@ -175,6 +175,5 @@ void TbeKernelReduceSelecter::PadScalarShape(std::vector<size_t> *shape) const {
|
|||
shape->emplace_back(1);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace kernel
|
||||
} // namespace mindspore
|
||||
|
|
|
@ -462,6 +462,9 @@ std::vector<std::string> TbeKernelSelect::SplitStrToVec(const std::string &op_se
|
|||
std::vector<std::string> ret;
|
||||
auto begin = op_select_tmp.find_first_not_of(space, 0);
|
||||
auto sep_pos = op_select_tmp.find(sep);
|
||||
if (begin >= sep_pos) {
|
||||
MS_LOG(EXCEPTION) << "Select ret json is error.";
|
||||
}
|
||||
while (sep_pos != std::string::npos) {
|
||||
auto obj = op_select_tmp.substr(begin, sep_pos - begin);
|
||||
if (kDynamicFormatMap.find(obj) != kDynamicFormatMap.end()) {
|
||||
|
@ -628,6 +631,5 @@ void TbeKernelSelect::PrintSupportedFormat(const SupportFormat &support_format)
|
|||
MS_LOG(INFO) << "Support format: " << print_str;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace kernel
|
||||
} // namespace mindspore
|
||||
|
|
Loading…
Reference in New Issue