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

昇腾计算产业是基于昇腾系列(HUAWEI Ascend)处理器和基础软件构建的全栈 AI计算基础设施、行业应用及服务,https://devpress.csdn.net/organization/setting/general/146749包括昇腾系列处理器、系列硬件、CANN、AI计算框架、应用使能、开发工具链、管理运维工具、行业应用及服务等全产业链

更多推荐