Megvii-BaseDetection / YOLOX

YOLOX is a high-performance anchor-free YOLO, exceeding yolov3~v5 with MegEngine, ONNX, TensorRT, ncnn, and OpenVINO supported. Documentation: https://yolox.readthedocs.io/
Apache License 2.0
9.29k stars 2.18k forks source link

TypeError: pybind11::init(): factory function returned nullptr #515

Open GalSang17 opened 3 years ago

GalSang17 commented 3 years ago

2021-08-17 16:54:21.379 | INFO | main:main:52 - loaded checkpoint done. [TensorRT] WARNING: Unable to determine GPU memory usage [TensorRT] WARNING: Unable to determine GPU memory usage [TensorRT] INFO: [MemUsageChange] Init CUDA: CPU +21, GPU +0, now: CPU 2675, GPU 0 (MiB) [TensorRT] INTERNAL ERROR: [runtime.cpp::isCudaInstalledCorrectly::41] Error Code 6: Internal Error (CUDA initialization failure with error 2. Please check your CUDA installation: http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html) 2021-08-17 16:54:29.291 | ERROR | main::77 - An error has been caught in function '', process 'MainProcess' (14233), thread 'MainThread' (140278735827136): Traceback (most recent call last):

File "tools/trt.py", line 77, in main() └ <function main at 0x7f93a8ca3ca0>

File "tools/trt.py", line 57, in main model_trt = torch2trt( └ <function torch2trt at 0x7f93dc156430>

File "/home/yangyang/miniconda3/envs/py38/lib/python3.8/site-packages/torch2trt-0.3.0-py3.8-linux-x86_64.egg/torch2trt/torch2trt.py", line 519, in torch2trt builder = trt.Builder(logger) │ │ └ <tensorrt.tensorrt.Logger object at 0x7f93a7af28b0> │ └ <class 'tensorrt.tensorrt.Builder'> └ <module 'tensorrt' from '/home/yangyang/miniconda3/envs/py38/lib/python3.8/site-packages/tensorrt/init.py'>

TypeError: pybind11::init(): factory function returned nullptr

SunYiLing123 commented 2 years ago

请问你解决了这个问题了吗

chairc commented 2 years ago

Please see this error message. TensorRT] INTERNAL ERROR: [runtime.cpp::isCudaInstalledCorrectly::41] Error Code 6: Internal Error (CUDA initialization failure with error 2. Please check your CUDA installation: http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html) Your cuda is not installed correctly, so you should check CUDA Installation Manual.

sahamitul commented 1 year ago

Hi @GalSang17 , did you resolve this issue? If yes, then how?