diff --git a/model_zoo/official/recommend/naml/ascend310_infer/CMakeLists.txt b/model_zoo/official/recommend/naml/ascend310_infer/CMakeLists.txt index a5a23bc8fe4..7788a4b7139 100644 --- a/model_zoo/official/recommend/naml/ascend310_infer/CMakeLists.txt +++ b/model_zoo/official/recommend/naml/ascend310_infer/CMakeLists.txt @@ -40,10 +40,6 @@ include_directories( ../include/ ) -if(target STREQUAL "Simulator_Function") - add_compile_options(-DFUNC_SIM) -endif() - # add host lib path link_directories( ${LIB_PATH} @@ -53,8 +49,8 @@ link_directories( set(PROJECT_SRC_ROOT ${CMAKE_CURRENT_LIST_DIR}/) # Set include directory and library directory -set(ACL_LIB_DIR $ENV{ASCEND_HOME}/acllib) -set(ATLAS_ACL_LIB_DIR $ENV{ASCEND_HOME}/ascend-toolkit/latest/acllib) +set(ACL_LIB_DIR $ENV{ASCEND_HOME}/fwkacllib) +set(ATLAS_ACL_LIB_DIR $ENV{ASCEND_HOME}/ascend-toolkit/latest/fwkacllib) # Header path include_directories(${ACL_LIB_DIR}/include/) include_directories(${ATLAS_ACL_LIB_DIR}/include/) @@ -63,6 +59,7 @@ include_directories(${PROJECT_SRC_ROOT}/../inc) # add host lib path link_directories(${ACL_LIB_DIR}) find_library(acl libascendcl.so ${ACL_LIB_DIR}/lib64 ${ATLAS_ACL_LIB_DIR}/lib64) +find_library(stdc libstdc++.so.6 /usr/) add_executable(main ./src/utils.cpp @@ -70,6 +67,6 @@ add_executable(main ./src/sample_process.cpp ./src/main.cpp) -target_link_libraries(main ${acl} stdc++ gflags) +target_link_libraries(main ${acl} ${stdc} gflags) install(TARGETS main DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) diff --git a/model_zoo/official/recommend/naml/script/run_infer_310.sh b/model_zoo/official/recommend/naml/script/run_infer_310.sh index 69be76920c4..4f0fd16e156 100755 --- a/model_zoo/official/recommend/naml/script/run_infer_310.sh +++ b/model_zoo/official/recommend/naml/script/run_infer_310.sh @@ -58,15 +58,15 @@ echo $device_id export ASCEND_HOME=/usr/local/Ascend/ if [ -d ${ASCEND_HOME}/ascend-toolkit ]; then - export PATH=$ASCEND_HOME/ascend-toolkit/latest/fwkacllib/ccec_compiler/bin:$ASCEND_HOME/ascend-toolkit/latest/atc/bin:$PATH - export LD_LIBRARY_PATH=/usr/local/lib:$ASCEND_HOME/ascend-toolkit/latest/atc/lib64:$ASCEND_HOME/ascend-toolkit/latest/acllib/lib64:$ASCEND_HOME/ascend-toolkit/latest/fwkacllib/lib64:$ASCEND_HOME/driver/lib64:$ASCEND_HOME/add-ons:$LD_LIBRARY_PATH + export PATH=$ASCEND_HOME/fwkacllib/bin:$ASCEND_HOME/fwkacllib/ccec_compiler/bin:$ASCEND_HOME/ascend-toolkit/latest/fwkacllib/ccec_compiler/bin:$ASCEND_HOME/ascend-toolkit/latest/atc/bin:$PATH + export LD_LIBRARY_PATH=$ASCEND_HOME/fwkacllib/lib64:/usr/local/lib:$ASCEND_HOME/ascend-toolkit/latest/atc/lib64:$ASCEND_HOME/ascend-toolkit/latest/acllib/lib64:$ASCEND_HOME/ascend-toolkit/latest/fwkacllib/lib64:$ASCEND_HOME/driver/lib64:$ASCEND_HOME/add-ons:$LD_LIBRARY_PATH export TBE_IMPL_PATH=$ASCEND_HOME/ascend-toolkit/latest/opp/op_impl/built-in/ai_core/tbe - export PYTHONPATH=${TBE_IMPL_PATH}:$ASCEND_HOME/ascend-toolkit/latest/fwkacllib/python/site-packages:$PYTHONPATH + export PYTHONPATH=$ASCEND_HOME/fwkacllib/python/site-packages:${TBE_IMPL_PATH}:$ASCEND_HOME/ascend-toolkit/latest/fwkacllib/python/site-packages:$PYTHONPATH export ASCEND_OPP_PATH=$ASCEND_HOME/ascend-toolkit/latest/opp else - export PATH=$ASCEND_HOME/atc/ccec_compiler/bin:$ASCEND_HOME/atc/bin:$PATH - export LD_LIBRARY_PATH=/usr/local/lib:$ASCEND_HOME/atc/lib64:$ASCEND_HOME/acllib/lib64:$ASCEND_HOME/driver/lib64:$ASCEND_HOME/add-ons:$LD_LIBRARY_PATH - export PYTHONPATH=$ASCEND_HOME/atc/python/site-packages:$PYTHONPATH + export PATH=$ASCEND_HOME/fwkacllib/bin:$ASCEND_HOME/fwkacllib/ccec_compiler/bin:$ASCEND_HOME/atc/ccec_compiler/bin:$ASCEND_HOME/atc/bin:$PATH + export LD_LIBRARY_PATH=$ASCEND_HOME/fwkacllib/lib64:/usr/local/lib:$ASCEND_HOME/atc/lib64:$ASCEND_HOME/acllib/lib64:$ASCEND_HOME/driver/lib64:$ASCEND_HOME/add-ons:$LD_LIBRARY_PATH + export PYTHONPATH=$ASCEND_HOME/fwkacllib/python/site-packages:$ASCEND_HOME/atc/python/site-packages:$PYTHONPATH export ASCEND_OPP_PATH=$ASCEND_HOME/opp fi