NVIDIA / gdrcopy

A fast GPU memory copy library based on NVIDIA GPUDirect RDMA technology
MIT License
898 stars 144 forks source link

How to understand the file "nv-p2p-dummpy.c" #282

Closed pyt-hnu closed 1 year ago

pyt-hnu commented 1 year ago

What is the purpose of the file "nv-p2p-dummy.c"? why not to use the symbol of nvidia.ko?

pakmarkthub commented 1 year ago

Hi @pyt-hnu,

In the current design, we do not force users to install nvidia.ko before compiling gdrdrv.ko. For example, you can just have the nvidia header files ready without installing the nvidia driver. You can compile gdrdrv by make NVIDIA_SRC_DIR=<path-to-nvidia-header>. That is a reason why we have nv-p2p-dummy.

pyt-hnu commented 1 year ago

Hi @pyt-hnu,

In the current design, we do not force users to install nvidia.ko before compiling gdrdrv.ko. For example, you can just have the nvidia header files ready without installing the nvidia driver. You can compile gdrdrv by make NVIDIA_SRC_DIR=<path-to-nvidia-header>. That is a reason why we have nv-p2p-dummy.

Thanks for your reply, Does this apply to all GPUDirect RDMA technologies?

pakmarkthub commented 1 year ago

No. Some drivers are in-tree with nvidia.ko or come with the same installation package as nvidia.ko. So, they have a better way of handling this issue. On the other hand, GDRCopy is off-tree with nvidia.ko. So, we need some workaround.