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

Added OpenVINO 2.0 support for FFMPEG (avfilter) #223

Merged
merged 2 commits into from
Jan 16, 2024

Conversation

ilya-lavrenov
Copy link
Contributor

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

@conda-forge-webservices
Copy link
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@ilya-lavrenov
Copy link
Contributor Author

@conda-forge-admin, please rerender

recipe/meta.yaml Outdated
@@ -74,6 +74,8 @@ requirements:
- svt-av1
- ffnvcodec-headers # [linux64 or win]
- libopus
- libopenvino-dev # [not ppc64le]
- libtbb-dev # [not ppc64le]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

recipe/meta.yaml Outdated Show resolved Hide resolved
@ilya-lavrenov ilya-lavrenov marked this pull request as draft January 11, 2024 12:36
@ilya-lavrenov
Copy link
Contributor Author

@conda-forge-admin, please rerender

recipe/meta.yaml Outdated Show resolved Hide resolved
@ilya-lavrenov
Copy link
Contributor Author

@conda-forge-admin, please rerender

@hmaarrfk
Copy link
Contributor

i think you had it right at some point, just the windows libraries are never in a standard location nor do they have "standard" names.

So typically you have to "help" windows find them.

Many projects have somewhat refused our pkg-config files so we are stuck with often specifying configuration arguments.

recipe/meta.yaml Outdated Show resolved Hide resolved
@ilya-lavrenov
Copy link
Contributor Author

@conda-forge-admin, please rerender

Copy link
Contributor

Hi! This is the friendly automated conda-forge-webservice.

I tried to rerender for you but ran into some issues. Please check the output logs of the latest rerendering GitHub actions workflow run for errors. You can also ping conda-forge/core for further assistance or try re-rendering locally.

This message was generated by GitHub actions workflow run https://github.com/conda-forge/ffmpeg-feedstock/actions/runs/7498732569.

@ilya-lavrenov
Copy link
Contributor Author

@conda-forge-admin, please rerender

@ilya-lavrenov ilya-lavrenov marked this pull request as ready for review January 12, 2024 11:31
@hmaarrfk
Copy link
Contributor

is the run export not setup correctly in libopenvino:

2024-01-12T11:33:16.5581706Z WARNING (ffmpeg,lib/libavfilter.so.9): Needed DSO lib/libopenvino_c.so.2320 found in ['conda-forge/linux-64::libopenvino==2023.2.0=h59595ed_0']
2024-01-12T11:33:16.5582483Z WARNING (ffmpeg,lib/libavfilter.so.9): .. but ['conda-forge/linux-64::libopenvino==2023.2.0=h59595ed_0'] not in reqs/run, (i.e. it is overlinking) (likely) or a missing dependency (less likely)

@ilya-lavrenov
Copy link
Contributor Author

ilya-lavrenov commented Jan 12, 2024

is the run export not setup correctly in libopenvino:

2024-01-12T11:33:16.5581706Z WARNING (ffmpeg,lib/libavfilter.so.9): Needed DSO lib/libopenvino_c.so.2320 found in ['conda-forge/linux-64::libopenvino==2023.2.0=h59595ed_0']
2024-01-12T11:33:16.5582483Z WARNING (ffmpeg,lib/libavfilter.so.9): .. but ['conda-forge/linux-64::libopenvino==2023.2.0=h59595ed_0'] not in reqs/run, (i.e. it is overlinking) (likely) or a missing dependency (less likely)

good finding.
libopenvino-dev exports via run_exports a list of plugins and frontends, which depend on libopenvino. So, finally libopenvino will be installed as a transitive dependency via plugins, frontends.

But to avoid this warning, I've explicitly added libopenvino to run_exports for libopenvino-dev
https://github.com/conda-forge/openvino-feedstock/pull/61/files#diff-f3725a55bf339595bf865fec73bda8ac99f283b0810c205442021f29c06eea9aR551

@ilya-lavrenov ilya-lavrenov force-pushed the openvino-support branch 5 times, most recently from f5b707a to d96a464 Compare January 14, 2024 18:17
@ilya-lavrenov
Copy link
Contributor Author

@hmaarrfk do you know why old packages are installed?

    libopenvino:                          2023.2.0-h59595ed_0       conda-forge
    libopenvino-auto-batch-plugin:        2023.2.0-h59595ed_0       conda-forge
    libopenvino-auto-plugin:              2023.2.0-h59595ed_0       conda-forge
    libopenvino-dev:                      2023.2.0-hb80d9b1_0       conda-forge
    libopenvino-hetero-plugin:            2023.2.0-h59595ed_0       conda-forge
    libopenvino-intel-cpu-plugin:         2023.2.0-h59595ed_0       conda-forge
    libopenvino-intel-gpu-plugin:         2023.2.0-h59595ed_0       conda-forge
    libopenvino-ir-frontend:              2023.2.0-h59595ed_0       conda-forge
    libopenvino-onnx-frontend:            2023.2.0-h59595ed_0       conda-forge
    libopenvino-paddle-frontend:          2023.2.0-h59595ed_0       conda-forge
    libopenvino-pytorch-frontend:         2023.2.0-h59595ed_0       conda-forge
    libopenvino-tensorflow-frontend:      2023.2.0-h59595ed_0       conda-forge
    libopenvino-tensorflow-lite-frontend: 2023.2.0-h59595ed_0       conda-forge

Latest version is py312h53d5487_2.conda

@hmaarrfk
Copy link
Contributor

well one of my theories was protobuf, but it doesn't seem like protobuf is installed at all.

If you have a linux machine, you can "slowly" add the dependencies and see when it "fails" or "downgrades"

That is typically my strategy.

@hmaarrfk
Copy link
Contributor

Doing the above:

mamba env create --name ffmpeg=6.1.1
mamba activate ffmpeg
mamba install libopenvino

revelease that libxml2 is the culprit.

mamba repoquery whoneeds libxml2

reveals that we will need to push the migration forward
conda-forge/libhwloc-feedstock#73

@hmaarrfk
Copy link
Contributor

@conda-forge-admin please rerender

@hmaarrfk
Copy link
Contributor

ok seems like it is picking up the new version now.

@hmaarrfk
Copy link
Contributor

if one has filters, do they have to "opt-in" to use openvino, or will openvino automatically use "special hardware" instead of the CPU?

@ilya-lavrenov
Copy link
Contributor Author

if one has filters, do they have to "opt-in" to use openvino, or will openvino automatically use "special hardware" instead of the CPU?

According to https://www.phoronix.com/news/FFmpeg-OpenVINO-GPU:

The default behavior for now with FFmpeg OpenVINO support is CPU-based inference.

So, by default all DNN workloads are optimized on CPU, while GPU can also be used together with HW decoders

@hmaarrfk hmaarrfk merged commit c669402 into conda-forge:main Jan 16, 2024
14 checks passed
@ilya-lavrenov ilya-lavrenov deleted the openvino-support branch January 16, 2024 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants