fix codex warning

This commit is contained in:
jianghui58 2022-03-16 09:22:51 +08:00
parent f24dfb606f
commit e35d1adf83
9 changed files with 24 additions and 9 deletions

View File

@ -37,7 +37,7 @@
# Lite
"mindspore/mindspore/lite/include/lite_utils.h" "build/include_what_you_use"
"mindspore/mindspore/lite/nnacl/" "readability/casting"
"mindspore/mindspore/ccsrc/plugin/device/cpu/kernel/nnacl/" "readability/casting"
"mindspore/mindspore/lite/tools/converter/micro/coder/wrapper/" "readability/casting"
"mindspore/mindspore/lite/tools/converter/parser/tflite/tflite_node_parser.h" "runtime/references"
"mindspore/mindspore/lite/tools/converter/model_parser.h" "build/namespaces"

View File

@ -26,6 +26,7 @@ extern "C" {
#endif
static int PriorBox(const float *input_data, float *output_data, const size_t size, const int tid,
const int thread_num) {
NNACL_CHECK_ZERO_RETURN_ERR(thread_num);
size_t unit_size = size / thread_num;
size_t copy_size = (tid == thread_num - 1) ? size - unit_size * tid : unit_size;
(void)memcpy(output_data + tid * unit_size, input_data + tid * unit_size, copy_size * sizeof(float));

View File

@ -93,7 +93,8 @@ build_lite_x86_64_jni_and_jar() {
cd ${LITE_JAVA_PATH}/java
rm -rf gradle .gradle gradlew gradlew.bat
local gradle_version=`gradle --version | grep Gradle | awk '{print$2}'`
local gradle_version=""
gradle_version=`gradle --version | grep Gradle | awk '{print$2}'`
if [[ ${gradle_version} == '6.6.1' ]]; then
gradle_command=gradle
else
@ -187,7 +188,8 @@ build_lite_aarch64_jni_and_jar() {
cd ${LITE_JAVA_PATH}/java
rm -rf gradle .gradle gradlew gradlew.bat
local gradle_version=`gradle --version | grep Gradle | awk '{print$2}'`
local gradle_version=""
gradle_version=`gradle --version | grep Gradle | awk '{print$2}'`
if [[ ${gradle_version} == '6.6.1' ]]; then
gradle_command=gradle
else
@ -588,7 +590,8 @@ build_aar() {
fi
cd ${LITE_JAVA_PATH}/java
rm -rf gradle .gradle gradlew gradlew.bat
local gradle_version=`gradle --version | grep Gradle | awk '{print$2}'`
local gradle_version=""
gradle_version=`gradle --version | grep Gradle | awk '{print$2}'`
if [[ ${gradle_version} == '6.6.1' ]]; then
gradle_command=gradle
else
@ -655,8 +658,10 @@ build_lite_x86_64_aarch64_jar()
exit 1
fi
local x86_64_base_path=${SERVER_X86_64_PACKAGE_FILE%/*}
local aarch64_base_path=${SERVER_AARCH64_PACKAGE_FILE%/*}
local x86_64_base_path=""
x86_64_base_path=${SERVER_X86_64_PACKAGE_FILE%/*}
local aarch64_base_path=""
aarch64_base_path=${SERVER_AARCH64_PACKAGE_FILE%/*}
echo "x86_64_base_path: "${x86_64_base_path}
echo "aarch64_base_path: "${aarch64_base_path}
@ -682,7 +687,8 @@ build_lite_x86_64_aarch64_jar()
# compile jar package
rm -rf ${LITE_JAVA_PATH}/build
# build jar
local gradle_version=`gradle --version | grep Gradle | awk '{print$2}'`
local gradle_version=""
gradle_version=`gradle --version | grep Gradle | awk '{print$2}'`
if [[ ${gradle_version} == '6.6.1' ]]; then
gradle_command=gradle
else

View File

@ -18,6 +18,7 @@
#include <map>
#include <memory>
#include <set>
#include <vector>
#include <string>
#include "src/common/log_adapter.h"
#include "src/common/utils.h"

View File

@ -16,6 +16,7 @@
#include "src/delegate/parameter_cache/gpu/gpu_cache_mem.h"
#include <cuda_runtime.h>
#include <string>
#include "src/delegate/tensorrt/cuda_impl/hash.cuh"
#include "plugin/device/gpu/hal/device/cuda_driver.h"
#include "src/common/log_adapter.h"

View File

@ -15,6 +15,7 @@
*/
#include "src/runtime/kernel/arm/int8/dynamic_quant.h"
#include <vector>
#include <algorithm>
#include "src/kernel_registry.h"
#include "schema/model_generated.h"
#include "include/errorcode.h"

View File

@ -16,6 +16,8 @@
#include "tools/converter/adapter/acl/mapper/arithmetic_mapper.h"
#include <memory>
#include <map>
#include <string>
#include "tools/converter/adapter/acl/mapper/primitive_mapper_register.h"
#include "src/common/log_util.h"
#include "ops/real_div.h"

View File

@ -268,8 +268,10 @@ getOpsFileWithNoDeepSearch() {
# concat schemaType + fileType + fileName append to files
echo "${type},${3},${out_file}.o" >>${MAPPING_OUTPUT_FILE_NAME_TMP}
local ret=$(egrep -r *.h\" ${file} | awk -F '\"' '{print $2}')
local ret_h=$(egrep -r *.h\" ${file%cc*}h | awk -F '\"' '{print $2}')
local ret=""
ret=$(egrep -r *.h\" ${file} | awk -F '\"' '{print $2}')
local ret_h=""
ret_h=$(egrep -r *.h\" ${file%cc*}h | awk -F '\"' '{print $2}')
local depend_file=("${ret}" "${ret_h}")
for array_file in ${depend_file[@]}; do
# only add existing files

View File

@ -15,6 +15,7 @@
*/
#include "tools/optimizer/format/to_nhwc_format.h"
#include <string>
namespace mindspore {
namespace opt {