forked from mindspore-Ecosystem/mindspore
remove securec
This commit is contained in:
parent
2608dc931e
commit
7ebc7ca801
3
build.sh
3
build.sh
|
@ -634,6 +634,7 @@ build_lite()
|
||||||
mkdir -p ${OUTPUT_DIR}/third_party
|
mkdir -p ${OUTPUT_DIR}/third_party
|
||||||
cp ${BASEPATH}/mindspore/lite/build/tools/converter/converter_lite ${OUTPUT_DIR}/converter/
|
cp ${BASEPATH}/mindspore/lite/build/tools/converter/converter_lite ${OUTPUT_DIR}/converter/
|
||||||
cp ${BASEPATH}/mindspore/lite/build/tools/benchmark/benchmark ${OUTPUT_DIR}/benchmark/
|
cp ${BASEPATH}/mindspore/lite/build/tools/benchmark/benchmark ${OUTPUT_DIR}/benchmark/
|
||||||
|
cp ${BASEPATH}/mindspore/lite/build/tools/time_profile/timeprofile ${OUTPUT_DIR}/time_profile/
|
||||||
cp ${BASEPATH}/mindspore/lite/include/*.h ${OUTPUT_DIR}/include/
|
cp ${BASEPATH}/mindspore/lite/include/*.h ${OUTPUT_DIR}/include/
|
||||||
mkdir -p ${OUTPUT_DIR}/include/ir/dtype/
|
mkdir -p ${OUTPUT_DIR}/include/ir/dtype/
|
||||||
cp ${BASEPATH}/mindspore/core/ir/dtype/type_id.h ${OUTPUT_DIR}/include/ir/dtype/
|
cp ${BASEPATH}/mindspore/core/ir/dtype/type_id.h ${OUTPUT_DIR}/include/ir/dtype/
|
||||||
|
@ -657,6 +658,7 @@ build_lite()
|
||||||
mkdir -p ${OUTPUT_DIR}/include && mkdir -p ${OUTPUT_DIR}/lib
|
mkdir -p ${OUTPUT_DIR}/include && mkdir -p ${OUTPUT_DIR}/lib
|
||||||
mkdir -p ${OUTPUT_DIR}/third_party
|
mkdir -p ${OUTPUT_DIR}/third_party
|
||||||
cp ${BASEPATH}/mindspore/lite/build/tools/benchmark/benchmark ${OUTPUT_DIR}/benchmark/
|
cp ${BASEPATH}/mindspore/lite/build/tools/benchmark/benchmark ${OUTPUT_DIR}/benchmark/
|
||||||
|
cp ${BASEPATH}/mindspore/lite/build/tools/time_profile/timeprofile ${OUTPUT_DIR}/time_profile/
|
||||||
cp ${BASEPATH}/mindspore/lite/include/*.h ${OUTPUT_DIR}/include/
|
cp ${BASEPATH}/mindspore/lite/include/*.h ${OUTPUT_DIR}/include/
|
||||||
mkdir -p ${OUTPUT_DIR}/include/ir/dtype/
|
mkdir -p ${OUTPUT_DIR}/include/ir/dtype/
|
||||||
cp ${BASEPATH}/mindspore/core/ir/dtype/type_id.h ${OUTPUT_DIR}/include/ir/dtype/
|
cp ${BASEPATH}/mindspore/core/ir/dtype/type_id.h ${OUTPUT_DIR}/include/ir/dtype/
|
||||||
|
@ -676,6 +678,7 @@ build_lite()
|
||||||
mkdir -p ${OUTPUT_DIR}/include && mkdir -p ${OUTPUT_DIR}/lib
|
mkdir -p ${OUTPUT_DIR}/include && mkdir -p ${OUTPUT_DIR}/lib
|
||||||
mkdir -p ${OUTPUT_DIR}/third_party
|
mkdir -p ${OUTPUT_DIR}/third_party
|
||||||
cp ${BASEPATH}/mindspore/lite/build/tools/benchmark/benchmark ${OUTPUT_DIR}/benchmark/
|
cp ${BASEPATH}/mindspore/lite/build/tools/benchmark/benchmark ${OUTPUT_DIR}/benchmark/
|
||||||
|
cp ${BASEPATH}/mindspore/lite/build/tools/time_profile/timeprofile ${OUTPUT_DIR}/time_profile/
|
||||||
cp ${BASEPATH}/mindspore/lite/include/*.h ${OUTPUT_DIR}/include/
|
cp ${BASEPATH}/mindspore/lite/include/*.h ${OUTPUT_DIR}/include/
|
||||||
mkdir -p ${OUTPUT_DIR}/include/ir/dtype/
|
mkdir -p ${OUTPUT_DIR}/include/ir/dtype/
|
||||||
cp ${BASEPATH}/mindspore/core/ir/dtype/type_id.h ${OUTPUT_DIR}/include/ir/dtype/
|
cp ${BASEPATH}/mindspore/core/ir/dtype/type_id.h ${OUTPUT_DIR}/include/ir/dtype/
|
||||||
|
|
|
@ -75,7 +75,6 @@ add_library(mindspore-lite SHARED ${LITE_SRC} ${ANF_SRC})
|
||||||
target_link_libraries(mindspore-lite
|
target_link_libraries(mindspore-lite
|
||||||
cpu_kernel_mid_
|
cpu_kernel_mid_
|
||||||
ops_mid_
|
ops_mid_
|
||||||
${SECUREC_LIBRARY}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
add_subdirectory(runtime/kernel/arm)
|
add_subdirectory(runtime/kernel/arm)
|
||||||
|
|
|
@ -11,7 +11,7 @@ add_executable(benchmark
|
||||||
${COMMON_SRC})
|
${COMMON_SRC})
|
||||||
|
|
||||||
if (PLATFORM_ARM32 OR PLATFORM_ARM64)
|
if (PLATFORM_ARM32 OR PLATFORM_ARM64)
|
||||||
target_link_libraries(benchmark mindspore-lite ${SECUREC_LIBRARY})
|
target_link_libraries(benchmark mindspore-lite)
|
||||||
else()
|
else()
|
||||||
target_link_libraries(benchmark mindspore-lite ${SECUREC_LIBRARY} pthread)
|
target_link_libraries(benchmark mindspore-lite pthread)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -12,7 +12,7 @@ add_executable(timeprofile
|
||||||
${COMMON_SRC})
|
${COMMON_SRC})
|
||||||
|
|
||||||
if (PLATFORM_ARM32 OR PLATFORM_ARM64)
|
if (PLATFORM_ARM32 OR PLATFORM_ARM64)
|
||||||
target_link_libraries(timeprofile mindspore-lite ${SECUREC_LIBRARY})
|
target_link_libraries(timeprofile mindspore-lite)
|
||||||
else()
|
else()
|
||||||
target_link_libraries(timeprofile mindspore-lite ${SECUREC_LIBRARY} pthread)
|
target_link_libraries(timeprofile mindspore-lite pthread)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -215,25 +215,25 @@ int TimeProfile::PrintResult(const std::vector<std::string> &title,
|
||||||
}
|
}
|
||||||
columns.push_back(iter.first);
|
columns.push_back(iter.first);
|
||||||
|
|
||||||
len = sprintf_s(stringBuf[1], 100, "%f", iter.second.second / _flags->loop_count_);
|
len = snprintf(stringBuf[1], sizeof(stringBuf[1]), "%f", iter.second.second / _flags->loop_count_);
|
||||||
if (len > columnLenMax.at(1)) {
|
if (len > columnLenMax.at(1)) {
|
||||||
columnLenMax.at(1) = len + 4;
|
columnLenMax.at(1) = len + 4;
|
||||||
}
|
}
|
||||||
columns.emplace_back(stringBuf[1]);
|
columns.emplace_back(stringBuf[1]);
|
||||||
|
|
||||||
len = sprintf_s(stringBuf[2], 100, "%f", iter.second.second / op_cost_total_);
|
len = snprintf(stringBuf[2], sizeof(stringBuf[2]), "%f", iter.second.second / op_cost_total_);
|
||||||
if (len > columnLenMax.at(2)) {
|
if (len > columnLenMax.at(2)) {
|
||||||
columnLenMax.at(2) = len + 4;
|
columnLenMax.at(2) = len + 4;
|
||||||
}
|
}
|
||||||
columns.emplace_back(stringBuf[2]);
|
columns.emplace_back(stringBuf[2]);
|
||||||
|
|
||||||
len = sprintf_s(stringBuf[3], 100, "%d", iter.second.first);
|
len = snprintf(stringBuf[3], sizeof(stringBuf[3]), "%d", iter.second.first);
|
||||||
if (len > columnLenMax.at(3)) {
|
if (len > columnLenMax.at(3)) {
|
||||||
columnLenMax.at(3) = len + 4;
|
columnLenMax.at(3) = len + 4;
|
||||||
}
|
}
|
||||||
columns.emplace_back(stringBuf[3]);
|
columns.emplace_back(stringBuf[3]);
|
||||||
|
|
||||||
len = sprintf_s(stringBuf[4], 100, "%f", iter.second.second);
|
len = snprintf(stringBuf[4], sizeof(stringBuf[4]), "%f", iter.second.second);
|
||||||
if (len > columnLenMax.at(4)) {
|
if (len > columnLenMax.at(4)) {
|
||||||
columnLenMax.at(4) = len + 4;
|
columnLenMax.at(4) = len + 4;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue