Skip to content

Commit

Permalink
Add cuDriverGetVersion
Browse files Browse the repository at this point in the history
This allows the caller to establish what cuda driver version is in use.
I'm surprised we got this far without needing it.
  • Loading branch information
philipl committed Jun 4, 2023
1 parent 4fd7be2 commit 9402b5a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/ffnvcodec/dynlink_cuda.h
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ typedef struct CUeglFrame_st {
typedef void CUDAAPI CUstreamCallback(CUstream hStream, CUresult status, void *userdata);

typedef CUresult CUDAAPI tcuInit(unsigned int Flags);
typedef CUresult CUDAAPI tcuDriverGetVersion(int *driverVersion);
typedef CUresult CUDAAPI tcuDeviceGetCount(int *count);
typedef CUresult CUDAAPI tcuDeviceGet(CUdevice *device, int ordinal);
typedef CUresult CUDAAPI tcuDeviceGetAttribute(int *pi, CUdevice_attribute attrib, CUdevice dev);
Expand Down
2 changes: 2 additions & 0 deletions include/ffnvcodec/dynlink_loader.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ error: \
#ifdef FFNV_DYNLINK_CUDA_H
typedef struct CudaFunctions {
tcuInit *cuInit;
tcuDriverGetVersion *cuDriverGetVersion;
tcuDeviceGetCount *cuDeviceGetCount;
tcuDeviceGet *cuDeviceGet;
tcuDeviceGetAttribute *cuDeviceGetAttribute;
Expand Down Expand Up @@ -307,6 +308,7 @@ static inline int cuda_load_functions(CudaFunctions **functions, void *logctx)
GENERIC_LOAD_FUNC_PREAMBLE(CudaFunctions, cuda, CUDA_LIBNAME);

LOAD_SYMBOL(cuInit, tcuInit, "cuInit");
LOAD_SYMBOL(cuDriverGetVersion, tcuDriverGetVersion, "cuDriverGetVersion");
LOAD_SYMBOL(cuDeviceGetCount, tcuDeviceGetCount, "cuDeviceGetCount");
LOAD_SYMBOL(cuDeviceGet, tcuDeviceGet, "cuDeviceGet");
LOAD_SYMBOL(cuDeviceGetAttribute, tcuDeviceGetAttribute, "cuDeviceGetAttribute");
Expand Down

0 comments on commit 9402b5a

Please sign in to comment.