text: Title: Exporting yolov5 model as engine format never finishes
  Body: ### Search before asking
  
  - [X] I have searched the YOLOv5 [issues](https://github.com/ultralytics/yolov5/issues) and found no similar bug report.
  
  
  ### YOLOv5 Component
  
  Export
  
  ### Bug
  
  This is what happens when exporting with onnx format: 
  ![image](https://github.com/ultralytics/yolov5/assets/108946236/b134955d-50a2-423f-984c-932382e69118)
  everything works as normal.
  
  And this is what happens when exporting with engine format:
  ![image](https://github.com/ultralytics/yolov5/assets/108946236/ae0d901f-e170-456e-bf70-a76feb068243)
  It fails and just stops with no further information
  
  I have seen another user @SeanSon2005 having the same issue in yolov8 but he wasn't clear in how he solved it and there are no similar issues on yolov5. Also neither yolov8's nor yolov5's export files have been updated to resolve the problem.
  
  ### Environment
  
  - YOLOv5  2023-11-22 Python-3.11.6 torch-2.1.1+cu118 CUDA:0 (NVIDIA GeForce RTX 4070, 12282MiB)
  - Windows 11
  - Python 3.11.6
  - tensorrt 8.6.1
  
  ### Minimal Reproducible Example
  
  Just the export.py file from the yolov5 ultralitics repo
  
  ### Additional
  
  @SeanSon2005 who was having the same problem on yolov8 says that he fixed the problem by going into the Yolo export.py and moving the import tensorrt as trt code segment after getting the onnx export but I wasnt able to replicate that so if anyone follow up on that or elaborate on where I need to move the import tensorrt as trt code segment I would appreciate it even if it doesnt solve the issue.
  
  
  
  ### Are you willing to submit a PR?
  
  - [ ] Yes I'd like to help by submitting a PR!