> This page is for NVIDIA Active Speaker Detection NIM, version 1.2.0 (Latest) (default).
> For other versions, use one of these documentation indexes:
> - 1.2.0 (Latest) (default): https://docs.nvidia.com/nim/maxine/active-speaker-detection/1.2.0/llms.txt
> - 1.1.0: https://docs.nvidia.com/nim/maxine/active-speaker-detection/1.1.0/llms.txt
> - 1.0.0: https://docs.nvidia.com/nim/maxine/active-speaker-detection/1.0.0/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nim/maxine/llms.txt.

# PCIe Multi-GPU Systems

On multi-GPU systems, the NIM uses peer-to-peer memory copy to transfer data between GPUs whenever this feature is available; that is, when `cudaDeviceCanAccessPeer()` returns true.

However, on bare-metal Linux systems with PCIe topology, IOMMU-enabled peer-to-peer memory copy is not supported. For more information, refer to [Host IOMMU Hardware, PCI Access Control Services, and VMs](https://docs.nvidia.com/cuda/cuda-programming-guide/03-advanced/multi-gpu-systems.html#host-iommu-hardware-pci-access-control-services-and-vms). When IOMMU is enabled, we recommend setting it to passthrough (by setting the Linux kernel parameter `iommu=pt`) to ensure optimal performance.

The following are the steps to set IOMMU to passthrough in GRUB:

1. Check whether IOMMU is enabled by running the following command:

   ```bash
   dmesg | grep -e DMAR -e IOMMU
   ```

   - **No matching output:** IOMMU is not enabled. No further action is required.
   - **Matching output:** IOMMU is enabled. Continue to the next step.

2. Check whether IOMMU is set to passthrough by running the following command:

   ```bash
   dmesg | grep -i -e iommu=pt -e iommu.*passthrough
   ```

   - **No matching output:** Continue with the GRUB configuration steps.
   - **Matching output:** IOMMU passthrough is already enabled. No further action is required.

3. Open `/etc/default/grub` file for edit and add `iommu=pt` to `GRUB_CMDLINE_LINUX` option. For example:

   ```text
   .....

   GRUB_CMDLINE_LINUX="crashkernel=auto quiet iommu=pt"

   .....
   ```

4. Based on the system's OS, use `grub-mkconfig` or `grub2-mkconfig` to generate the configuration file:

   - On systems with BIOS:

     ```bash
     grub-mkconfig -o /boot/grub2/grub.cfg #on ubuntu, debian
     grub2-mkconfig -o /boot/grub2/grub.cfg #on centos, rockylinux
     ```

   - On systems with UEFI:

     ```bash
     grub-mkconfig -o /boot/efi/EFI/<os_name>/grub.cfg #on ubuntu, debian

     grub2-mkconfig -o /boot/efi/EFI/<os_name>/grub.cfg #on centos, rockylinux

        #replace <os_name> with ubuntu, centos, debian, or rocky
     ```

5. On Ubuntu and Debian, you might need to install `grub-mkconfig`:

   ```bash
   apt install grub-common
   ```

6. Reboot the system:

   ```bash
   systemctl reboot
   ```

7. Verify that IOMMU is set to passthrough by repeating step 2.