forked from OSSInnovation/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
|
||||
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/time_profile/timeprofile ${OUTPUT_DIR}/time_profile/
|
||||
cp ${BASEPATH}/mindspore/lite/include/*.h ${OUTPUT_DIR}/include/
|
||||
mkdir -p ${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}/third_party
|
||||
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/
|
||||
mkdir -p ${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}/third_party
|
||||
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/
|
||||
mkdir -p ${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
|
||||
cpu_kernel_mid_
|
||||
ops_mid_
|
||||
${SECUREC_LIBRARY}
|
||||
)
|
||||
|
||||
add_subdirectory(runtime/kernel/arm)
|
||||
|
|
|
@ -11,7 +11,7 @@ add_executable(benchmark
|
|||
${COMMON_SRC})
|
||||
|
||||
if (PLATFORM_ARM32 OR PLATFORM_ARM64)
|
||||
target_link_libraries(benchmark mindspore-lite ${SECUREC_LIBRARY})
|
||||
target_link_libraries(benchmark mindspore-lite)
|
||||
else()
|
||||
target_link_libraries(benchmark mindspore-lite ${SECUREC_LIBRARY} pthread)
|
||||
target_link_libraries(benchmark mindspore-lite pthread)
|
||||
endif()
|
||||
|
|
|
@ -12,7 +12,7 @@ add_executable(timeprofile
|
|||
${COMMON_SRC})
|
||||
|
||||
if (PLATFORM_ARM32 OR PLATFORM_ARM64)
|
||||
target_link_libraries(timeprofile mindspore-lite ${SECUREC_LIBRARY})
|
||||
target_link_libraries(timeprofile mindspore-lite)
|
||||
else()
|
||||
target_link_libraries(timeprofile mindspore-lite ${SECUREC_LIBRARY} pthread)
|
||||
target_link_libraries(timeprofile mindspore-lite pthread)
|
||||
endif()
|
||||
|
|
|
@ -112,8 +112,8 @@ int TimeProfile::InitSession() {
|
|||
int TimeProfile::InitCallbackParameter() {
|
||||
// before callback
|
||||
before_call_back_ = [&](const std::vector<mindspore::tensor::MSTensor *> &before_inputs,
|
||||
const std::vector<mindspore::tensor::MSTensor *> &before_outputs,
|
||||
const session::CallBackParam &callParam) {
|
||||
const std::vector<mindspore::tensor::MSTensor *> &before_outputs,
|
||||
const session::CallBackParam &callParam) {
|
||||
if (before_inputs.empty()) {
|
||||
MS_LOG(INFO) << "The num of beforeInputs is empty";
|
||||
}
|
||||
|
@ -134,8 +134,8 @@ int TimeProfile::InitCallbackParameter() {
|
|||
|
||||
// after callback
|
||||
after_call_back_ = [&](const std::vector<mindspore::tensor::MSTensor *> &after_inputs,
|
||||
const std::vector<mindspore::tensor::MSTensor *> &after_outputs,
|
||||
const session::CallBackParam &call_param) {
|
||||
const std::vector<mindspore::tensor::MSTensor *> &after_outputs,
|
||||
const session::CallBackParam &call_param) {
|
||||
uint64_t opEnd = GetTimeUs();
|
||||
|
||||
if (after_inputs.empty()) {
|
||||
|
@ -215,25 +215,25 @@ int TimeProfile::PrintResult(const std::vector<std::string> &title,
|
|||
}
|
||||
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)) {
|
||||
columnLenMax.at(1) = len + 4;
|
||||
}
|
||||
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)) {
|
||||
columnLenMax.at(2) = len + 4;
|
||||
}
|
||||
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)) {
|
||||
columnLenMax.at(3) = len + 4;
|
||||
}
|
||||
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)) {
|
||||
columnLenMax.at(4) = len + 4;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue