Skip to content

Conversation

@ahmadsharif1
Copy link
Contributor

Now the following works and uses cuda:

python benchmarks/decoders/benchmark_decoders.py --decoders=torchcodec_core,torchcodec_core:device=cuda
video_files_paths=['/home/ahmads/personal/torchcodec/benchmarks/decoders/../../test/resources/nasa_13013.mp4']
video=/home/ahmads/personal/torchcodec/benchmarks/decoders/../../test/resources/nasa_13013.mp4, decoder=TorchCodecCore
video=/home/ahmads/personal/torchcodec/benchmarks/decoders/../../test/resources/nasa_13013.mp4, decoder=TorchCodecCore:device=cuda
[AVHWDeviceContext @ 0x9be45c0] Using current CUDA context.
[----- video=/home/ahmads/personal/torchcodec/benchmarks/decoders/../../test/resources/nasa_13013.mp4 h264 480x270, 13.013s 29.97002997002997fps -----]
                                  |  uniform 10 seek()+next()  |  random 10 seek()+next()  |  1 next()  |  10 next()  |  100 next()  |  create()+next()
1 threads: --------------------------------------------------------------------------------------------------------------------------------------------
      TorchCodecCore              |            62.9            |            50.4           |    14.9    |     16.8    |     53.1     |        25.8     
      TorchCodecCore:device=cuda  |           595.1            |           597.3           |   302.5    |    302.5    |    308.0     |                 

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 7, 2024
@ahmadsharif1 ahmadsharif1 merged commit c7724e2 into meta-pytorch:main Nov 8, 2024
37 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants