快速入门
概述
本文旨在为用户简要介绍墨芯的 AI 计算卡及软件产品,提供入门使用指导,以及一条高效快捷的验证路径。
产品简介
硬件产品
墨芯目前主要推出了四款 AI 计算卡产品:S30 、S40、S40AC(Active Cooling,主动散热)和 S4,均以公司自主研发的高性能 Antoum®芯片为核心,其中,S30 AI 计算卡搭载了 3 颗 Antoum®芯片,S40 AI 计算卡和 S40AC AI 计算卡搭载了 4 颗 Antoum®芯片,而 S4 AI 计算卡则搭载了 1 颗 Antoum® 芯片。墨芯 AI 计算卡拥有最高达 32 倍的稀疏率,显著降低了计算资源的消耗,为 AI 推理任务提供了强大的计算支持。三款产品都专注于数据中心的 AI 推理应用,旨在满足各种复杂且要求严格的 AI 计算需求,并显著提升了 AI 推理的效率。 关于墨芯 AI 计算卡的更多详细信息,包括产品规格、性能指标、应用场景等,请参见 Moffett 硬件产品手册的相关内容。
说明:相较于S40 AI计算卡,S40AC AI 计算卡内置了一个涡轮风扇以增强散热性能,而在其他功能方面则与 S40 AI计算卡保持一致。
软件产品
MACS(Moffett Advanced Computing System)是墨芯专为墨芯 AI 计算卡打造的一套 AI 计算加速系统,可以在墨芯 AI 计算卡上部署高性能模型推理应用。该系统主要包含 SOLA ToolKit(包含 AI 计算卡驱动和固件、SOLA Runtime API 以及一些监控工具)和用于监控、诊断墨芯 AI 计算卡的 DCSM 相关产品。
安装墨芯 AI 计算卡
前提条件
基础设施:包括电力、服务器、网络、存储等资源。
耗材:准备标准规格的 PCI 线缆等。
墨芯 AI 计算卡:至少一张 S30/S40/S4。
操作系统:安装推荐的操作系统发行版本。推荐您安装下表中的主流操作系统发行版本,下列表格操作系统清单,已通过充分的验证测试。
操作系统版本 | 架构 | 默认内核版本 | 默认 gcc 版本 | GLIBC 版本 |
---|---|---|---|---|
Ubuntu 18.04 | x86_64 | 4.15.0 | 7.5.0 | 2.27 |
Ubuntu 20.04 | x86_64 | 5.4.0 | 9.4.0 | 2.31 |
Ubuntu 22.04 | x86_64 | 6.5.0 | 11.4 | 2.35 |
Debian 10 | x86_64 | 4.19.0 | 8.3.0 | 2.28 |
Debian 11 | x86_64 | 5.10.0 | 10.2.1 | 2.31 |
RHEL 8.2/8.3 | x86_64 | 4.18.0 | 8.3.1 | 2.28 |
RHEL 8.6 | x86_64 | 4.18.0 | 8.5.0 | 2.28 |
RHEL 9.0 | x86_64 | 5.14.0 | 11.2.1 | 2.34 |
RHEL 9.3 | x86_64 | 5.14.0 | 10.2.1 | 2.34 |
Kylin V10 | x86_64 | 4.19 | 7.3.0 | 2.28 |
AliOS 7.2 | x86_64 | 5.10 | 9.2.1 | 2.17 |
Rocky Linux 9.3 (Blue Onyx) | x86_64 | 5.14.0-362.8.1 | 11.5.0 | 2.35 |
openEuler | x86_64 | 5.10.0-240.0.0.139 | 10.3.1 | 2.34 |
安装步骤
关于安装墨芯 AI 计算卡的步骤,请参见安装墨芯 AI 计算卡。
安装 MACS
MACS(Moffett Advanced Computing System)是专为墨芯 AI 计算卡打造的软件系统,旨在为墨芯 AI 计算卡部署高性能模型和推理应用。该系统主要包含 SOLA ToolKit(包含 AI 计算卡驱动和固件、SOLA Runtime API 以及一些工具)和用于监控、诊断墨芯 SPU 设备的 DCSM等。
安装 SOLA
目前我们提供三种类型的软件包,您可按需取用,这三种软件包分别是:
RPM/Deb包:推荐使用, 可与发行版的本机包管理系统交互。
Runfile:独立于发行版,可用于大多数 Linux 发行版,不会更新发行版的本机包管理系统。
本文仅提供 Runfile 包链接,如需选择其他安装方式和获取更多安装详情,请参见 SOLA Toolkit 安装指南。
下载 SOLA 软件包。
$ wget https://moffett-oss-bucket.tos-cn-shanghai.volces.com/sola-toolkits/sola_3.11.0_x86_64.run
安装 SOLA。
$ sudo sh sola_3.11.0_x86_64.run --driver --accept
验证安装结果。
注意:必须确保查询的固件版本为1.0.17,否则可能会导致功能受限。请参见 mx-mft 用户手册 > 使用示例 > 更新板载设备固件章节将固件升级为最新版本。 执行以下命令,查看固件版本是否为最新:
$ mx-smi select -f firmware_version
firmware_version
1.0.17
1.0.17
1.0.17
SOLA-toolkit 默认安装目录为 /usr/local/sola-<version>
,工具安装在 /usr/bin/,您可在系统中全局使用 sola-toolkit:
可执行程序 | 说明 |
---|---|
mx-smi | 管理和监控设备的工具 |
mx-qual | 系统和设备质量检测工具 |
mx-mft | 设备固件管理工具 |
mx-daemon | 自动加载固件的守护进程 |
sola-uninstall | 卸载程序 |
moffett-bug-report.sh | 日志收集工具 |
安装 DCSM
MOFFETT Data Center SPU Manager (简称 DCSM) 是一套用于监控、诊断墨芯 SPU 设备的软件,旨在简化用户在集群和数据中心场景中管理和监控墨芯 SPU 设备资源。请参见 DCSM 安装指南完成 DCSM 的安装和使用。
使用 MACS
在安装好 MACS 后,我们可以通过一些命令行工具来验证并使用墨芯 AI 计算卡的基础能力。
系统管理接口 mx-smi
mx-smi 是一个命令行工具,用于管理和监控墨芯 AI 计算卡。帮助命令内容如下:
$ mx-smi -h
Moffett System Management Interface Application v2.8.0
Usage: mx-smi [OPTIONS] [SUBCOMMAND]
Options:
-h,--help Print this help message and exit
--version Display program version information and exit
-l,--loop INT:INT in [1 - 3600] [default: 5]
Probe until Ctrl+C at specified second interval.
Subcommands:
list Draw chart to show summary of devices.
query Display devices details.
select Print properties you explicit specified.
reboot Reboot device
更多使用详情,请参见 mx-smi 用户手册。
设备质量验证 mx-qual
mx-qual 主要用于墨芯计算卡设备的可用性、可靠性、性能的验证。帮助命令内容如下:
$ mx-qual -h
Moffett Quality Inspection Application v1.6.0
Usage: mx-qual [OPTIONS] SUBCOMMAND
Options:
-h,--help Print this help message and exit
--version Display program version information and exit
Subcommands:
list List all devices detected on the system
hardware_link Run hardware link test
pcie_bandwidth Run PCIe bandwidth test
memory_bandwidth Run memory bandwidth test
p2p Run peer to peer test
compute Run computing power test
stress Run stress test
memtest Run hardware memory test
eyegraph Show pcie eye graph, must be root user to run this cmd
更多使用详情,请参见 mx-qual 用户手册。
设备固件管理 mx-mft
设备固件管理工具 mx-mft 主要用于管理墨芯 AI 计算卡设备固件,可使用其命令参数查询设备固件版本信息,执行动态加载固件,重启设备,更新板载设备固件和 MCU 。帮助命令内容如下:
$ mx-mft -h
mx-mft(V1.14) avaliable commands:
mx-mft status <id> : show device status
mx-mft boot <id> <firmware package>: load bootimage for devices
mx-mft reboot <id> : reboot device
mx-mft mcu-ota <id> [<fw_file_path>]: ota devices mcu fw
mx-mft update <id> <firmware package>: update bootloader for devices
for command detail help, use "mx-mft -h <command>"
for mx-mft version information, use "mx-mft -v"
更多使用详情,请参见 mx-mft 用户手册。
使用 DCSM 组件
DCSM 组件主要包括 mx-hostengine 和 dcsmi 两部分,您可以通过 DCSM 组件来管控墨芯 AI 计算卡。帮助命令内容显示如下:
$ mx-hostengine --help
MOFFETT Data Center SPU Manager (DCSM)
Usage: mx-hostengine [OPTIONS]
Options:
-h,--help Print this help message and exit
--version Display program version information and exit
-t,--term Terminates Host Engine Daemon [Best Effort]
-p,--port <PORT> Specify the port for the Host Engine. Default: 9494.
-d,--domain-socket <SOCKET_PATH>
Specify the Unix domain socket path for host engine.
No TCP listening port is opened when this option is specified.
Default: /tmp/mx-hostengine
-n,--no-daemon Tell the host engine not to daemonize on start-up
-b,--bind-interface <IP_ADDRESS>
Specify the IP address of the network interface that the host engine should listen on.
ALL = bind to all interfaces.
Default: 127.0.0.1
--log-level <LEVEL> Specify the logging level. Default: ERROR
NONE - Disable logging
FATAL - Set log level to FATAL only
ERROR - Set log level to ERROR and above
WARN - Set log level to WARNING and above
INFO - Set log level to INFO and above
DEBUG - Set log level to DEBUG and above
-f,--log-filename <FILENAME>
Specify the filename mx-hostengine should use to dump logging information.
Default: /var/log/dcsm/mx-hostengine.log
$ dcsmi --help
Data Center SPU Manager Interface
Usage: dcsmi [OPTIONS] SUBCOMMAND
Options:
-h,--help Print this help message and exit
--version Display program version information and exit
Subcommands:
discovery Used to discover and identify SPUs and their attributes.
group Used to create and maintain groups of SPUs. Groups of SPUs can then be uniformly controlled through other DCSMI subcommand.
stats Used to view job statistics.
diag Used to run diagnostics on the system. Only localhost is supported now.
更多使用详情请参见 DCSM 用户手册。
SOLA 示例验证
墨芯 AI 计算卡支持运行主流模型,例如 ResNet50、BERT 、bloom等,并具有多媒体处理功能。我们提供了模型运行示例,详情请参见 SOLA 示例验证手册 。
云原生探索
墨芯 AI 计算卡致力于为云原生领域提供高效、灵活的 AI 算力解决方案,助力用户在云环境中轻松部署和使用 AI 应用。
MACS容器化:墨芯 AI 计算卡支持主流的容器化技术,提供高效稳定的镜像服务,在镜像中内置了基本的环境依赖和模型示例,帮助用户快速在墨芯 AI 计算卡上完成模型开发和应用部署,使用详情请参见 MACS 容器化示例。
Moffett Container Toolkit:简化容器的创建流程和参数项,帮助用户快速构建和部署AI 应用,可根据不同 AI 任务的需求,指定分配墨芯 AI 计算卡的算力资源,有效避免资源浪费,确保算力得到最优化利用。使用详情请参见 Moffett Container Toolkit 用户手册。
Moffett Kubernetes plugin:用于在Kubernetes集群, 自动化部署和调度AI 计算卡的算力资源。 请参见 墨芯 Kubernetes 设备插件使用说明。
DCSM Exporter :为便于用户监控 墨芯AI 计算卡 数据指标,我们推出了 DCSM Exporter 工具,结合 Prometheus 和 Grafana,实现动态可观测的数据指标展示。更多使用详情,请参见 DCSM Exporter 用户手册。
接下来,让我们尽情享受墨芯稀疏化计算之旅!