Additional SDKs for DOCA
Content:
NVIDIA® CUDA® is a parallel computing platform and programming model designed by NVIDIA for general-purpose GPU computing. The following steps detail how to set up CUDA on your environment.
These instructions assume that a BFB image has already been installed on your system.
To install CUDA on your converged accelerator:
Download and install the latest NVIDIA Data Center GPU driver.
Download and install CUDA.
InfoThe CUDA version tested to work with DOCA SDK is 11.8.0.
InfoDownloading CUDA includes the latest NVIDIA Data Center GPU driver and CUDA toolkit. For more information about CUDA and driver compatibility, refer to the NVIDIA CUDA Toolkit Release Notes .
1.1. Configuring Operation Mode
There are two modes that the NVIDIA Converged Accelerator may operate in:
Standard mode (default) – the BlueField and the GPU operate separately
BlueField-X mode – the GPU is exposed to BlueField and is no longer visible on the host
To verify which mode the system is operating in, run:
host# sudo mst start
host# sudo mlxconfig -d <device-id> q PCI_DOWNSTREAM_PORT_OWNER[4]
Standard mode output:
Device #
1: […] Configurations: Next Boot PCI_DOWNSTREAM_PORT_OWNER[4] DEVICE_DEFAULT(0)To configure standard mode, run:
host# mlxconfig -d <device-id> s PCI_DOWNSTREAM_PORT_OWNER[
4]=0x0BlueField-X mode output:
Device #
1: […] Configurations: Next Boot PCI_DOWNSTREAM_PORT_OWNER[4] EMBEDDED_CPU(15)To configure BlueField-X mode, run:
host# mlxconfig -d <device-id> s PCI_DOWNSTREAM_PORT_OWNER[
4]=0xF
Power cycle is required for configuration to take effect. For power cycle the host run:
host# ipmitool power cycle
1.2 Downloading and Installing CUDA Toolkit and Driver
This section details the necessary steps to set up CUDA on your environment. It assumes that a BFB image has already been installed on your environment.
Install CUDA by visiting the CUDA Toolkit Downloads webpage.
InfoSelect the Linux distribution and version relevant for your environment.
InfoThis section shows the native compilation option either on x86 or aarch64 hosts.
Test that the driver installation completed successfully. Run:
dpu# nvidia-smi Tue Apr
513:37:592022+-----------------------------------------------------------------------------+ | NVIDIA-SMI510.47.03Driver Version:510.47.03CUDA Version:11.8| |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |===============================+======================+======================| |0NVIDIA BF A10 Off |00000000:06:00.0Off |0| |0% 43C P0 N/A / 225W | 0MiB / 23028MiB |0% Default | | | | N/A | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=============================================================================| | No running processes found | +-----------------------------------------------------------------------------+Verify that the installation completed successfully.
Download CUDA samples repo. Run:
dpu# git clone https:
//github.com/NVIDIA/cuda-samples.gitBuild and run vectorAdd CUDA sample. Run:
dpu# cd cuda-samples/Samples/0_Introduction/vectorAdd dpu# make dpu# ./vectorAdd
NoteIf the
vectorAddsample works as expected, it should output "Test Passed".NoteIf it seems that the GPU is slow or stuck, stop execution and run:
dpu# sudo setpci -v -d ::
0302800.L=201# CPL_VC0 =32
1.3 GPUDirect RDMA
For information on GPUDirect RMDA and more, refer to DOCA GPUNetIO documentation.
NVIDIA Rivermax offers a unique IP-based solution for any media and data streaming use case.
This section provides the steps to install Rivermax assuming that a BFB image has already been installed on your environment.
2.1 Downloading Rivermax Driver
Navigate to the NVIDIA Rivermax SDK product page.
Register to be able to download the driver package using the JOIN button at the top of the page.
D ownload the appropriate driver package according to your BFB under the "Linux" subsection. For example, for Ubuntu 22.04 BFB, download
rivermax_ubuntu2204_<version>.tar.gz.
2.2 Installing Rivermax Driver
Copy the
.tgzfile to BlueField:host# sudo scp -r rivermax_ubuntu2204_<version>.tar.gz ubuntu
@192.168.100.2:/tmp/Extract the Rivermax file:
dpu# sudo tar xzf rivermax_ubuntu2204_<version>.tar.gz
Install the Rivermax driver package:
dpu# cd <rivermax-version>/Ubuntu.
22.04/deb-dist/aarch64/ dpu# sudo dpkg -i rivermax_<version>.deb
2.3 Installing Rivermax Libraries from DOCA
Rivermax libraries are compatibles with DOCA components and can be found inside the doca-dpu-repo.
Unpack the doca-dpu-repo:
dpu# sudo dpkg -i doca-dpu-repo-ubuntu2204-local_<version>_arm64.deb
Run apt update:
dpu# sudo apt-get update
Install the Rivermax libraries:
dpu# sudo apt install doca-sdk-rmax dpu# sudo apt install libdoca-sdk-rmax-dev
For additional details and guidelines, please visit the NVIDIA Rivermax SDK product page.