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

Can not run with another TensorRT Engine in one program. #373

Open
Water2style opened this issue Jul 28, 2020 · 9 comments
Open

Can not run with another TensorRT Engine in one program. #373

Water2style opened this issue Jul 28, 2020 · 9 comments

Comments

@Water2style
Copy link

I got a good model_trt by torch2trt, and it can run alone in a program.
But when i add an TensorRT engine in the program, it seems that program can not run an TensorRT engine and a model_trt together. But they can run correctly separately.

If I want to run two models in one program, what should i do? Thanks!

@jaybdub
Copy link
Contributor

jaybdub commented Jul 30, 2020

Hi Water2style,

Thanks for reaching out!

Hmm. I haven't seen this before personally. Do you mind sharing the code you used to produce this issue?

Also, the following information may also be helpful

  • PyTorch Version
  • TensorRT Version
  • Platform (ie: Jetson Xavier)

Best,
John

@Water2style
Copy link
Author

Hi Water2style,

Thanks for reaching out!

Hmm. I haven't seen this before personally. Do you mind sharing the code you used to produce this issue?

Also, the following information may also be helpful

  • PyTorch Version
  • TensorRT Version
  • Platform (ie: Jetson Xavier)

Best,
John

Sorry i cannot share the code, but it just a strange try(tensoRT engine + trt.pth) , ocuurs : Cudnn Error configure:7 (CUDNN_STATUS_MAPPING_ERROR) and CUDNN_STATUS_EXECUTION_FAILED
maybe i will give up this strange combination. Thank you all the same John

@BarryKCL
Copy link

BarryKCL commented Nov 3, 2020

I encountered the same problem.when I use torch2trt and another TensorRT engine, an illegal memory access was encountered,but they can run correctly separately。

@xuatpham
Copy link

xuatpham commented Feb 5, 2021

@BarryKCL excuse me, have you solved it? I'm facing the same problem when running multi tensorRT_engines in one program.
Thanks!

@fabiozappo
Copy link

Have anyone solved it? I'm facing the same problem when running a tensorRT_engine (yolov5) and another classification network (resnet_trt.pth) in the same program.

Thanks!

@xuatpham
Copy link

@fabiozappo yes, I was able to solve it bro. All you need to do is just a simple trick:
initialize a tensor before loading the model. Good luck!

@fabiozappo
Copy link

@fabiozappo yes, I was able to solve it bro. All you need to do is just a simple trick:
initialize a tensor before loading the model. Good luck!

it works!

@JosephKKim
Copy link

@xuatpham @fabiozappo
I am facing the same issue... can you please tell me how to initialize a tensor???

@xuatpham
Copy link

xuatpham commented Oct 7, 2021

@xuatpham @fabiozappo I am facing the same issue... can you please tell me how to initialize a tensor???

before loading the yolo, just initialize a tensor
example: torch.randn(1).cuda()
after that, you are good to go.

good luck bro

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

6 participants