NPU型号:Atlas 300i pro

https://www.hiascend.com/document/detail/zh/mind-sdk/60rc1/mxVision/mxvisionug/mxvisionug_0014.html
https://gitee.com/chou-shun/ffmpeg-ascend


#下载mxVisionSDK安装包
wget https://ascend-repo.obs.cn-east-2.myhuaweicloud.com/CANN/CANN%206.0.1/Ascend-cann-toolkit_6.0.1_linux-aarch64.run
wget https://ascend-repo.obs.cn-east-2.myhuaweicloud.com/Ascend%20HDK/Ascend%20HDK%2024.1.RC1/Ascend-hdk-310p-npu-driver_24.1.rc1_linux-aarch64.run
wget https://ascend-repo.obs.cn-east-2.myhuaweicloud.com/Ascend%20HDK/Ascend%20HDK%2024.1.RC1/Ascend-hdk-310p-npu-firmware_7.1.0.6.220.run
https://www.hiascend.com/document/detail/zh/mind-sdk/60rc1/mxVision/mxvisionug/mxvisionug_0013.html 

chmod +x Ascend-cann-toolkit_6.0.1_linux-aarch64.run
./Ascend-cann-toolkit_6.0.1_linux-aarch64.run  --install --install-for-all
chmod +x Ascend-hdk-310p-npu-driver_24.1.rc1_linux-aarch64.run
chmod +x Ascend-hdk-310p-npu-firmware_7.1.0.6.220.run
./Ascend-hdk-310p-npu-driver_24.1.rc1_linux-aarch64.run --full  --install-for-all
./Ascend-hdk-310p-npu-firmware_7.1.0.6.220.run --full
#报错若提示少用户,执行useradd创建即可
#如果报错not a physical-machine, firmware upgrade does not support.,则执行:npu-smi info、/usr/local/Ascend/driver/tools/upgrade-tool --device_index -1 --component -1 --version,看没有输出即可,装完之后重启生效

#安装SDK
. /usr/local/Ascend/ascend-toolkit/set_env.sh
./Ascend-mindxsdk-mxvision_6.0.RC1_linux-aarch64.run --install
. /root/mxVision/set_env.sh

#添加到/etc/bashrc里
export ASCEND_HOME=/usr/local/Ascend
export FFMPEG_LIB_PATH=/usr/local/ffmpeg/ffmpeg-ascend/ascend/lib
export LD_LIBRARY_PATH=${FFMPEG_LIB_PATH}:${ASCEND_HOME}/ascend-toolkit/latest/acllib/lib64:$LD_LIBRARY_PATH
source /root/mxVision/set_env.sh
source /usr/local/Ascend/ascend-toolkit/set_env.sh


git clone https://gitee.com/chou-shun/ffmpeg-ascend.git

#编译脚本
#!/bin/bash
source /etc/bashrc

./configure \
    --prefix=./ascend \
    --enable-shared \
    --extra-cflags="-I${ASCEND_HOME}/ascend-toolkit/latest/acllib/include" \
    --extra-ldflags="-L${ASCEND_HOME}/ascend-toolkit/latest/acllib/lib64" \
    --extra-libs="-lacl_dvpp_mpi -lascendcl" \
    --enable-ascend \
    && make -j4 && make install

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐