Browse Source

GraphEngine now generates a package of libraries and test executables

tags/v0.2.0-alpha
yanghaoran 4 years ago
parent
commit
7aca328ca0
3 changed files with 44 additions and 34 deletions
  1. +29
    -29
      .gitignore
  2. +11
    -1
      build.sh
  3. +4
    -4
      tests/st/test_ge_st.py

+ 29
- 29
.gitignore View File

@@ -1,29 +1,29 @@
# GraphEngine
/build
/output
/prebuilts
*.ir
*.out
# Dynamic libraries
# *.so
*.dylib
# Static libraries
*.la
*.lai
*.a
*.lib
# Protocol buffers
*_pb2.py
*.pb.h
*.pb.cc
# Object files
*.o
# Editor
.vscode
.idea/
cmake-build-*
# GraphEngine
/build
/output
/prebuilts
*.ir
*.out
# Dynamic libraries
# *.so
*.dylib
# Static libraries
*.la
*.lai
*.a
*.lib
# Protocol buffers
*_pb2.py
*.pb.h
*.pb.cc
# Object files
*.o
# Editor
.vscode
.idea/
cmake-build-*

+ 11
- 1
build.sh View File

@@ -135,7 +135,7 @@ rm -f ${OUTPUT_PATH}/lib*_stub.so
chmod -R 750 ${OUTPUT_PATH} chmod -R 750 ${OUTPUT_PATH}
find ${OUTPUT_PATH} -name "*.so*" -print0 | xargs -0 chmod 500 find ${OUTPUT_PATH} -name "*.so*" -print0 | xargs -0 chmod 500


echo "---------------- GraphEngine output package generated ----------------"
echo "---------------- GraphEngine output generated ----------------"


if [[ "X$ENABLE_GE_ST" = "Xon" ]]; then if [[ "X$ENABLE_GE_ST" = "Xon" ]]; then
cp ${BUILD_PATH}/graphengine/tests/st/st_resnet50_train ${OUTPUT_PATH} cp ${BUILD_PATH}/graphengine/tests/st/st_resnet50_train ${OUTPUT_PATH}
@@ -170,3 +170,13 @@ if [[ "X$ENABLE_GE_UT" = "Xon" || "X$ENABLE_GE_COV" = "Xon" ]]; then
gcovr -r ./ --exclude 'third_party' --exclude 'build' --exclude 'tests' --exclude 'prebuild' --exclude 'inc' --print-summary --html --html-details -d -o cov/index.html gcovr -r ./ --exclude 'third_party' --exclude 'build' --exclude 'tests' --exclude 'prebuild' --exclude 'inc' --print-summary --html --html-details -d -o cov/index.html
fi fi
fi fi

# generate output package in tar form, including ut/st libraries/executables
cd ${BASEPATH}
mkdir -p output/plugin/nnengine/ge_config/
find output/ -name graphengine_lib.tar -exec rm {} \;
cp src/ge/engine_manager/engine_conf.json output/plugin/nnengine/ge_config/
find output/ -maxdepth 1 -name libengine.so -exec mv {} output/plugin/nnengine/ \;
tar -cf graphengine_lib.tar output/*
mv -f graphengine_lib.tar output
echo "---------------- GraphEngine package archive generated ----------------"

+ 4
- 4
tests/st/test_ge_st.py View File

@@ -39,10 +39,10 @@ def test_resnet50_train():
os.environ['PYTHONPATH']=real_pythonpath os.environ['PYTHONPATH']=real_pythonpath
print('PYTHONPATH: '+os.environ.get('PYTHONPATH')) print('PYTHONPATH: '+os.environ.get('PYTHONPATH'))


os.environ['ASCEND_OPP_PATH']='/usr/local/HiAI/runtime/ops'
os.environ['ASCEND_ENGINE_PATH']='/usr/local/HiAI/runtime/lib64/plugin/opskernel/libaicpu_ms_engine.so:' \
'/usr/local/HiAI/runtime/lib64/plugin/opskernel/libfe.so:' \
'/usr/local/HiAI/runtime/lib64/plugin/opskernel/librts_engine.so:'+ \
os.environ['ASCEND_OPP_PATH']='/usr/local/Ascend/opp'
os.environ['ASCEND_ENGINE_PATH']='/usr/local/Ascend/fwkacllib/lib64/plugin/opskernel/libaicpu_engine.so:' \
'/usr/local/Ascend/fwkacllib/lib64/plugin/opskernel/libfe.so:' \
'/usr/local/Ascend/fwkacllib/lib64/plugin/opskernel/librts_engine.so:'+ \
ge_lib_dir + '/libge_local_engine.so' ge_lib_dir + '/libge_local_engine.so'
print('ASCEND_OPP_PATH: '+os.environ.get('ASCEND_OPP_PATH')) print('ASCEND_OPP_PATH: '+os.environ.get('ASCEND_OPP_PATH'))
print('ASCEND_ENGINE_PATH: '+os.environ.get('ASCEND_ENGINE_PATH')) print('ASCEND_ENGINE_PATH: '+os.environ.get('ASCEND_ENGINE_PATH'))


Loading…
Cancel
Save