-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PR: Add PyTorch FFmpeg to wheel and conda distributions #2596
Conversation
@fmassa, it seems that the decoder backend is broken in Windows, is this expected? |
@andfoy this is not expected, and I believe we at some point tested the Windows compilation of the decoder |
@andfoy what do you think about the following: you disable Windows for FFmpeg for now, revert the changes that are specific to trying to fix Windows, and we open a new issue to track fixing Windows for this and add the Windows label, so that @peterjc123 and colleagues can have a look at it? |
@fmassa, I managed to fix the Windows compilation issues, right now we're having test failures on both Linux and Windows |
Does it pass locally for you? Maybe the machine is running out of memory? Can you ssh to the machine to debug? |
No, they fail and segfault as well, I don't know if the errors are related to the ffmpeg binaries that av uses vs ours, I'll try again with gdb and see where it fails |
It seems that |
So this means that we would need to ship ffmpeg without MMX optimizations? Do you have an idea if it would make the binaries much slower than the ones we currently have for some machines? |
It seems that on modern architectures MMX was superseded by SSE/2/3/4 and AVX, so in principle, disabling MMX should only affect very old processors, as FFmeg has individual flags to disable SSE and AVX: https://github.com/FFmpeg/FFmpeg/blob/05c8d0bce64888c5312822fbc9cdb63934b86519/configure#L430 |
Interesting, test failures could seem related, although most of them are on For the error in vision/torchvision/io/_video_opt.py Line 91 in 8dfcff7
with the .format equivalent. There might have been a change in torchscript that made the % stop working.
|
The error here is that some tests are trying to use |
@andfoy if tests pass when only running on |
Found more information related to the test failure cases: |
Great, this is awesome, we will soon be unblocking this and @bjuncek PR I believe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's merge this PR and see how it goes.
We can clean a few things up (following @peterjc123 comment) on a follow-up PR.
Also, ccing @malfet and @seemethere for visibility -- we are adding ffmpeg as a dependency for torchvision.
* Add PyTorch FFmpeg to wheel and conda distributions * Try to install wget from conda * Add yq flag on Mac * Correct copy instructions * Use cURL on Windows * Call bzip2 directly due to msys2/MSYS2-packages#1548 * Copy ffmpeg binaries to system-wide directories * Try to use std:c++17 on Windows * Try to define ssize_t on Windows * Use C++14 * Declare AVRational structs explicitly * Initialize AVRational explicitly * Replace macro to prevent errors on Windows * Replace AV_TIME_BASE_Q * Add library paths for video extension * Force ffmpeg from pytorch channels? * Fix clang style warnings * Update CONDA_CHANNEL_FLAGS * Fix clang style issues * Update unittest * Use FFmpeg 4.2 * Install correct version on Mac * Pin av version to 8.0.0 * Fix string formatting issue * Fix pip pinning * Try with 8.0.1 * Use av 8.0.2 * Remove trailling whitespaces * Disable test_io_opt.py * Disable test_datasets_video_utils Co-authored-by: Francisco Massa <[email protected]>
* Add PyTorch FFmpeg to wheel and conda distributions * Try to install wget from conda * Add yq flag on Mac * Correct copy instructions * Use cURL on Windows * Call bzip2 directly due to msys2/MSYS2-packages#1548 * Copy ffmpeg binaries to system-wide directories * Try to use std:c++17 on Windows * Try to define ssize_t on Windows * Use C++14 * Declare AVRational structs explicitly * Initialize AVRational explicitly * Replace macro to prevent errors on Windows * Replace AV_TIME_BASE_Q * Add library paths for video extension * Force ffmpeg from pytorch channels? * Fix clang style warnings * Update CONDA_CHANNEL_FLAGS * Fix clang style issues * Update unittest * Use FFmpeg 4.2 * Install correct version on Mac * Pin av version to 8.0.0 * Fix string formatting issue * Fix pip pinning * Try with 8.0.1 * Use av 8.0.2 * Remove trailling whitespaces * Disable test_io_opt.py * Disable test_datasets_video_utils Co-authored-by: Francisco Massa <[email protected]>
This PR enables the inclusion of FFmpeg LGPL binaries on wheel distributions and also updates the conda recipe dependencies to include FFmpeg as well
Fixes #2365