XGBoost Optimized for Intel® Architecture Getting Started Guide

ID 768299
Updated 8/31/2021
Version Latest
Public

author-image

By

About XGBoost Optimized for Intel® Architecture

Starting with XGBoost 0.81 version onward, Intel has been directly upstreaming many optimizations to provide superior performance on Intel® CPUs. This well-known, machine-learning package for gradient-boosted decision trees now includes seamless, drop-in acceleration for Intel® architectures to significantly speed up model training and improve accuracy for better predictions.

For more information on the purpose and functionality of the XGBoost package, please refer to the XGBoost documentation.

Before you Begin

Please note that if you already have one of the latest versions of the XGBoost package installed (any version after 0.81), you do not need to remove or re-install it. However, recent versions of XGBoost have the latest Intel optimizations which can increase and improve performance.

Supported Installation Options

Install via Intel® oneAPI AI Analytics Toolkit

Intel® AI Analytics Toolkit includes XGBoost with Intel optimizations for XPU. There are multiple ways to get the toolkit and its components. It is distributed through several channels – Anaconda, Docker containers, Package managers (Yum, Apt, Zypper) and an online/offline installer from Intel. To download XGBoost from the Intel® oneAPI AI Analytics Toolkit, visit here and choose the installation method of your choice. You can find more detailed information about the toolkit here.

Install via Individual Component

There are multiple options to only install XGBoost Optimized for Intel® Architecture *.

Linux*, Windows*, and MacOS are supported (x86 architecture only). View more details in XGBoost Python* Installation Guide.

Install from Anaconda:

  • Conda-Forge channel (recommended for users by defaut):
    сonda install xgboost -c conda-forge
  • Intel channel (recommended for Intel® Distribution for Python* users and contains experimental Intel® GPU support):
    conda install xgboost -c https://software.repos.intel.com/python/conda/

Install from PyPI:

pip install xgboost

Install from Container:

Note that a DockerHub account is required to properly access the links. 

In order to install the latest XGBoost optimizations for Intel® Architecture as a Docker container, please use the following command:

docker pull intel/intel-optimized-ml:xgboost

Visit the Intel Optimized ML DockerHub* xgboost* container search list to see other available Intel containers that include XGBoost optimizations for Intel® Architecture and commands on how to pull them. 

More containers, can be found on the Intel Optimized ML page on DockerHub*.

Build From Source

To build XGBoost Optimized for Intel® Architecture from source, refer to “Build From Source” instructions from the XGBoost Python* documentation.

Getting Started with XGBoost Optimized for Intel® Architecture: Usage and Sanity Check

Once XGBoost Optimized for Intel® Architecture is installed, running the below command must print a number greater than 0.81 (indicating a version later than XGBoost 0.81) if Intel optimizations are present.

import xgboost as xgb

print(xgb.__version__)

In addition to the optimizations upstreamed to the XGBoost package, Intel additionally has more optimizations for XGBoost inference available through the daal4py, the Python* API for Intel® oneAPI Data Analytics Library. For more information, refer to the XGBoost daal4py inference code example and technical blog.

Support

If you have further questions or need support on your workload optimization, please submit your queries at Intel® AI Analytics Toolkit Forum or XGBoost GitHub, on the Issues page depending on the type of support required.

Useful Resources

Notices and Disclaimers

Intel technologies may require enabled hardware, software or service activation.

No product or component can be absolutely secure.

Your costs and results may vary.

© Intel Corporation. Intel, the Intel logo, and other Intel marks are trademarks of Intel Corporation or its subsidiaries. Other names and brands may be claimed as the property of others.

Product and Performance Information

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.