1 Linux系统
1.1 安装驱动
(1)使用管理员用户登录到系统下,将驱动run包上传到系统下。
(2)执行以下命令安装依赖包:
Redhat、Centos、银河麒麟、Ning OS、统信UOS、OpenEuler系统:
yum install -y rpm-build gcc-c++ cmake automake elfutils-libelf-devel libdrm libdrm-devel pciutils
yum install -y kernel-devel-`uname -r`
Ubuntu系统:
apt install -y gcc g++ cmake automake libelf-dev libdrm-amdgpu1 libtinfo5 pciutils libdrm-dev
apt install mlocate mlocate
apt install -y linux-headers-`uname -r`

(3)上传驱动文件到系统(rock-xxxx.run),并附权。
chmod +x rock-xxxx.run

(4)执行以下命令安装驱动,并直接进行vbios更新。
./rock-xxxx.run -u 0 -r 0
(5)完成后reboot重启生效,使用命令lsmod |grep -i hydcu,可查到驱动加载信息。
(6)执行 source /opt/hyhal/env.sh 命令 使用hy-smi查询GPU设备,hy-smi命令出现回显GPU设备信息,即驱动安装成功。

1.2 安装DTK
(1)Ubuntu系统:
sudo apt-get update
sudo apt-get install -y cmake
sudo apt-get install -y gcc
sudo apt-get install -y autoconf
sudo apt-get install -y linux-kernel-headers
sudo apt-get install -y kernel-package
sudo apt-get install -y automake
sudo apt-get install -y make gcc g++ cmake git wget gfortran elfutils libdrm-dev
sudo apt-get install -y kmod libtinfo5 sqlite3 libsqlite3-dev libelf-dev
sudo apt-get install -y libnuma-dev libgl1-mesa-dev rpm rsync mesa-common-dev apt-utils
sudo apt-get install -y cmake libpci-dev pciutils libpciaccess-dev libbabeltrace-dev pkg-config
sudo apt-get install -y libfile-which-perl libfile-basedir-perl libfile-copy-recursive-perl libfile-listing-perl
sudo apt-get install -y python3 python3-pip python3-dev python3-wheel
sudo apt-get install -y gettext gettext-base libprotobuf-dev tcl
(2)将DTK-24.04.3-xxxx-x86_64.tar上传到系统下,并解压
tar -zxvf DTK-24.04.3-xxxx-x86_64.tar -C /opt
(3)执行该命令创建软连接:ln -s /opt/dtk-24.04.3 /opt/dtk
(4)执行以下命令设置 DTK 环境变量:echo "source /opt/dtk/env.sh" >> ~/.bashrc
(5)完成后reboot重启生效,验证 DCU 环境,执行hy-smi或rocm-smi回显如下GPU信息,即表示安装成功。

(6)执行dpkg -l |grep -i rock或hy-smi --showdriverversion查看驱动版本。

