Skip to content

Add benchmark to compare multi-stream vs single-stream encoding - #1432

Merged
NicolasHug merged 1 commit into
meta-pytorch:mainfrom
NicolasHug:benchhhhhh
May 20, 2026
Merged

Add benchmark to compare multi-stream vs single-stream encoding#1432
NicolasHug merged 1 commit into
meta-pytorch:mainfrom
NicolasHug:benchhhhhh

Conversation

@NicolasHug

Copy link
Copy Markdown
Contributor

Basic benchmark aimed at validating that the new Encoder class isn't slower than the existing VideoEncoder and AudioEncoder.

Results on my laptop: all good.

~/dev/torchcodec-cuda (benchhhhhh*) » python benchmarks/encoders/bench_multi_stream_vs_single_stream.py

==================================================
Duration: 3s
==================================================

--- Video encoding (cpu) ---
VideoEncoder:    med = 328.95ms +- 11.82
StreamingEncoder:med = 331.38ms +- 11.46

--- Video encoding (cuda) ---
VideoEncoder:    med = 266.34ms +- 0.83
StreamingEncoder:med = 266.79ms +- 1.41

--- Audio encoding (cpu) ---
AudioEncoder:    med = 0.85ms +- 0.34
StreamingEncoder:med = 0.75ms +- 0.07

==================================================
Duration: 10s
==================================================

--- Video encoding (cpu) ---
VideoEncoder:    med = 1030.14ms +- 8.88
StreamingEncoder:med = 1034.21ms +- 26.75

--- Video encoding (cuda) ---
VideoEncoder:    med = 266.59ms +- 1.90
StreamingEncoder:med = 266.84ms +- 0.44

--- Audio encoding (cpu) ---
AudioEncoder:    med = 2.07ms +- 0.14
StreamingEncoder:med = 2.13ms +- 0.14

@pytorch-bot

pytorch-bot Bot commented May 20, 2026

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/meta-pytorch/torchcodec/1432

Note: Links to docs will display an error until the docs builds have been completed.

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label May 20, 2026
@NicolasHug
NicolasHug merged commit 96ef7a4 into meta-pytorch:main May 20, 2026
26 checks passed
@NicolasHug
NicolasHug deleted the benchhhhhh branch May 20, 2026 08:45
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.

1 participant