uxlfoundation / oneAPI-spec

oneAPI Specification source files
https://spec.oneapi.com
Other
183 stars 107 forks source link

OneVPL dispatcher library path handling is non-standard / surprising to users #418

Open eero-t opened 2 years ago

eero-t commented 2 years ago

The problem

According to spec, both dispatcher library paths and their order is fixed, and can be changed only with an environment variable (either LD_LIBRARY_PATH, or ONEVPL_SEARCH_PATH) on Linux: https://spec.oneapi.io/versions/latest/elements/oneVPL/source/programming_guide/VPL_prg_session.html

Whereas user expectation is that libraries are automatically found from the paths they are installed.

For example, installing OneVPL media stack under standard /usr/local/ location, fails to work. Everything else installed there (e.g. 3d, compute and lower level media drivers), also work from there, but OneVPL does not. This is both non-standard and unexpected. It's also hard to debug, because OpenVPL dispatcher fails without even trying to load a single driver. See: https://github.com/oneapi-src/oneVPL/issues/56

Potential additional issues

Further issues from this design:

How more mature APIs deal with dispatching

There are more mature APIs with dispatchers than OneVPL, for example OpenGL, OpenCL and Vulkan.

Both of the above options fix the issues of:

MordragT commented 1 year ago

I was rather surprised by this as well. I am trying to package the oneVPL for Nixos, but setting the rpath to the runtime is not working while LD_LIBRARY_PATH works fine. At least searching for the runtime in the directory where the library sits would be great. As it is now if i wanted to use oneVPL for another application in Nixos i would always need to specify the runtime with LD_LIBRARY_PATH, as nixos isn't using the FHS directories to package software.