This allows using P2P on 4090 and 5090 GPUs with the 590.44.01 driver version.
See https://github.com/tinygrad/open-gpu-kernel-modules (various branches) for more info.
This modifies the kernel driver to force enable BAR1 P2P mode on GPUs not intended to use it.
Then, the transfers are done by directly writing to the other GPU physical addresses over DMA.
IOMMU virtualization must be disabled to use the patch, or transfers will fail.
Note that this is very dangerous if you run untrusted software or devices.
- Enable DMA passthrough mode for IOMMU:
- Edit
/etc/default/grub - Add
amd_iommu=on iommu=pttoGRUB_CMDLINE_LINUX_DEFAULT - Run
sudo update-grub
- Edit
- Install https://www.nvidia.com/en-us/drivers/details/258750/
- Run
./install.shin this repo - Reboot the server
- On some systems you might additionally need to disable ACS.
- On some systems resizable BAR might be unavailable.
- 4090s come up with large BAR by default, but 5090s don't.