decord
decord copied to clipboard
CUDA error 400: invalid resource handle
Error encounting when working on Decord + TensorRT for inference time.
Reproduce
Code:
def _test2():
# for tensorrt stuff
import pycuda.autoinit
import decord
VIDEO_PATH = 'data/test_video.mp4'
vr = decord.VideoReader(VIDEO_PATH, ctx=decord.gpu(0))
frames = vr.get_batch([0,1,2])
print(frames.shape)
if __name__ == '__main__':
_test2()
Output with error:
CUDA error 400 at line 34 in file /workspace/libs/decord/src/video/nvcodec/cuda_mapped_frame.cc: invalid resource handle
Terminated
Remove the line import pycuda.autoinit, code exec normally without any error.
def _test2():
# for tensorrt stuff
# import pycuda.autoinit
import decord
VIDEO_PATH = 'data/test_video.mp4'
vr = decord.VideoReader(VIDEO_PATH, ctx=decord.gpu(0))
frames = vr.get_batch([0,1,2])
print(frames.shape)
if __name__ == '__main__':
_test2()
This may relate to this issue
Keywords: TensorRT, PyCUDA