CUDA error 400: invalid resource handle
- Dominant language
- C++
- Stars
- 2.5k
- Forks
- 232
- PR merge metrics
- No merged PRs in 30d
Description
Error encounting when working on Decord + TensorRT for inference time.
## Reproduce
Code:
```python
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.
```python
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](https://github.com/NVIDIA/DALI/issues/408)
**Keywords**: TensorRT, PyCUDA
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.