Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trained model export to trt error #2099

Open
Chang558 opened this issue Nov 15, 2024 · 0 comments
Open

trained model export to trt error #2099

Chang558 opened this issue Nov 15, 2024 · 0 comments

Comments

@Chang558
Copy link

Chang558 commented Nov 15, 2024

I’m trying to export a trained PyTorch model (.pt) to a TensorRT (.trt) file.

I'm following the guide yolov7-export

the error is

ty@ubuntu:~/yolo/tensorrt-python$ sudo python3 trt.py -e /home/ty/models/engine/best.engine -v /home/ty/mp4/1.mp4 --end2end
Namespace(end2end=True, engine='/home/ty/models/engine/best.engine', image=None, output=None, video='/home/ty/mp4/1.mp4')
WARNING:utils.utils:Dynamic tensor detected: 'output' with shape (-1, 7). Skipping size validation at init.
Traceback (most recent call last):
File "trt.py", line 26, in
pred = Predictor(engine_path=args.engine)
File "trt.py", line 11, in init
super(Predictor, self).init(engine_path)
File "/home/ty/yolo/tensorrt-python/utils/utils.py", line 50, in init
allocation = common.cuda_call(cudart.cudaMalloc(size))
File "/home/ty/yolo/tensorrt-python/utils/common.py", line 47, in cuda_call
check_cuda_err(err)
File "/home/ty/yolo/tensorrt-python/utils/common.py", line 41, in check_cuda_err
raise RuntimeError("Cuda Runtime Error: {}".format(err))
RuntimeError: Cuda Runtime Error: 1

onnx is excuting well but engine is fail so I want to ask about this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant