PennyLaneAI / PennyLaneAI/catalyst

Improve how the SciPy BLAS library is found

Open
#633 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.