1,预备环境
首先安装 nvidia display driver ,cuda toolkit
其次安装依赖工具
sudo apt install build-essential devscripts debhelper fakeroot pkg-config dkms
2,下载源码
git clone --recursive https://github.com/NVIDIA/gdrcopy.git
cd gdrcopy/
git checkout v2.4.2
cd packages/
3,编译deb
$ CUDA=/usr/local/cuda ./build-deb-packages.sh
4,安装
sudo dpkg -i gdrdrv-dkms_2.4.2_amd64.Ubuntu20_04.deb
sudo dpkg -i libgdrapi_2.4.2_amd64.Ubuntu20_04.deb
sudo dpkg -i gdrcopy-tests_2.4.2_amd64.Ubuntu20_04+cuda12.6.
sudo dpkg -i gdrcopy_2.4.2_amd64.Ubuntu20_04.deb
5,测试安装效果
$ ./gdrcopy_sanity
$ ./gdrcopy_copybw
$ ./gdrcopy_copylat
$ ./numactl -N 1 -l gdrcopy_copybw -d 0 -s $((64 * 1024)) -o $((0 * 1024)) -c $((64 * 1024))