Skip to content

Latest commit

 

History

History
139 lines (80 loc) · 5.27 KB

INSTALL.md

File metadata and controls

139 lines (80 loc) · 5.27 KB

Installation from Sources

Required Software:

  • C/C++ Compiler

  • DPC++ Compiler

  • Microsoft Visual Studio* (Windows* only)

  • MSYS2 (Windows* only)

  • make and dos2unix tools; install these packages using MSYS2 on Windows* as follows:

      pacman -S msys/make msys/dos2unix
    

For details, see System Requirements for oneDAL.

Docker Development Environment

Docker file with the oneDAL development environment is available as an alternative to the manual setup.

Installation Steps

  1. Clone the sources from GitHub* as follows:

     git clone https://github.com/oneapi-src/oneDAL.git
    
  2. Set the PATH environment variable to the MSYS2* bin directory (Windows* only). For example:

     set PATH=C:\msys64\usr\bin;%PATH%
    
  3. Set the environment variables for one of the supported C/C++ compilers. For example:

    • Microsoft Visual Studio* 2022:

        call "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvarsall.bat" x64
      
    • Intel(R) C++ Compiler 19.1 (Windows*):

        call "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\bin\compilervars.bat" intel64
      
    • Intel(R) C++ Compiler 19.1 (Linux*):

        source /opt/intel/compilers_and_libraries/linux/bin/compilervars.sh intel64
      
    • Intel(R) oneAPI DPC++/C++ Compiler 2023.2 (Linux*):

        source /opt/intel/oneapi/compiler/latest/env/vars.sh
      
    • Intel(R) oneAPI DPC++/C++ Compiler 2023.2 (Windows*):

        call "C:\Program Files (x86)\Intel\oneAPI\compiler\latest\env\vars.bat"
      
  4. Download and set an environment for micromkl libs:

    • Windows*:

        .\dev\download_micromkl.bat
      
    • Linux*:

        ./dev/download_micromkl.sh
      
  5. Download and install Intel(R) Threading Building Blocks (Intel(R) TBB):

    Download and install free Community License Intel(R) TBB (see Get Intel(R) Performance Libraries for Free). Set the environment variables for for Intel(R) TBB. For example:

    • oneTBB (Windows*):

        call "C:\Program Files (x86)\Intel\oneAPI\tbb\latest\env\vars.bat" intel64
      
    • oneTBB (Linux*):

        source /opt/intel/oneapi/tbb/latest/env/vars.sh intel64
      

    Alternatively, you can use scripts to do this for you (Linux*):

         ./dev/download_tbb.sh
    
  6. Download and install Python (version 3.7 or higher).

  7. Build oneDAL via command-line interface. Choose the appropriate commands based on the interface, platform, and the compiler you use. Interface and platform are required arguments of makefile while others are optional. Below you can find the set of examples for building oneDAL. You may use a combination of them to get the desired build configuration:

    • DAAL interfaces on Linux* using Intel(R) C++ Compiler:

        make -f makefile daal PLAT=lnx32e
      
    • DAAL interfaces on Linux* using GNU Compiler Collection*:

        make -f makefile daal PLAT=lnx32e COMPILER=gnu
      
    • oneAPI C++/DPC++ interfaces on Windows* using Intel(R) DPC++ compiler:

        make -f makefile oneapi PLAT=win32e
      
    • oneAPI C++ interfaces on Windows* using Microsoft Visual* C++ Compiler:

        make -f makefile oneapi_c PLAT=win32e COMPILER=vc
      
    • DAAL and oneAPI C++ interfaces on Linux* using GNU Compiler Collection*:

        make -f makefile daal oneapi_c PLAT=lnx32e COMPILER=gnu
      

It is possible to build oneDAL libraries with selected set of algorithms and/or CPU optimizations. CORE.ALGORITHMS.CUSTOM and REQCPUS makefile defines are used for it.

  • To build oneDAL with Linear Regression and Support Vector Machine algorithms, run:

          make -f makefile daal PLAT=win32e CORE.ALGORITHMS.CUSTOM="linear_regression svm" -j16
    
  • To build oneDAL with AVX2 and AVX512 CPU optimizations, run:

          make -f makefile daal PLAT=win32e REQCPU="avx2 avx512" -j16
    
  • To build oneDAL with Moments of Low Order algorithm and AVX2 CPU optimizations, run:

          make -f makefile daal PLAT=win32e CORE.ALGORITHMS.CUSTOM=low_order_moments REQCPU=avx2 -j16
    

NOTE: Built libraries are located in the __release_{os_name}[_{compiler_name}]/daal directory.