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

[UR] Loader prefilter negative filters behave unexpectedly. #17086

Open
aarongreig opened this issue Feb 20, 2025 · 0 comments
Open

[UR] Loader prefilter negative filters behave unexpectedly. #17086

aarongreig opened this issue Feb 20, 2025 · 0 comments

Comments

@aarongreig
Copy link
Contributor

Right now we have some code in the loader which parses ONEAPI_DEVICE_SELECTOR to exclude loading libraries based on the backend components of the filter strings. The intention of this is that you can pass ONEAPI_DEVICE_SELECTOR=opencl:* and the loader will only load the opencl adapter library, which is beneficial because some adapter libraries have side-effects when loaded due to how drivers are implemented.

This code also supports negative filter strings, where you prepend ! to make your filter an anti-pattern. This can cause some strange behaviour because the device type component of the filters is completely ignored. For example, the filter string !opencl:fpga should mean "give me any device that doesn't have the opencl backend and the fpga device type", but our implementation interprets it as !opencl:*, or "give me any device that doesn't have the opencl backend" - which results in the opencl adapter not being loaded and no opencl devices being reported. A worse example is device type only filters: something like !*:cpu should mean "exclude cpu devices", but since the device type is ignored it becomes !*:* - exclude all devices, which results in none of the adapter libraries being loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant