fix 9000e error

This commit is contained in:
yeyunpeng 2020-12-23 14:24:21 +08:00
parent 5dfcbc3558
commit 9a6ea7b7df
6 changed files with 8 additions and 6 deletions

View File

@ -514,7 +514,7 @@ build_lite()
if [ "${ENABLE_GPU}" == "on" ] && [ "${LITE_PLATFORM}" == "arm64" ] || [ $1 == "arm64" ]; then
echo "start get opencl"
fi
if [ "${ENABLE_NPU}" == "on" ]; then
if [ "${LITE_ENABLE_NPU}" == "on" ]; then
checkddk
fi

View File

@ -113,6 +113,10 @@ bool NPUManager::IsKirinChip() {
continue;
}
auto kirin_number_str = line.substr(index + 5);
if (kirin_number_str == "9000E") {
cpu_info.close();
return true;
}
auto kirin_number = atoi(kirin_number_str.c_str());
if (kirin_number >= 985 || kirin_number == 810 || kirin_number == 820) {
cpu_info.close();

View File

@ -34,9 +34,7 @@ static std::set<mindspore::schema::PrimitiveType> npu_trans_nodes = {
struct SubGraphModel {
public:
SubGraphModel(int index, std::string model_name, domi::ModelBufferData *model_buffer_data)
: index_(index), model_name_(std::move(model_name)), model_buffer_data_(model_buffer_data) {
std::cout << model_name;
}
: index_(index), model_name_(std::move(model_name)), model_buffer_data_(model_buffer_data) {}
bool is_freed = false;
bool is_loaded = false;

View File

@ -179,6 +179,7 @@ getOpsFile "Registry\(schema::PrimitiveType_" "${MINDSPORE_HOME}/mindspore/lite/
getOpsFile "REG_KERNEL\(.*?, kNumberTypeFloat32, PrimitiveType_" "${MINDSPORE_HOME}/mindspore/lite/src/runtime/kernel/arm" "kNumberTypeFloat32" &
getOpsFile "REG_KERNEL\(.*?, kNumberTypeFloat16, PrimitiveType_" "${MINDSPORE_HOME}/mindspore/lite/src/runtime/kernel/arm" "kNumberTypeFloat16" &
getOpsFile "REG_KERNEL\(.*?, kNumberTypeInt8, PrimitiveType_" "${MINDSPORE_HOME}/mindspore/lite/src/runtime/kernel/arm" "kNumberTypeInt8" &
getOpsFile "REG_KERNEL\(.*?, kNumberTypeInt32, PrimitiveType_" "${MINDSPORE_HOME}/mindspore/lite/src/runtime/kernel/arm" "kNumberTypeInt32" &
wait
echo "remove duplicate files"
# remove duplicate files

View File

@ -180,7 +180,7 @@ int Cropper::GetOpMatchFiles() {
String primitive = mapping[0];
String type = mapping[1];
String file = mapping[2];
if (type == "kNumberTypeFloat32" || type == "kNumberTypeFloat16") {
if (type == "kNumberTypeFloat32" || type == "kNumberTypeFloat16" || type == "kNumberTypeInt32") {
for (auto op : this->fp32_operators_) {
if (schema::EnumNamePrimitiveType(op) == primitive) {
MS_LOG(DEBUG) << "kNumberTypeFloat32:" << mapping[2];

View File

@ -57,7 +57,6 @@ class MS_API Cropper {
std::set<schema::PrimitiveType> all_operators_;
std::set<schema::PrimitiveType> int8_operators_;
std::set<schema::PrimitiveType> fp16_operators_;
std::set<schema::PrimitiveType> fp32_operators_;
private: