-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support building with cmake with unity build (build speedup) #6293
Comments
To fix it the factory registry in dmlc core needs to be changed. |
Or setup SKIP_UNITY_BUILD_INCLUSION for needed source files. |
Managed to get it working and tried it out. There's some speedup but in general quite similar as XGBoost is not difficult to compile, and CMake unity build doesn't support CUDA. |
Thanks for trying !
On my Linux box xgboost takes quite a bit of time to compile which is why I asked. For one codebase we saw improvements from 6 to 10x.
I know that cmake cuda support seems to improve with time, the latest release 3.19 mention improved cuda support so hopefully one day they will support unity builds.
… On Oct 27, 2020, at 1:35 AM, Jiaming Yuan ***@***.***> wrote:
Managed to get it working and tried it out. There's some speedup but in general quite similar as XGBoost is not difficult to compile, and CMake unity build doesn't support CUDA.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#6293 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AC2O6UPMJA2CNL4XNAFH6XLSM2A37ANCNFSM4TADZQMA>.
|
@bsergean Thank you for bringing it up, it actually helps us on Windows CI build time. :-) |
Well I'm very glad it's helping.
If you end up making a new release which has it I'll be more than happy to test it, or I can just use a commit to test it actually.
… On Oct 27, 2020, at 11:06 PM, Jiaming Yuan ***@***.***> wrote:
@bsergean <https://github.com/bsergean> Thank you for bringing it up, it actually helps up on Windows CI build time. :-)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#6293 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AC2O6UMN2CE4ZWSMNTPORKDSM6YHFANCNFSM4TADZQMA>.
|
We are preparing 1.3 release. But will also keep you posted on merging the PR. |
Merged. Feel free to try it out on master. |
Hi there,
With cmake > 3.16 there is a nice (optional) feature called unity build which help speedup building large or complex C++ projects. Here is a write up on how this works. Speed ups can be pretty large.
However tweaks are sometimes required to get it to work. Typically if you have 2 constants with the same value in 2 .cpp file, a problem happens. Variables with similar name needs to only be declared once.
Here is how I tried to build xgboost but I got those errors which I have a hard time decipher.
If anyone is interested or can give us clues on how to fix that it would be appreciated. Thanks !
The text was updated successfully, but these errors were encountered: