PennyLaneAI / PennyLaneAI/catalyst
wheel packaging moves build tree artifacts to different locations and packages them
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 234
- Forks
- 84
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 66
Description
Impact:
As the libraries in runtime manually set the RPATH/RUNPATH to $ORIGIN/@loader_path for the build tree artifacts and then continue to use the build tree artifacts for further building and packaging (wheel), this is probably nitpicky and won't have any impact. I don't know about the libraries from the LLVM project and others, though.
As long as all RPATHs are relative to the executable and all binaries are properly assembled in the final wheel, everything should work (as it already does ATM).
Description:
As described in https://github.com/PennyLaneAI/catalyst/issues/2451, artifacts in runtime/build/lib are already a mixture of build tree and install tree artifacts. Skimming the mlir Makefile shows no install steps for the other dependencies, so I guess, build tree artifacts are being used here, too.
CMake best practice would probably be, to install (with CMake) all libraries into a common <prefix>/lib (not copying them together with the Makefile) and using that, when building the wheel. But implementing this change would require careful review and testing of all RPATHs.
I don't know, if it's worth it, implementing this, ATM. I'm just leaving this here for future reference, in case something related breaks.
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 by reviewing the artifacts under runtime/build/lib, the mlir Makefile, and the context in issue #2451. Trace how dependencies are assembled for the wheel and document the current RPATH/RUNPATH behavior; done requires a reviewed approach and testing that installed artifacts and their runtime paths work in the final wheel.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, python
- Domain
- build-system, release
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100