tlc-pack / tlcpack

https://tlcpack.ai/
Apache License 2.0
23 stars 30 forks source link

Optimize setting LLVM version for TLCPack #191

Closed Liam-Sturge closed 4 months ago

Liam-Sturge commented 4 months ago

This change fixes issue https://github.com/tlc-pack/tlcpack/issues/190

Changes the script centos_build_llvm.sh to discover what tags are available in the LLVM project using git ls-remote. This is a more efficient approach, as it doesn't use the Github API and therefore isn't impacted by API rate limits, which will prevent the script from working correctly. The end result is the same and retrieves the latest semantic version for LLVM in the format XX.X.XX, e.g. 16.0.6.

CC @leandron @lhutton1

tqchen commented 4 months ago

Looking at the detection script. i realized that perhaps we should still ping LLVM versions manually in most cases, mainly for the purpose of reproducibility. Change LLVM version can change the possible program optimal settings, having things tied to a version helps, with some mindful updates

lhutton1 commented 4 months ago

The current application of this script only applies automatic updates to patch versions, which I believe is usually best practise. For example, package-cpu is currently pinned to "16.0.x", where only "x" is set to the latest. The variable name $LLVM_MAJOR_VERSION could probably do with an update to $LLVM_MAJOR_MINOR_VERSION to make this more explicit.