Alinux MUSA SDK 安装使用说明
版本 v4.3.3
2025-11
目录
1.下载软件包
软件包中应包含以下文件:
├── mccl_rc2.1.3.PH1.tar.gz
├── mudnn_rc3.1.3.PH1.tar.gz
├── musa_3.3.3-server_amd64.rpm
├── musa_toolkits_rc4.3.3.tar.gz
2.驱动安装
2.1 资源需求
- GPU 卡:MTT S5000
- 操作系统:Alibaba Cloud Linux 3 (Soaring Falcon)
- 内核版本:5.10.134-13.al8.x86_64
2.2 配置 BIOS
- 将显示器连接到主板上,并断开电源重新启动计算机。在启动过程中,按下
delete键进入 BIOS 设置界面。 - 在 BIOS 设置界面中,找到并开启 above 4G 选项。
- 查找并将 resize bar 开关置为 ON。大部分主板首次开机时此选项默认为 OFF,通常显示在 BIOS 菜单右上角。
- 关闭iommu选项。
2.3 安装 MT 驱动 rpm 包
2.3.1 环境依赖
-
查看 PCI 是否识别到显卡
lspci -nn | grep 1ed5 -
安装依赖包(若已安装请忽略)
dnf -y install dkms
2.3.2 卸载驱动
# 卸载 old musa rpm
sudo rpm -e musa
# 如果报错 mtgpu is inuse,直接重启即可
sudo rmmod mtgpu
# 查询是否仍有 mtgpu ko 残留
lsmod | grep mtgpu
2.3.3 安装驱动
# 安装 MT DDK 驱动,以 musa_3.0.0_amd64.deb 包为例
sudo rpm -ivh musa_3.3.3-server_amd64.rpm
# 强烈建议重启电脑来更换驱动
sudo reboot
# 特殊情况下希望不重启更换驱动,可以手动重新加载驱动
modprobe -rv mtgpu && modprobe mtgpu
2.3.4 设置用户组
非 Root 用户如需获取设备使用权限,可参考以下方式设置:
# 把普通用户账号,加进 render 和 video group
sudo usermod -aG render ${USER}
sudo usermod -aG video ${USER}
# 重新登入账户
2.4 验证安装 & 版本查询
2.4.1 mthreads-gmi
-
通过 mthreads-gmi 校验 DDK 安装
mthreads-gmi
2.4.2 查看版本信息
-
查看 KMD 版本信息
# 方式一dmesg | grep "Driver Version"# 方式二cat /var/log/dmesg | grep "Driver Version"
3. MUSA Toolkit 安装指南
本章主要描述 MUSA Toolkit 的详细安装步骤。
前提条件
- 已安装兼容版本 MT GPU 驱动。
3.1 准备工作
-
检查 MT GPU 驱动版本
mthreads-gmi -
若未安装或未安装适配版本 MT GPU 驱动,请参考上一节驱动安装。
3.2 安装 MUSA Toolkit
MUSA Toolkit 支持安装到主机(host)或 docker 环境中。
- 运行环境在 docker 上,建议在 docker 中安装 musa toolkit。
3.2.1 安装
以musa_toolkits_rc4.3.3.tar.gz 为例:
tar -zxvf musa_toolkits_rc4.3.3.tar.gz
cd musa_toolkits_install
bash ./install.sh -u # 先卸载环境已安装的 musa
bash ./install.sh # 非 root 用户需要 sudo 提权执行
安装完毕后,终端会输出如下提示:
Successfully installed MUSA in /usr/local/musa
Please export /usr/local/musa/bin to PATH in ~/.bashrc
export PATH=/usr/local/musa/bin:${PATH}
Please export /usr/local/musa/lib to LD_LIBRARY_PATH in ~/.bashrc
export LD_LIBRARY_PATH=/usr/local/musa/lib:${LD_LIBRARY_PATH}
3.2.2 设置环境变量
-
编辑用户终端配置文件 :
vim ~/.bashrc -
在配置文件末尾追加如下命令:
export PATH=/usr/local/musa/bin:$PATHexport LD_LIBRARY_PATH=/usr/local/musa/lib:$LD_LIBRARY_PATH -
配置文件会在下次启动终端时生效。如需立即生效:
source ~/.bashrc
3.2.3 验证
验证 MUSA Toolkit 是否安装成功:
musa_version_query
输出示例:
musa_toolkits:
{
"version": "4.3.3",
"git branch": "release_musa_4.3.0",
"git tag": "No tag",
"commit id": "0c2b53b892822dd42bfc5cbbedc5b915349025eb",
"commit date": "2025-11-03 17:52:11 +0800"
}
CUB:
{
"version": "1.12.1",
"git branch": "musa-1.12.1",
"commit id": "5ffbaa4336090806eacfb46394cc8b66cea2b0e5",
"commit date": "2024-09-13 16:27:37 +0800"
}
mccl:
{
"version": "2.1.3",
"build archs": "31",
"git branch": "release_musa_4.3.0_s5000",
"git tag": "No tag",
"commit id": "0d9214b80e5681e6e61353ab98e210d957e49260",
"commit date": "2025-11-19 20:05:28 +0800"
}
mcc:
{
"version": "4.3.3",
"git branch": "release_musa_4.3.0",
"git tag": "No tag",
"commit id": "dff551acd37635620b0cff586ff2ea5773bdec1c",
"commit date": "2025-11-18 19:39:11 +0800"
}
mtjpeg:
{
"version": "1.0.2",
"git branch": "release_musa_4.3.0",
"git tag": "No tag",
"commit id": "23ec362033bf6f9741727e7cdaca3dbf9b5c3e2f",
"commit date": "2025-10-21 17:18:41 +0800"
}
mublasLt:
{
"version": "1.10.3",
"build archs": "22,31",
"git branch": "release_musa_4.3.0",
"git tag": "No tag",
"commit id": "8b16833b6088dd18eaff13b05552cf95ee282e9e",
"commit date": "2025-11-04 10:33:18 +0800"
}
mublas:
{
"version": "1.10.3",
"build archs": "22,31",
"git branch": "release_musa_4.3.0",
"git tag": "No tag",
"commit id": "4602b519581ded5b71270a5ad0c89a516d6d9745",
"commit date": "2025-11-17 10:48:01 +0800"
}
mudnn:
{
"version": "3.1.3",
"git branch": "release_musa_4.3.0",
"git tag": "No tag",
"commit id": "8773e711323e6d22e5a7ae3e115bc6595d89cb03",
"commit date": "2025-11-19 11:29:03 +0800"
}
mufft:
{
"version": "1.10.3",
"build archs": "22;31",
"git branch": "release_musa_4.3.0",
"git tag": "No tag",
"commit id": "5735255f67b326323dcd12ee8662e8ccc9c3b679",
"commit date": "2025-11-03 17:48:00 +0800"
}
muPP:
{
"version": "1.11.3",
"build archs": "22;31",
"git branch": "release_musa_4.3.0",
"git tag": "No tag",
"commit id": "537ef20142a3cf650735bb23fda0c4671eca61b6",
"commit date": "2025-11-04 10:24:20 +0800"
}
MUPTI:
{
"version": "1.0.3",
"git branch": "release_musa_4.3.0",
"git tag": "No tag",
"commit id": "8743de560278e35d1d5e2d911f4981133fde844e",
"commit date": "2025-11-14 17:21:25 +0800"
}
murand:
{
"version": "1.1.3",
"build archs": "22;31",
"git branch": "release_musa_4.3.0",
"git tag": "No tag",
"commit id": "6700c3e6aad445c8a38d277339adf1104037ea92",
"commit date": "2025-11-04 15:00:09 +0800"
}
musify:
{
"version": "1.1.3",
"git branch": "release_musa_4.3.0",
"git tag": "No tag",
"commit id": "180144344eae6bd22ad6a960baffaec7a38ad802",
"commit date": "2025-11-03 18:32:59 +0800"
}
musolver:
{
"version": "1.4.3",
"build archs": "22,31",
"git branch": "release_musa_4.3.0",
"git tag": "No tag",
"commit id": "20ed0bf6afb5d133e4803de4d62d0e16fe28465b",
"commit date": "2025-11-04 10:27:56 +0800"
}
musparse:
{
"version": "1.5.3",
"build archs": "22,31",
"git branch": "release_musa_4.3.0",
"git tag": "No tag",
"commit id": "7d08deb8a2478319fce302022610e408e0ef8741",
"commit date": "2025-11-04 15:02:45 +0800"
}
Thrust:
{
"version": "1.12.1",
"git branch": "musa-1.12.1",
"commit id": "4fd436118a26b894b4636ffeee109e90553490fe",
"commit date": "2025-05-23 21:03:42 +0800"
}
musa_runtime:
{
"version": "4.3.3",
"git branch": "release_musa_4.3.0",
"git tag": "No tag",
"commit id": "0d19a9b18bb5945dc7e2c56b396d72cdcd07b7cd",
"commit date": "2025-11-12 17:25:34 +0800"
}
检查子模块是否正确包含以及数学库的架构是否正确。
验证 MUSA Toolkit 能否正常调用:
musaInfo
输出示例::
compiler: mcc
--------------------------------------------------------------------------------
device# 0
Name: MTT S5000
Driver Version: 4.3
Runtime Version: 4.3
compute capability: 3.1
pciBusID: 0x3
pciDeviceID: 0x0
pciDomainID: 0x0
multiProcessorCount: 56
maxThreadsPerMultiProcessor: 3072
isMultiGpuBoard: 1
clockRate: 1500 Mhz
memoryClockRate: 20000 Mhz
memoryBusWidth: 640
totalGlobalMem: 79.92 GB
sharedMemPerMultiprocessor: 192.00 KB
totalConstMem: 8192
sharedMemPerBlock: 192.00 KB
canMapHostMemory: 1
regsPerBlock: 131072
warpSize: 32
l2CacheSize: 62914560
computeMode: 0
maxThreadsPerBlock: 1024
maxThreadsDim.x: 1024
maxThreadsDim.y: 1024
maxThreadsDim.z: 1024
maxGridSize.x: 2147483647
maxGridSize.y: 2147483647
maxGridSize.z: 2147483647
concurrentKernels: 1
cooperativeLaunch: 0
cooperativeMultiDeviceLaunch: 0
isIntegrated: 0
maxTexture1D: 32768
maxTexture2D.width: 32768
maxTexture2D.height: 32768
maxTexture3D.width: 16384
maxTexture3D.height: 16384
maxTexture3D.depth: 2048
peers: device#1 device#2 device#3 device#4 device#5 device#6 device#7
non-peers: device#0
memInfo.total: 79.92 GB
memInfo.free: 79.34 GB (99%)
--------------------------------------------------------------------------------
device# 1
Name: MTT S5000
Driver Version: 4.3
Runtime Version: 4.3
compute capability: 3.1
pciBusID: 0x24
pciDeviceID: 0x0
pciDomainID: 0x0
multiProcessorCount: 56
maxThreadsPerMultiProcessor: 3072
isMultiGpuBoard: 1
clockRate: 1500 Mhz
memoryClockRate: 20000 Mhz
memoryBusWidth: 640
totalGlobalMem: 79.92 GB
sharedMemPerMultiprocessor: 192.00 KB
totalConstMem: 8192
sharedMemPerBlock: 192.00 KB
canMapHostMemory: 1
regsPerBlock: 131072
warpSize: 32
l2CacheSize: 62914560
computeMode: 0
maxThreadsPerBlock: 1024
maxThreadsDim.x: 1024
maxThreadsDim.y: 1024
maxThreadsDim.z: 1024
maxGridSize.x: 2147483647
maxGridSize.y: 2147483647
maxGridSize.z: 2147483647
concurrentKernels: 1
cooperativeLaunch: 0
cooperativeMultiDeviceLaunch: 0
isIntegrated: 0
maxTexture1D: 32768
maxTexture2D.width: 32768
maxTexture2D.height: 32768
maxTexture3D.width: 16384
maxTexture3D.height: 16384
maxTexture3D.depth: 2048
peers: device#0 device#2 device#3 device#4 device#5 device#6 device#7
non-peers: device#1
memInfo.total: 79.92 GB
memInfo.free: 79.34 GB (99%)
--------------------------------------------------------------------------------
device# 2
Name: MTT S5000
Driver Version: 4.3
Runtime Version: 4.3
compute capability: 3.1
pciBusID: 0x29
pciDeviceID: 0x0
pciDomainID: 0x0
multiProcessorCount: 56
maxThreadsPerMultiProcessor: 3072
isMultiGpuBoard: 1
clockRate: 1500 Mhz
memoryClockRate: 20000 Mhz
memoryBusWidth: 640
totalGlobalMem: 79.92 GB
sharedMemPerMultiprocessor: 192.00 KB
totalConstMem: 8192
sharedMemPerBlock: 192.00 KB
canMapHostMemory: 1
regsPerBlock: 131072
warpSize: 32
l2CacheSize: 62914560
computeMode: 0
maxThreadsPerBlock: 1024
maxThreadsDim.x: 1024
maxThreadsDim.y: 1024
maxThreadsDim.z: 1024
maxGridSize.x: 2147483647
maxGridSize.y: 2147483647
maxGridSize.z: 2147483647
concurrentKernels: 1
cooperativeLaunch: 0
cooperativeMultiDeviceLaunch: 0
isIntegrated: 0
maxTexture1D: 32768
maxTexture2D.width: 32768
maxTexture2D.height: 32768
maxTexture3D.width: 16384
maxTexture3D.height: 16384
maxTexture3D.depth: 2048
peers: device#0 device#1 device#3 device#4 device#5 device#6 device#7
non-peers: device#2
memInfo.total: 79.92 GB
memInfo.free: 79.34 GB (99%)
--------------------------------------------------------------------------------
device# 3
Name: MTT S5000
Driver Version: 4.3
Runtime Version: 4.3
compute capability: 3.1
pciBusID: 0x75
pciDeviceID: 0x0
pciDomainID: 0x0
multiProcessorCount: 56
maxThreadsPerMultiProcessor: 3072
isMultiGpuBoard: 1
clockRate: 1500 Mhz
memoryClockRate: 20000 Mhz
memoryBusWidth: 640
totalGlobalMem: 79.92 GB
sharedMemPerMultiprocessor: 192.00 KB
totalConstMem: 8192
sharedMemPerBlock: 192.00 KB
canMapHostMemory: 1
regsPerBlock: 131072
warpSize: 32
l2CacheSize: 62914560
computeMode: 0
maxThreadsPerBlock: 1024
maxThreadsDim.x: 1024
maxThreadsDim.y: 1024
maxThreadsDim.z: 1024
maxGridSize.x: 2147483647
maxGridSize.y: 2147483647
maxGridSize.z: 2147483647
concurrentKernels: 1
cooperativeLaunch: 0
cooperativeMultiDeviceLaunch: 0
isIntegrated: 0
maxTexture1D: 32768
maxTexture2D.width: 32768
maxTexture2D.height: 32768
maxTexture3D.width: 16384
maxTexture3D.height: 16384
maxTexture3D.depth: 2048
peers: device#0 device#1 device#2 device#4 device#5 device#6 device#7
non-peers: device#3
memInfo.total: 79.92 GB
memInfo.free: 79.34 GB (99%)
--------------------------------------------------------------------------------
device# 4
Name: MTT S5000
Driver Version: 4.3
Runtime Version: 4.3
compute capability: 3.1
pciBusID: 0x95
pciDeviceID: 0x0
pciDomainID: 0x0
multiProcessorCount: 56
maxThreadsPerMultiProcessor: 3072
isMultiGpuBoard: 1
clockRate: 1500 Mhz
memoryClockRate: 20000 Mhz
memoryBusWidth: 640
totalGlobalMem: 79.92 GB
sharedMemPerMultiprocessor: 192.00 KB
totalConstMem: 8192
sharedMemPerBlock: 192.00 KB
canMapHostMemory: 1
regsPerBlock: 131072
warpSize: 32
l2CacheSize: 62914560
computeMode: 0
maxThreadsPerBlock: 1024
maxThreadsDim.x: 1024
maxThreadsDim.y: 1024
maxThreadsDim.z: 1024
maxGridSize.x: 2147483647
maxGridSize.y: 2147483647
maxGridSize.z: 2147483647
concurrentKernels: 1
cooperativeLaunch: 0
cooperativeMultiDeviceLaunch: 0
isIntegrated: 0
maxTexture1D: 32768
maxTexture2D.width: 32768
maxTexture2D.height: 32768
maxTexture3D.width: 16384
maxTexture3D.height: 16384
maxTexture3D.depth: 2048
peers: device#0 device#1 device#2 device#3 device#5 device#6 device#7
non-peers: device#4
memInfo.total: 79.92 GB
memInfo.free: 79.34 GB (99%)
--------------------------------------------------------------------------------
device# 5
Name: MTT S5000
Driver Version: 4.3
Runtime Version: 4.3
compute capability: 3.1
pciBusID: 0xab
pciDeviceID: 0x0
pciDomainID: 0x0
multiProcessorCount: 56
maxThreadsPerMultiProcessor: 3072
isMultiGpuBoard: 1
clockRate: 1500 Mhz
memoryClockRate: 20000 Mhz
memoryBusWidth: 640
totalGlobalMem: 79.92 GB
sharedMemPerMultiprocessor: 192.00 KB
totalConstMem: 8192
sharedMemPerBlock: 192.00 KB
canMapHostMemory: 1
regsPerBlock: 131072
warpSize: 32
l2CacheSize: 62914560
computeMode: 0
maxThreadsPerBlock: 1024
maxThreadsDim.x: 1024
maxThreadsDim.y: 1024
maxThreadsDim.z: 1024
maxGridSize.x: 2147483647
maxGridSize.y: 2147483647
maxGridSize.z: 2147483647
concurrentKernels: 1
cooperativeLaunch: 0
cooperativeMultiDeviceLaunch: 0
isIntegrated: 0
maxTexture1D: 32768
maxTexture2D.width: 32768
maxTexture2D.height: 32768
maxTexture3D.width: 16384
maxTexture3D.height: 16384
maxTexture3D.depth: 2048
peers: device#0 device#1 device#2 device#3 device#4 device#6 device#7
non-peers: device#5
memInfo.total: 79.92 GB
memInfo.free: 79.34 GB (99%)
--------------------------------------------------------------------------------
device# 6
Name: MTT S5000
Driver Version: 4.3
Runtime Version: 4.3
compute capability: 3.1
pciBusID: 0xb2
pciDeviceID: 0x0
pciDomainID: 0x0
multiProcessorCount: 56
maxThreadsPerMultiProcessor: 3072
isMultiGpuBoard: 1
clockRate: 1500 Mhz
memoryClockRate: 20000 Mhz
memoryBusWidth: 640
totalGlobalMem: 79.92 GB
sharedMemPerMultiprocessor: 192.00 KB
totalConstMem: 8192
sharedMemPerBlock: 192.00 KB
canMapHostMemory: 1
regsPerBlock: 131072
warpSize: 32
l2CacheSize: 62914560
computeMode: 0
maxThreadsPerBlock: 1024
maxThreadsDim.x: 1024
maxThreadsDim.y: 1024
maxThreadsDim.z: 1024
maxGridSize.x: 2147483647
maxGridSize.y: 2147483647
maxGridSize.z: 2147483647
concurrentKernels: 1
cooperativeLaunch: 0
cooperativeMultiDeviceLaunch: 0
isIntegrated: 0
maxTexture1D: 32768
maxTexture2D.width: 32768
maxTexture2D.height: 32768
maxTexture3D.width: 16384
maxTexture3D.height: 16384
maxTexture3D.depth: 2048
peers: device#0 device#1 device#2 device#3 device#4 device#5 device#7
non-peers: device#6
memInfo.total: 79.92 GB
memInfo.free: 79.34 GB (99%)
--------------------------------------------------------------------------------
device# 7
Name: MTT S5000
Driver Version: 4.3
Runtime Version: 4.3
compute capability: 3.1
pciBusID: 0xde
pciDeviceID: 0x0
pciDomainID: 0x0
multiProcessorCount: 56
maxThreadsPerMultiProcessor: 3072
isMultiGpuBoard: 1
clockRate: 1500 Mhz
memoryClockRate: 20000 Mhz
memoryBusWidth: 640
totalGlobalMem: 79.92 GB
sharedMemPerMultiprocessor: 192.00 KB
totalConstMem: 8192
sharedMemPerBlock: 192.00 KB
canMapHostMemory: 1
regsPerBlock: 131072
warpSize: 32
l2CacheSize: 62914560
computeMode: 0
maxThreadsPerBlock: 1024
maxThreadsDim.x: 1024
maxThreadsDim.y: 1024
maxThreadsDim.z: 1024
maxGridSize.x: 2147483647
maxGridSize.y: 2147483647
maxGridSize.z: 2147483647
concurrentKernels: 1
cooperativeLaunch: 0
cooperativeMultiDeviceLaunch: 0
isIntegrated: 0
maxTexture1D: 32768
maxTexture2D.width: 32768
maxTexture2D.height: 32768
maxTexture3D.width: 16384
maxTexture3D.height: 16384
maxTexture3D.depth: 2048
peers: device#0 device#1 device#2 device#3 device#4 device#5 device#6
non-peers: device#7
memInfo.total: 79.92 GB
memInfo.free: 79.34 GB (99%)
4. muDNN 安装指南
本章主要描述 muDNN 的详细安装步骤。
4.1 准备工作
- 已安装兼容版本 MT GPU 驱动及 MUSA Toolkit。
4.2 安装 muDNN
4.2.1 安装
以 mudnn_rc3.1.3.PH1.tar.gz 为例:
tar -zxvf mudnn_rc3.1.3.PH1.tar.gz
cd mudnn && ./install_mudnn.sh -i #非 root 用户需要 sudo 提权执行
#卸载可通过如下命令
./install_mudnn.sh -u
4.2.2 设置环境变量
#若已设置则无需操作
export PATH=/usr/local/musa/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/musa/lib:$LD_LIBRARY_PATH
安装完成后,您可以查看 muDNN 的所有 API。
5. mccl 安装指南
本章主要描述 mccl 的详细安装步骤。
5.1 准备工作
- 已安装兼容版本 MT GPU 驱动及 MUSA Toolkit以及muDNN。
5.2 安装 mccl
5.2.1 安装
以 mccl_rc2.1.3.PH1.tar.gz 为例:
tar -zxvf mccl_rc2.1.3.PH1.tar.gz
cd mccl && ./install.sh -i #非 root 用户需要 sudo 提权执行
#卸载可通过如下命令
./install.sh -u
5.2.2 设置环境变量
#若已设置则无需操作
export PATH=/usr/local/musa/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/musa/lib:$LD_LIBRARY_PATH
安装完成后,您可以查看 mccl 的所有 API。

