Skip to content
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

Always build libtorchcodec{ffmpeg_major}.so instead of libtorchcodec.so #28

Closed

Conversation

NicolasHug
Copy link
Member

@NicolasHug NicolasHug commented Jun 14, 2024

When BUILD_AGAINST_INSTALLED_FFMPEG is set, we build against a single FFmpeg version, and create libtorchcodec.so. With this PR, we now create libtorchcodec{installed_ffmpeg_major_version}.so instead.

Pros:

  • we know from the .so name which ffmpeg version we're using.
  • the names of the .so files are consistent whether BUILD_AGAINST_INSTALLED_FFMPEG was set or not.

Cons:

  • The Cmake implementation is NASTY
  • The logic of finding the installed FFmpeg version must be duplicated across Python and Cmake. This is prone to de-synchronizations and bugs.

IMHO the cons outweigh the pros by a lot. I'd be in favour of not landing this, and removing the associated TODOs.

This PR addresses this comment: https://www.internalfb.com/diff/D58527965?dst_version_fbid=262903956885891&transaction_fbid=1932366733863261

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jun 14, 2024
@NicolasHug NicolasHug marked this pull request as ready for review June 14, 2024 13:06
@facebook-github-bot
Copy link
Contributor

@NicolasHug has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@NicolasHug has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@NicolasHug merged this pull request in 8030065.

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. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants