dmlc / XGBoost.jl

XGBoost Julia Package
Other
288 stars 111 forks source link

question on XGBoost_jll #168

Closed bobaronoff closed 1 year ago

bobaronoff commented 1 year ago

This is more a question on clarification than an issue to be solved. Working on Apple M1 processor, I have come to wonder if the version of libxgboost used by XGBoost.jl is compiled (with openMP) to allow multi-threading on my processor. I see that the XGBoost.jl/Lib.jl uses XGBoost_jll to provide a build of libxgboost. XGBoost_jll indicates that it compiles a version native to Apple aarch64 architecture. However, when I go into Pkg and query 'status XGBoost_jll' , there are 'No Matches' in the v1.8/Project.toml.

This raises a few questions: 1) How do I confirm the version of XGBoost_jll on my machine? 2) How do I confirm the version of libxgboost that XGBoost.jl is using? 3) Where is libxgboost installed on my machine? 4) Is it 'safe' to assume that updating XGBoost.jl will also update XGBoost_jll/libxgboost to the most current versions?

Thank you.

bobaronoff commented 1 year ago

I may have answered my own question. Can you please confirm if correct.

In looking at .julia/packages I see the XGBoost_jll was updated the same day as I updated XGBoost.jl, then ... In .Julia/packages/XGBoost_jll/zzz/artifact.toml there is a section that provides a uuid for aarch64. It also specifies that for MacOS the version of xgboost is V1.7.3. Using the uuid from the tool, looking in .julia/artifacts there is a folder with name of uuid. In this folder there is /lib/libxgboost.dylib.

Bottomline? Yes, updating XGBoost.jl does upgrade libxgboost to current version associated with current XGBoost_jll. This is reassuring. It is my understanding that as of V1.6, libxgboost does support multi-threading for Apple M1/2. (A good thing)

If I've put this together correctly, feel free to close this issue.

Thank you, again !

ExpandingMan commented 1 year ago

The Julia package manager treats the _jll's as their own packages. From a package management standpoint, XGBoost_jll is just a normal dependency of XGBoost.jl. There is a build script for XGBoost_jll, I have no idea whether it supports any ARM architectures... in principle it could but I further do not know what idiosyncrasies are involved in also getting it to run on apple's architecture. The compat bounds are currently set such that you can use any version of XGBoost_jll $\ge$ 1.7.2.

You might want to take a look at the BinaryBuilder documentation and the Pkg docs.

bobaronoff commented 1 year ago

thank you again for your prompt response and the link to BinaryBuilder. Based on the documentation for XGBoost_jll as well as the package toml on my machine there definitely is an ARM version. Poking in my directories does confirm that when one upgrades XGBoost.jl, the latest version of XGBoost_jll is upgraded as per the compatibility bounds.

My conclusion is that libxgboost is updated for version and processor.

I will close this issue.