oneapi-src / oneapi-src/level-zero
Importing pyzes fails because _LoadZeLibrary() hardcodes /usr/lib/x86_64-linux-gnu/lib
Open
Beginner friendly
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 335
- Forks
- 140
- Avg merge
- 12h 32m
- Merged PRs (30d)
- 5
Description
Current code:
libName = "/usr/lib/x86_64-linux-gnu/lib" + libName + ".so.1"
Results in this:
OSError: /usr/lib/x86_64-linux-gnu/libze_loader.so.1:
cannot open shared object file
Replacing the hardcoded path with something like:
from ctypes.util import find_library
libName = find_library("ze_loader")
fixes the issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Search for _LoadZeLibrary() and the hardcoded libName construction shown in the issue. Start by reading how pyzes imports the Level Zero loader, then verify that library discovery works without assuming /usr/lib/x86_64-linux-gnu; done means importing pyzes succeeds on systems where the loader is installed elsewhere.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100