Description
🐛 Describe the bug
The command to verify decoder outputs during the benchmark fails when comparing OpenCV's frames to TorchCodecPublic.
python benchmarks/decoders/benchmark_decoders.py --decoders torchaudio:stream_index=0,torchcodec_public:seek_mode=approximate+stream_index=0,opencv --verify-outputs
AssertionError: Tensor-likes are not equal!
Mismatched elements: 38759 / 172800 (22.4%)
Greatest absolute difference: 16 at index (0, 98, 96)
Greatest relative difference: inf at index (0, 44, 210)
This error appears when using the default test video, but was not reproducible when using a video generated with the following command.
ffmpeg -f lavfi -i testsrc=duration=10:size=1280x720:rate=30 -vf "drawtext=fontfile=/path/to/font.ttf: text='%{pts\:hms}': x=(w-text_w)/2: y=(h-text_h)/2: fontsize=48: fontcolor=white: box=1: [email protected]: boxborderw=5, hue=H=2*t" -pix_fmt yuv420p output.mp4
Versions
Collecting environment information...
PyTorch version: 2.8.0.dev20250522+cpu
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A
OS: CentOS Stream 9 (x86_64)
GCC version: (GCC) 11.5.0 20240719 (Red Hat 11.5.0-5)
Clang version: 20.1.1 (CentOS 20.1.1-3.el9)
CMake version: version 4.0.0
Libc version: glibc-2.34
Python version: 3.13.2 | packaged by Anaconda, Inc. | (main, Feb 6 2025, 18:56:02) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-6.9.0-0_fbk3_1265_g43ac291a024d-x86_64-with-glibc2.34
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
CPU:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 52 bits physical, 57 bits virtual
Byte Order: Little Endian
CPU(s): 56
On-line CPU(s) list: 0-55
Vendor ID: GenuineIntel
Model name: Intel Xeon Processor (Icelake)
CPU family: 6
Model: 134
Thread(s) per core: 2
Core(s) per socket: 28
Socket(s): 1
Stepping: 0
BogoMIPS: 2000.00
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq dtes64 vmx ssse3 fma cx16 pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx_vnni avx512_bf16 wbnoinvd arat vnmi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid cldemote movdiri movdir64b fsrm md_clear arch_capabilities
Virtualization: VT-x
Hypervisor vendor: KVM
Virtualization type: full
L1d cache: 1.8 MiB (56 instances)
L1i cache: 1.8 MiB (56 instances)
L2 cache: 112 MiB (28 instances)
L3 cache: 16 MiB (1 instance)
NUMA node(s): 1
NUMA node0 CPU(s): 0-55
Vulnerability Gather data sampling: Not affected
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Vulnerable
Vulnerability Reg file data sampling: Vulnerable
Vulnerability Retbleed: Not affected
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass: Vulnerable
Vulnerability Spectre v1: Vulnerable: __user pointer sanitization and usercopy barriers only; no swapgs barriers
Vulnerability Spectre v2: Vulnerable; IBPB: disabled; STIBP: disabled; PBRSB-eIBRS: Not affected; BHI: Vulnerable
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Mitigation; TSX disabled
Versions of relevant libraries:
[pip3] flake8==6.1.0
[pip3] flake8-bugbear==23.3.23
[pip3] flake8-comprehensions==3.15.0
[pip3] flake8-executable==2.1.3
[pip3] flake8-logging-format==0.9.0
[pip3] flake8-pyi==23.3.1
[pip3] flake8-simplify==0.19.3
[pip3] mypy==1.14.0
[pip3] mypy_extensions==1.0.0
[pip3] numpy==2.1.0
[pip3] onnx==1.17.0
[pip3] onnxscript==0.2.2
[pip3] optree==0.13.0
[pip3] pytorch_sphinx_theme==0.0.24
[pip3] torch==2.8.0.dev20250522+cpu
[pip3] torchaudio==2.6.0.dev20250522+cpu
[pip3] torchcodec==0.5.0a0
[pip3] torchvision==0.19.0a0+d23a6e1
[conda] mkl 2025.0.0 hacee8c2_941
[conda] mkl-include 2025.0.0 hc79277c_941
[conda] numpy 2.1.0 pypi_0 pypi
[conda] numpy-base 2.2.5 py313hc428782_0
[conda] optree 0.13.0 pypi_0 pypi
[conda] pytorch-sphinx-theme 0.0.24 pypi_0 pypi
[conda] torch 2.8.0.dev20250522+cpu pypi_0 pypi
[conda] torchaudio 2.6.0.dev20250522+cpu pypi_0 pypi
[conda] torchcodec 0.5.0a0 pypi_0 pypi