Skip to content

Commit 9402b5a

Browse files
committed
Add cuDriverGetVersion
This allows the caller to establish what cuda driver version is in use. I'm surprised we got this far without needing it.
1 parent 4fd7be2 commit 9402b5a

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

include/ffnvcodec/dynlink_cuda.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,7 @@ typedef struct CUeglFrame_st {
416416
typedef void CUDAAPI CUstreamCallback(CUstream hStream, CUresult status, void *userdata);
417417

418418
typedef CUresult CUDAAPI tcuInit(unsigned int Flags);
419+
typedef CUresult CUDAAPI tcuDriverGetVersion(int *driverVersion);
419420
typedef CUresult CUDAAPI tcuDeviceGetCount(int *count);
420421
typedef CUresult CUDAAPI tcuDeviceGet(CUdevice *device, int ordinal);
421422
typedef CUresult CUDAAPI tcuDeviceGetAttribute(int *pi, CUdevice_attribute attrib, CUdevice dev);

include/ffnvcodec/dynlink_loader.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ error: \
137137
#ifdef FFNV_DYNLINK_CUDA_H
138138
typedef struct CudaFunctions {
139139
tcuInit *cuInit;
140+
tcuDriverGetVersion *cuDriverGetVersion;
140141
tcuDeviceGetCount *cuDeviceGetCount;
141142
tcuDeviceGet *cuDeviceGet;
142143
tcuDeviceGetAttribute *cuDeviceGetAttribute;
@@ -307,6 +308,7 @@ static inline int cuda_load_functions(CudaFunctions **functions, void *logctx)
307308
GENERIC_LOAD_FUNC_PREAMBLE(CudaFunctions, cuda, CUDA_LIBNAME);
308309

309310
LOAD_SYMBOL(cuInit, tcuInit, "cuInit");
311+
LOAD_SYMBOL(cuDriverGetVersion, tcuDriverGetVersion, "cuDriverGetVersion");
310312
LOAD_SYMBOL(cuDeviceGetCount, tcuDeviceGetCount, "cuDeviceGetCount");
311313
LOAD_SYMBOL(cuDeviceGet, tcuDeviceGet, "cuDeviceGet");
312314
LOAD_SYMBOL(cuDeviceGetAttribute, tcuDeviceGetAttribute, "cuDeviceGetAttribute");

0 commit comments

Comments
 (0)