DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v1 0/1] gpu/cuda: expose GPU memory with GDRCopy
@ 2022-01-11 17:39 eagostini
  2022-01-11 17:39 ` [PATCH v1 1/1] " eagostini
  2022-02-21 22:44 ` [PATCH v2] gpu/cuda: CPU map " eagostini
  0 siblings, 2 replies; 8+ messages in thread
From: eagostini @ 2022-01-11 17:39 UTC (permalink / raw)
  To: dev; +Cc: Elena Agostini

From: Elena Agostini <eagostini@nvidia.com>

GPU CUDA implementation of the new gpudev functions
to expose GPU memory to the CPU.

Today GDRCopy library is required to pin and DMA map
the GPU memory through the BAR1 of the GPU and expose
it to the CPU.

Goal here is to hide technical details GDRCopy library
and expose the functionality through the generic
gpudev layer.

GDRCopy can be found here: https://github.com/NVIDIA/gdrcopy

To build GPU CUDA driver with GDRCopy, you need to build
DPDK indicating the gdrapi.h header file with
-Dc_args="-I/path/to/gdrapi/".

To execute you need to indicate the path to libgdrapi.so
library with the environment variable
GDRCOPY_PATH_L=/path/to/gdrcopy/lib/

If GDRCopy is not built with GPU CUDA driver, the GPU expose
functionality will not be supported by the driver.

This is an indipendent feature.
All the other GPU CUDA driver capabilities are not affected
if GDRCopy is not built.

Signed-off-by: Elena Agostini <eagostini@nvidia.com>

---
Dependency on https://patches.dpdk.org/project/dpdk/patch/20220108000457.31104-1-eagostini@nvidia.com/

Elena Agostini (1):
  gpu/cuda: expose GPU memory with GDRCopy

 drivers/gpu/cuda/cuda.c      | 101 +++++++++++++++++++++++++
 drivers/gpu/cuda/gdrcopy.c   | 139 +++++++++++++++++++++++++++++++++++
 drivers/gpu/cuda/gdrcopy.h   |  29 ++++++++
 drivers/gpu/cuda/meson.build |   6 +-
 4 files changed, 274 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/cuda/gdrcopy.c
 create mode 100644 drivers/gpu/cuda/gdrcopy.h

-- 
2.17.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-02-27 16:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-11 17:39 [PATCH v1 0/1] gpu/cuda: expose GPU memory with GDRCopy eagostini
2022-01-11 17:39 ` [PATCH v1 1/1] " eagostini
2022-02-21 22:44 ` [PATCH v2] gpu/cuda: CPU map " eagostini
2022-02-23 19:44   ` [PATCH v3] " eagostini
2022-02-25  3:12   ` [PATCH v4 1/2] doc/gpus: add cuda.ini into features eagostini
2022-02-25  3:12     ` [PATCH v4 2/2] gpu/cuda: CPU map GPU memory with GDRCopy eagostini
2022-02-27 16:49       ` Thomas Monjalon
2022-02-27 16:48     ` [PATCH v4 1/2] doc/gpus: add cuda.ini into features Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).