dmlc / dmlc/decord

VideoReader with gpu ctx is slower than cpu ctx

Open
#106 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.5k
Forks
232
PR merge metrics
No merged PRs in 30d

Description

I test the [tests/benchmark/bench_decord.py](https://github.com/dmlc/decord/blob/master/tests/benchmark/bench_decord.py) on TITAN Xp. The gpu version get stuck at the third benchmark and is much slower than the cpu version. Is this expected?

```bash
python tests/bench_decord.py --file data/ActivityNet256/anet_1.3_video_train/0acEl97ZBME.mp4 --width -1 --height -1
2569 frames, elapsed time for sequential read: 0.6075031757354736
300 frames, elapsed time for random access(not accurate): 1.3444850444793701
300 frames, elapsed time for random access(accurate): 45.86395478248596
```

```bash
python tests/bench_decord.py --file data/ActivityNet256/anet_1.3_video_train/0acEl97ZBME.mp4 --width -1 --height -1 --gpu 0
2569 frames, elapsed time for sequential read: 2.0776472091674805
300 frames, elapsed time for random access(not accurate): 6.072170257568359
```

The video can be downloaded here [https://www.youtube.com/watch?v=0acEl97ZBME](https://www.youtube.com/watch?v=0acEl97ZBME). I resize it to 342x256, 25fps.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.