Allow for non-git-tagged LLVM versioning with the catalyst-llvm-dev package

Open
#3,352 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
57/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
cmake
Domain
build-system

Research direction

Read mlir/cmake/LLVMDevCPackConfig.cmake, especially the guard at lines 42–47 linked in the issue, and trace how the LLVM version tag is formed for catalyst-llvm-dev. Check how the guard behaves for commit-tagged and release LLVM versions; done means release versions can be packaged without weakening protection against naming clashes between builds from different commits.

Written by the indexing model from the issue text.

Description

chore

#3332 added CMake & CPack configs to create the catalyst-llvm-dev package, which contains headers and libs from LLVM/MLIR so that downstream projects can build against Catalyst without building it from source (the catalyst-dev and catalyst-runtime-dev packages are also required).

At the time of writing, Catalyst pins its LLVM dependency to a specific git commit, identified by its commit hash, rather than an LLVM release. Therefore, in order to uniquely identify the catalyst-llvm-dev version, we append the (truncated) commit hash to the LLVM version tag. For example:

catalyst-llvm-dev-Linux-x86_64-22.0.0git-8f264586.tar.gz

Before creating the package, a guard was put in place to ensure that the commit hash is present in the LLVM version tag to avoid naming clashes from two LLVM builds from the same version but different commit:

https://github.com/PennyLaneAI/catalyst/blob/f2428c5075c50da0bf823c41b721c2916513732f/mlir/cmake/LLVMDevCPackConfig.cmake#L42-L47

However, this will break in the future if Catalyst ever pins to a release of LLVM, rather than a specific commit. Should Catalyst make this change to its LLVM dependency, we will need to update this guard accordingly.

Dominant language
Python
Stars
234
Forks
84
Avg merge
3d 11h
Merged PRs (30d)
78

Getting set up

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.

More from PennyLaneAI/catalyst

All issues in PennyLaneAI/catalyst

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.