Getting Started with AMD AMA Video SDK Cards¶
Chassis Setup¶
Host CPU and RAM requirements, per card:
16 hyper-threaded cores
24GB of RAM
BIOS setting:
Ensure that chassis's BIOS is set to performance mode, e.g., sleep states, clock throttling, etc. are disabled.
4x4 PCIe bifurcation must be enabled on each slot with a MA35 card.
Enable Single Root IO/Virtualization (SR-IOV).
Secure boot must be disabled.
Enable Above 4G Decoding.
Enable Access Control Services (ACS)
Enable virtualization.
Install a compatible kernel, e.g., see Linux VM Guest, Step 2, for details on how to install kernel 5.15 and other required packages. Note that if you are installing on kernel 6.5, gcc-12 is required.
Enable IOMMU by updating /etc/default/grub file to include
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash amd_iommu=on iommu=pt"
, for AMD based systemsGRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_iommu=on iommu=pt"
, for Intel based chassis
Update Grub
For Ubuntu and Debian:
sudo update-grub
For Alma and Fedora:
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
Allocate at least 4GB of huge pages, per device, plus an extra 96 huge pages, e.g., a single card with 2 devices requires 2*2048+96=4192 huge pages
sudo sh -c "echo 'vm.nr_hugepages=4192' >> /etc/sysctl.conf"
Note that if a chassis is being configured to host VMs, then the total number of huge pages, on the host, needs to be the sum of allocated RAM of all VM instances plus 96. As an example, running 6 VMs, each with 12GB of RAM, requires 6*12GB/2MB+96=36960 huge pages. (See Virtualization for details.)
Reboot
sudo reboot
Verify settings
cat /proc/cmdline BOOT_IMAGE=/vmlinuz-5.15.0-50-generic root=/dev/mapper/vg00-rootlv ro quiet splash CPU_iommu=on iommu=pt
, where CPU is one of
amd
orintel
, as per Step 3.and
cat /proc/meminfo | grep -i huge
, should return:
HugePages_Total: 4192 HugePages_Free: 4192 HugePages_Rsvd: 0 Hugepagesize: 2048 kB
Check Cards¶
To establish whether deployed cards have proper firmware installed, proceed as follows:
List AMD AMA Video SDK PCIe devices
sudo lspci -vvvd 10ee:
If devices are not listed as
Multimedia controller
and/or Region 4 size is not 512MB, a flash update is required. Refer to Flash Firmware section, for instructions.
Install the AMD AMA Video SDK¶
Ensure that you PPA feed is setup. See Package Feed Setup
Install packages
Ubuntu & Debian 12
sudo apt -y install libhugetlbfs0 libboost-all-dev dpkg --get-selections 'amd-ama*' | awk '{system("sudo apt -y purge " $1)}' sudo apt update sudo apt install amd-ama-driver amd-ama-core amd-ama-xma amd-ama-ffmpeg amd-ama-gstreamer
Fedora
sudo yum update rpm -q amd-ama-DRIVER --quiet && sudo yum remove amd-ama-DRIVER sudo yum remove amd-ama-driver amd-ama-core amd-ama-xma amd-ama-ffmpeg amd-ama-gstreamer sudo yum install amd-ama-driver amd-ama-core amd-ama-xma amd-ama-ffmpeg amd-ama-gstreamer
Alma
sudo yum update sudo dnf install epel-release sudo dnf remove amd-ama-driver amd-ama-core amd-ama-xma amd-ama-ffmpeg amd-ama-gstreamer sudo dnf install amd-ama-driver amd-ama-core amd-ama-xma amd-ama-ffmpeg amd-ama-gstreamer
Insert kernel module
sudo modprobe ama_transcoder
Note
Use apt-mark
or yum-plugin-versionlock
to lock to a specific version of SDK, e.g., sudo apt install amd-ama-driver=1.2.0-*
followed by sudo apt-mark hold amd-ama-driver
, if you wish to prevent accidental updates to the SDK.
Flash Firmware¶
Flashing is required for this release:
To flash all devices, in parallel, issue the following:
sudo /opt/amd/ama/ma35/bin/mamgmt flash -d all -p <firmware bin>
, where
firmware bin
is/opt/amd/ama/ma35/firmware/ma35_firmware.bin
.Ignore warning messages that state:
... Warning: SC update is not supported from ASIC 1 (skipping) ...
Cold reboot:
sudo systemctl poweroff
, and power up.
For more details on flashing, refer to Programing a Device.
Installation Verification¶
After each reboot or SDK update execute the following command:
Confirm driver's successful installation by:
cat /sys/class/misc/ama_transcoder0/version_information
It should return:
ZSP Version = 2.1.0 SC Version = 9.8.5 eSecure Version = 1.0.0 PCIe FW Version = 2.1.0 PCIe CTRL Patch Version = 1.0.3 PCIe PHY Patch A Version = 1.0.0
If the observed version numbers are older than the above, flashing is required. Refer to Flash Firmware section, for instructions.
Set Up the Runtime Environment¶
Run the setup script:
source /opt/amd/ama/ma35/scripts/setup.sh
Note that this script requires Bash shell to run.
Prior to running any video processing pipeline, run the following command:
mautil validate -d all
Ensure that all tests have passed.
Run Your First Examples¶
See the tutorials and examples page to learn how to run jobs on your system.