Building and Running a cuDNN Dependent Program
Building a cuDNN Dependent Program
Because cuDNN uses symbols defined in external libraries, you need to ensure that the linker can locate these libraries while building a cuDNN dependent program. One way to achieve this is by explicitly specifying them on the linker command.
Linker Dependencies for the Dynamic cuDNN Libs
- Linux
Add
-lz
to the linker command.- Windows
No additional linker flags are required for Windows.
Linker Dependencies for the Static cuDNN Libs
- Linux
Add
-lcublasLt_static -lz -lnvrtc_static -lnvrtc-builtins_static -lnvptxcompiler_static -lcudart_static
to the linker command.- Windows
Not applicable. Static cuDNN libs for Windows are not supported.
Running a cuDNN Dependent Program
While running a cuDNN dependent program, in addition to the paths to the directory of cuDNN, make sure to add the path to the directory of the following libraries to the environment variable $LD_LIBRARY_PATH
on Linux, or to the environment variable %PATH%
on Windows.
Linux
libz.so
(required byld.so
at load-time)
libcublasLt.so
(required bydlopen()
at run-time when using RNN-related features)
libnvrtc.so
(required bydlopen()
at run-time when using runtime-fusion-related features)
Windows:
cublasLt*.dll
(required byLoadLibraryA()
at run-time when using RNN-related features)
nvrtc*.dll
(required byLoadLibraryA()
at run-time when using runtime-fusion-related features)
Inter-Library Dependencies
Since cuDNN is split into several libraries, dependencies between them need to be taken into account. For more information, refer to the API Library Overview.