Browse Source

!21649 [lite]open nnie compile and test

Merge pull request !21649 from 徐安越/master
tags/v1.5.0-rc1
i-robot Gitee 4 years ago
parent
commit
eee0e33945
3 changed files with 9 additions and 10 deletions
  1. +2
    -2
      mindspore/lite/src/common/tensor_util.cc
  2. +6
    -7
      mindspore/lite/test/st/run_benchmark_nets.sh
  3. +1
    -1
      mindspore/lite/tools/providers/NNIE/Hi3516D/compile_nnie.sh

+ 2
- 2
mindspore/lite/src/common/tensor_util.cc View File

@@ -286,8 +286,8 @@ int CheckTensorsInvalid(const std::vector<Tensor *> &tensors) {
<< "check the model and assign the input shape with method Resize().";
return RET_ERROR;
}
if (tensor->format() != mindspore::NHWC) {
MS_LOG(ERROR) << "model input's format may be changed, which should keep default value NHWC";
if (tensor->format() != mindspore::NHWC && tensor->format() != mindspore::NCHW) {
MS_LOG(ERROR) << "model input's format may be changed, which should be NHWC or NCHW";
return RET_FORMAT_ERR;
}
if (tensor->data_c() == nullptr) {


+ 6
- 7
mindspore/lite/test/st/run_benchmark_nets.sh View File

@@ -101,11 +101,10 @@ if [[ $backend == "all" || $backend == "x86_asan" ]]; then
fi

if [[ $backend == "all" || $backend == "arm32_3516D" ]]; then
exit 0
# sh $cur_path/scripts/nnie/run_converter_nnie.sh -r $release_path -m $models_path -d $device_id -e $backend
# hi3516_status=$?
# if [[ $hi3516_status -ne 0 ]]; then
# echo "Run nnie hi3516 failed"
# exit 1
# fi
sh $cur_path/scripts/nnie/run_converter_nnie.sh -r $release_path -m $models_path -d $device_id -e $backend
hi3516_status=$?
if [[ $hi3516_status -ne 0 ]]; then
echo "Run nnie hi3516 failed"
exit 1
fi
fi

+ 1
- 1
mindspore/lite/tools/providers/NNIE/Hi3516D/compile_nnie.sh View File

@@ -94,7 +94,7 @@ function Run_Build_arm32() {
echo "build arm32 for nnie failed"; return 1
fi
}
exit 0
# bashpath should be /home/jenkins/agent-working-dir/workspace/Compile_Lite_ARM32_3516D/
basepath=$(pwd)
echo "basepath is ${basepath}"


Loading…
Cancel
Save