PennyLaneAI / PennyLaneAI/catalyst
Improve how the SciPy BLAS library is found
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 234
- Forks
- 84
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 66
Description
Catalyst support for certain JAX functions relies on a BLAS runtime library being available, specifically the OpenBLAS library shipped with SciPy. The relevant source code is located in the Python compiler driver:
https://github.com/PennyLaneAI/catalyst/blob/72698d8120bd691e7c197bb7c852e1228a261db4/frontend/catalyst/compiler.py#L289-L304
This code snippet is brittle and susceptible to different packaging configurations (for instance the assumption of the folder locations relative to the scipy package location.
At minimum we should raise a user friendly error message that there is a problem with the scipy installation.
Ideally, we would also find ways to make this more robust on the various systems, and also consider conda installations.
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
Start in frontend/catalyst/compiler.py at lines 289-304 and inspect how the SciPy OpenBLAS library path is derived. Reproduce the lookup with different SciPy packaging layouts, including conda installations, then define the expected user-friendly error for an unusable SciPy installation. Done means the BLAS runtime is found across supported layouts or failure is reported clearly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100