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

Tensorrt error on second and subsequent execute_async calls #47

Open
kb1ooo opened this issue Apr 19, 2022 · 1 comment
Open

Tensorrt error on second and subsequent execute_async calls #47

kb1ooo opened this issue Apr 19, 2022 · 1 comment

Comments

@kb1ooo
Copy link

kb1ooo commented Apr 19, 2022

Hello,

I'm using a small modification of predict_tensorrt.py from the WIDERFACE example (on my own data), which works fine on my x64 linux PC. However, I'm having an issue on jetson xavier. After the first execute_async call, I'm getting the below error on subsequent calls:

python predict_tensorrt.py
Engine info:
	max batch size:  1
	device memory_size:  2417152
before memcpy_htod_async
after memcpy_htod_async
before memcpy_dtod_async
after memcpy_dtod_async
after stream.synchronize()
before memcpy_htod_async
after memcpy_htod_async
[TensorRT] ERROR: 1: [reformat.cu::NCHWToNCQHW4::826] Error Code 1: Cuda Runtime (invalid resource handle)
before memcpy_dtod_async
after memcpy_dtod_async
after stream.synchronize()
before memcpy_htod_async
after memcpy_htod_async
[TensorRT] ERROR: 1: [reformat.cu::NCHWToNCQHW4::826] Error Code 1: Cuda Runtime (invalid resource handle)
before memcpy_dtod_async
after memcpy_dtod_async
after stream.synchronize()

Code from lfd/model/lfd.py

        print("before memcpy_htod_async")
        [cuda.memcpy_htod_async(inp.device, inp.host, stream) for inp in input_buffers]
        print("after memcpy_htod_async")
        tensorrt_engine_context.execute_async(batch_size=1, bindings=bindings, stream_handle=stream.handle)
        print("before memcpy_dtod_async")
        [cuda.memcpy_dtoh_async(out.host, out.device, stream) for out in output_buffers]
        print("after memcpy_dtod_async")
        stream.synchronize()
        print("after stream.synchronize()")

Any insight helpful.

Thanks,
Marc

@YonghaoHe
Copy link
Owner

@kb1ooo have you solved the problem? I guess that the lib versions matter?

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

2 participants