cyrusbehr / YOLOv8-TensorRT-CPP

YOLOv8 TensorRT C++ Implementation
MIT License
568 stars 70 forks source link

CUDA Operation not supported #32

Closed ScottMKEdw closed 10 months ago

ScottMKEdw commented 1 year ago

Not sure what's going wrong with the GPU. I'm running CUDA 11.8

My nvidia-smi:

NVIDIA-SMI 545.23.06              Driver Version: 545.23.06    CUDA Version: 12.3     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA GeForce GTX 750 Ti      On  | 00000000:01:00.0  On |                  N/A |
|  0%   30C    P8               1W /  38W |    189MiB /  2048MiB |      4%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+

+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A       981      G   /usr/lib/xorg/Xorg                           43MiB |
|    0   N/A  N/A      1239      G   /usr/bin/gnome-shell                         69MiB |
|    0   N/A  N/A      4197      G   /usr/lib/xorg/Xorg                           70MiB |
+---------------------------------------------------------------------------------------+

Error Message:

Success, saved engine to yolov8n.engine.NVIDIAGeForceGTX750Ti.fp16.1.1
Loaded engine size: 18 MiB
Trying to load shared library libcudnn.so.8
Loaded shared library libcudnn.so.8
Using cuDNN as plugin tactic source
Using cuDNN as core library tactic source
[MemUsageChange] Init cuDNN: CPU +0, GPU +9, now: CPU 226, GPU 266 (MiB)
Deserialization required 15763 microseconds.
[MemUsageChange] TensorRT-managed allocation in engine deserialization: CPU +0, GPU +19, now: CPU 0, GPU 19 (MiB)
Trying to load shared library libcudnn.so.8
Loaded shared library libcudnn.so.8
Using cuDNN as plugin tactic source
Using cuDNN as core library tactic source
[MemUsageChange] Init cuDNN: CPU +0, GPU +8, now: CPU 226, GPU 267 (MiB)
Total per-runner device persistent memory is 1472512
Total per-runner host persistent memory is 126032
Allocated activation device memory of size 18329600
[MemUsageChange] TensorRT-managed allocation in IExecutionContext creation: CPU +0, GPU +19, now: CPU 0, GPU 38 (MiB)
CUDA lazy loading is enabled.
CUDA operation failed with code: 801(cudaErrorNotSupported), with message: operation not supported
terminate called after throwing an instance of 'std::runtime_error'
  what():  CUDA operation failed with code: 801(cudaErrorNotSupported), with message: operation not supported
Aborted (core dumped)
shikhindahikar commented 11 months ago

You need to have CUDA version less than 12 for openCV to install with CUDA support. Downgrade the NVIDIA drivers and try again maybe?

cyrusbehr commented 11 months ago

Yes @shikhindahikar is correct. Please test with CUDA 11. image

cyrusbehr commented 10 months ago

Closing this issue due to inactivity.