1

I am searching for information about cuGetExportTable or cudaGetExportTable. In particular, I want to know what functions are included in the table. A previous post (cudaGetExportTable a total hack) mentions that

I concluded that the export table is a list of function pointers into internal driver functions

If this post is correct, there are functions that are not included in the CUDA driver API. So there is a way to perform allocations, frees, memcpy to the GPU without using cuMemAlloc etc? Or the functions included in the export table are some kind of GPU management functions?

paleonix
  • 2,293
  • 1
  • 13
  • 29
MANOS
  • 21
  • 8
  • cuGetExportTable is undocumented by NVIDIA. However NVIDIA provides a [cuHook sample code](https://github.com/phrb/intro-cuda/tree/master/src/cuda-samples/7_CUDALibraries/cuHook) that may be of interest. – Robert Crovella Jul 07 '23 at 15:09
  • @RobertCrovella: How are those two things supposed to be related? – einpoklum Jul 07 '23 at 20:57
  • AFAIK the export table in question is a list of call points or "exports" that are published by libcuda. So they are the actual call points for cuInit, cuMemAlloc, etc. into the so. I assume that is related to OP's question "So there is a way to perform allocations, frees, memcpy to the GPU without using cuMemAlloc etc? " Based on that, the `cuHook` sample codes shows how to hook entry points, so you can generically call cuda API functions without actually calling the named functions eg. `cuInit`, etc. I view those as conceptually similar. If you don't think so, just ignore it. It's a comment. – Robert Crovella Jul 07 '23 at 21:35
  • Thank you very much for your response. So if I understand correctly, the export table contains pointers or symbols to the Cuda driver API, not to another "hidden" API. However, it is only used from NVIDIA libraries (cuBLAS, cuFFT, etc). As a result, the only entry point to the GPU is through the CUDA driver API. – MANOS Jul 08 '23 at 11:46
  • The export table may also contain other things (e.g. "hidden" API) besides pointers to "known" functions such as `cuInit()`. Did I mention it is undocumented? It is not intended for you to use it directly. I won't be able to discuss further. – Robert Crovella Jul 08 '23 at 13:56
  • Thank you. Undocumented means that there is NO description of what it does. It does NOT mean that it could call functions outside the driver API, so it is another gateway to the GPU. – MANOS Jul 08 '23 at 17:00

0 Answers0