Skip to content

Commit 21b3d23

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 995189c commit 21b3d23

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;
@@ -305,6 +306,7 @@ static inline int cuda_load_functions(CudaFunctions **functions, void *logctx)
305306
GENERIC_LOAD_FUNC_PREAMBLE(CudaFunctions, cuda, CUDA_LIBNAME);
306307

307308
LOAD_SYMBOL(cuInit, tcuInit, "cuInit");
309+
LOAD_SYMBOL(cuDriverGetVersion, tcuDriverGetVersion, "cuDriverGetVersion");
308310
LOAD_SYMBOL(cuDeviceGetCount, tcuDeviceGetCount, "cuDeviceGetCount");
309311
LOAD_SYMBOL(cuDeviceGet, tcuDeviceGet, "cuDeviceGet");
310312
LOAD_SYMBOL(cuDeviceGetAttribute, tcuDeviceGetAttribute, "cuDeviceGetAttribute");

0 commit comments

Comments
 (0)