forked from mindspore-Ecosystem/mindspore
fix 9000e error
This commit is contained in:
parent
5dfcbc3558
commit
9a6ea7b7df
2
build.sh
2
build.sh
|
@ -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
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue