Cuda Error in initializeCommonContext

Hi guys, sample codes provided with the TensorRT are failing to “Cuda Error in initializeCommonContext”,

root@7bd0146a7877:/usr/src/tensorrt/bin# ./sample_uff_mnist
…/data/mnist/lenet5.uff
ERROR: cudnnEngine.cpp (56) - Cuda Error in initializeCommonContext: 1
ERROR: cudnnEngine.cpp (56) - Cuda Error in initializeCommonContext: 1
ERROR: sample_uff_mnist: Unable to create engine
ERROR: sample_uff_mnist: Model load failed

I use docker which contains cuda-8.0, cudnn7. Nvidia driver info is

root@7bd0146a7877:/usr/src/tensorrt/bin# nvidia-smi
Fri Dec 29 04:45:31 2017
±----------------------------------------------------------------------------+
| NVIDIA-SMI 375.66 Driver Version: 375.66 |
|-------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 1080 Off | 0000:04:00.0 Off | N/A |
| 27% 35C P8 9W / 180W | 2MiB / 8114MiB | 0% Default |
±------------------------------±---------------------±---------------------+
| 1 GeForce GTX 1080 Off | 0000:05:00.0 Off | N/A |
| 27% 37C P8 11W / 180W | 2MiB / 8114MiB | 0% Default |
±------------------------------±---------------------±---------------------+
| 2 GeForce GTX 1080 Off | 0000:08:00.0 Off | N/A |
| 27% 37C P8 9W / 180W | 2MiB / 8114MiB | 0% Default |
±------------------------------±---------------------±---------------------+
| 3 GeForce GTX 1080 Off | 0000:09:00.0 Off | N/A |
| 27% 38C P8 9W / 180W | 2MiB / 8114MiB | 0% Default |
±------------------------------±---------------------±---------------------+
| 4 GeForce GTX 1080 Off | 0000:83:00.0 Off | N/A |
| 27% 36C P8 10W / 180W | 2MiB / 8114MiB | 0% Default |
±------------------------------±---------------------±---------------------+
| 5 GeForce GTX 1080 Off | 0000:84:00.0 Off | N/A |
| 27% 35C P8 10W / 180W | 2MiB / 8114MiB | 0% Default |
±------------------------------±---------------------±---------------------+
| 6 GeForce GTX 1080 Off | 0000:87:00.0 Off | N/A |
| 27% 34C P8 10W / 180W | 2MiB / 8114MiB | 0% Default |
±------------------------------±---------------------±---------------------+
| 7 GeForce GTX 1080 Off | 0000:88:00.0 Off | N/A |
| 54% 82C P2 142W / 180W | 1565MiB / 8114MiB | 75% Default |
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
±----------------------------------------------------------------------------+

Could anyone share some solutions? Thanks very much.

Did you find any solution to this ?

I had the same problem.

[TensorRT] ERROR: safeContext.cpp (124) - Cudnn Error in initializeCommonContext: 1 (Could not initialize cudnn, please check cudnn installation.)
[TensorRT] ERROR: safeContext.cpp (124) - Cudnn Error in initializeCommonContext: 1 (Could not initialize cudnn, please check cudnn installation.)
Traceback (most recent call last):
File “/home/huang/TensorRT-7.2.3.4/samples/python/network_api_pytorch_mnist/sample.py”, line 146, in
main()
File “/home/huang/TensorRT-7.2.3.4/samples/python/network_api_pytorch_mnist/sample.py”, line 132, in main
with build_engine(weights) as engine:
AttributeError: enter

3 Likes

Have you solved the problem? I have the same problem

did you solve it?i have the same problem,cuda10.2 trt7.2

Have you solved the problem? I have the same problem