diff --git a/utils/ascend310_env_set/README.md b/utils/ascend310_env_set/README.md new file mode 100644 index 0000000000000000000000000000000000000000..0060829e2b581ee90de880d28e8e72651994e096 --- /dev/null +++ b/utils/ascend310_env_set/README.md @@ -0,0 +1,47 @@ +# Description + +In order to ensure that the script can run normally on the Ascend 310/310P, environment variables need to be set before inference is executed. + +## Check the installation path + +If the root user is used to install the run package, the default path is '/usr/local/Ascend', and the default installation path for non-root users is '/home/HwHiAiUser/Ascend'. + +Take the path of the root user as an example, set the environment variables as follows: + +```bash +export ASCEND_HOME=/usr/local/Ascend # the root directory of run package +``` + +## Identify the run package version + +The run package is divided into two versions according to whether the 'ascend-toolkit' directory exists in the installation path. + +If 'ascend-toolkit' directory exists, set the environment variables as follows: + +```bash +export ASCEND_HOME=/usr/local/Ascend +export PATH=${ASCEND_HOME}/ascend-toolkit/latest/compiler/bin:${ASCEND_HOME}/ascend-toolkit/latest/compiler/ccec_compiler/bin/:${PATH} +export LD_LIBRARY_PATH=${ASCEND_HOME}/driver/lib64:${ASCEND_HOME}/ascend-toolkit/latest/lib64:${LD_LIBRARY_PATH} +export ASCEND_OPP_PATH=${ASCEND_HOME}/ascend-toolkit/latest/opp +export ASCEND_AICPU_PATH=${ASCEND_HOME}/ascend-toolkit/latest/ +export PYTHONPATH=${ASCEND_HOME}/ascend-toolkit/latest/compiler/python/site-packages:${PYTHONPATH} +export TOOLCHAIN_HOME=${ASCEND_HOME}/ascend-toolkit/latest/toolkit +``` + +Another version: + +```bash +export ASCEND_HOME=/usr/local/Ascend +export PATH=${ASCEND_HOME}/latest/compiler/bin:${ASCEND_HOME}/latest/compiler/ccec_compiler/bin:${PATH} +export LD_LIBRARY_PATH=${ASCEND_HOME}/driver/lib64:${ASCEND_HOME}/latest/lib64:${LD_LIBRARY_PATH} +export ASCEND_OPP_PATH=${ASCEND_HOME}/latest/opp +export ASCEND_AICPU_PATH=${ASCEND_HOME}/latest +export PYTHONPATH=${ASCEND_HOME}/latest/compiler/python/site-packages:${PYTHONPATH} +export TOOLCHAIN_HOME=${ASCEND_HOME}/latest/toolkit +``` + +## Set the Host log level + +```bash +export GLOG_v=2 # 0-DEBUG, 1-INFO, 2-WARNING, 3-ERROR, 4-CRITICAL, default level is WARNING. +``` diff --git a/utils/ascend310_env_set/README_CN.md b/utils/ascend310_env_set/README_CN.md new file mode 100644 index 0000000000000000000000000000000000000000..e7369618e70ad0364202231e2486b6159e3902c2 --- /dev/null +++ b/utils/ascend310_env_set/README_CN.md @@ -0,0 +1,47 @@ +# 绠€浠� + +涓轰簡纭繚鑴氭湰鑳藉姝e父鍦拌繍琛屽湪鏄囪吘310/310P锛岄渶瑕佸湪鎵ц鎺ㄧ悊鍓嶈缃幆澧冨彉閲忋€� + +## 纭run鍖呭畨瑁呰矾寰� + +鑻ヤ娇鐢╮oot鐢ㄦ埛瀹屾垚run鍖呭畨瑁咃紝榛樿璺緞涓�'/usr/local/Ascend'锛岄潪root鐢ㄦ埛鐨勯粯璁ゅ畨瑁呰矾寰勪负'/home/HwHiAiUser/Ascend'銆� + +浠oot鐢ㄦ埛鐨勮矾寰勪负渚嬶紝璁剧疆鐜鍙橀噺濡備笅锛� + +```bash +export ASCEND_HOME=/usr/local/Ascend # the root directory of run package +``` + +## 鍖哄垎run鍖呯増鏈� + +run鍖呭垎涓�2涓増鏈紝鐢ㄥ畨瑁呯洰褰曚笅鏄惁瀛樺湪'ascend-toolkit'鏂囦欢澶硅繘琛屽尯鍒嗐€� + +濡傛灉瀛樺湪'ascend-toolkit'鏂囦欢澶癸紝璁剧疆鐜鍙橀噺濡備笅锛� + +```bash +export ASCEND_HOME=/usr/local/Ascend +export PATH=${ASCEND_HOME}/ascend-toolkit/latest/compiler/bin:${ASCEND_HOME}/ascend-toolkit/latest/compiler/ccec_compiler/bin/:${PATH} +export LD_LIBRARY_PATH=${ASCEND_HOME}/driver/lib64:${ASCEND_HOME}/ascend-toolkit/latest/lib64:${LD_LIBRARY_PATH} +export ASCEND_OPP_PATH=${ASCEND_HOME}/ascend-toolkit/latest/opp +export ASCEND_AICPU_PATH=${ASCEND_HOME}/ascend-toolkit/latest/ +export PYTHONPATH=${ASCEND_HOME}/ascend-toolkit/latest/compiler/python/site-packages:${PYTHONPATH} +export TOOLCHAIN_HOME=${ASCEND_HOME}/ascend-toolkit/latest/toolkit +``` + +鑻ヤ笉瀛樺湪锛岃缃幆澧冨彉閲忎负锛� + +```bash +export ASCEND_HOME=/usr/local/Ascend +export PATH=${ASCEND_HOME}/latest/compiler/bin:${ASCEND_HOME}/latest/compiler/ccec_compiler/bin:${PATH} +export LD_LIBRARY_PATH=${ASCEND_HOME}/driver/lib64:${ASCEND_HOME}/latest/lib64:${LD_LIBRARY_PATH} +export ASCEND_OPP_PATH=${ASCEND_HOME}/latest/opp +export ASCEND_AICPU_PATH=${ASCEND_HOME}/latest +export PYTHONPATH=${ASCEND_HOME}/latest/compiler/python/site-packages:${PYTHONPATH} +export TOOLCHAIN_HOME=${ASCEND_HOME}/latest/toolkit +``` + +## 璁剧疆Host渚ф棩蹇楃骇鍒� + +```bash +export GLOG_v=2 # 0-DEBUG, 1-INFO, 2-WARNING, 3-ERROR, 4-CRITICAL, default level is WARNING. +```