Skip to content

Commit

Permalink
Merge pull request #32 from oneapi-src/main
Browse files Browse the repository at this point in the history
Pull the changes from main branch
  • Loading branch information
Vika-F authored Nov 6, 2024
2 parents a07a785 + 8a84dff commit 02641b1
Show file tree
Hide file tree
Showing 28 changed files with 691 additions and 152 deletions.
4 changes: 2 additions & 2 deletions .ci/env/apt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ function add_repo {
}

function install_dpcpp {
sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp intel-oneapi-runtime-libs
sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp-2025.0 intel-oneapi-runtime-libs=2025.0.0-406
}

function install_mkl {
sudo apt-get install -y intel-oneapi-mkl-devel=2024.2.1-103
sudo apt-get install -y intel-oneapi-mkl-devel-2025.0 intel-oneapi-tbb-devel-2022.0
}

function install_clang-format {
Expand Down
42 changes: 21 additions & 21 deletions .ci/pipeline/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ variables:
TBB_VERSION : 'v2021.10.0'
VM_IMAGE : 'ubuntu-22.04'
SYSROOT_OS: 'jammy'
WIN_BASEKIT_VERSION: '2024.2.1.101'
WINDOWS_BASEKIT_URL: 'https://registrationcenter-download.intel.com/akdlm/IRC_NAS/d91caaa0-7306-46ea-a519-79a0423e1903/w_BaseKit_p_$(WIN_BASEKIT_VERSION)_offline.exe'
WINDOWS_BASEKIT_URL: 'https://registrationcenter-download.intel.com/akdlm/IRC_NAS/b380d914-366b-4b77-a74a-05e3c38b3514/intel-oneapi-base-toolkit-2025.0.0.882_offline.exe'
WINDOWS_DPCPP_COMPONENTS: 'intel.oneapi.win.mkl.devel:intel.oneapi.win.tbb.devel'

jobs:
Expand Down Expand Up @@ -65,12 +64,15 @@ jobs:
.ci/env/apt.sh mkl
displayName: 'mkl installation'
- script: |
source /opt/intel/oneapi/setvars.sh
.ci/scripts/describe_system.sh
displayName: 'System info'
- script: |
source /opt/intel/oneapi/setvars.sh
.ci/scripts/build.sh --compiler gnu --optimizations avx2 --target daal --conda-env ci-env
displayName: 'make daal'
- script: |
source /opt/intel/oneapi/setvars.sh
.ci/scripts/build.sh --compiler gnu --optimizations avx2 --target onedal_c
displayName: 'make onedal_c'
- task: PublishPipelineArtifact@1
Expand All @@ -80,12 +82,15 @@ jobs:
displayName: 'Upload build artifacts'
continueOnError: true
- script: |
source /opt/intel/oneapi/setvars.sh
.ci/scripts/test.sh --test-kind examples --build-dir $(release.dir) --compiler gnu --interface daal/cpp --build-system cmake
displayName: 'daal/cpp examples'
- script: |
source /opt/intel/oneapi/setvars.sh
.ci/scripts/test.sh --test-kind examples --build-dir $(release.dir) --compiler gnu --interface oneapi/cpp --build-system cmake
displayName: 'oneapi/cpp examples'
- script: |
source /opt/intel/oneapi/setvars.sh
.ci/scripts/test.sh --test-kind samples --build-dir $(release.dir) --compiler gnu --interface daal/cpp/mpi --conda-env ci-env --build-system cmake
displayName: 'daal/cpp/mpi samples'
- script: |
Expand Down Expand Up @@ -425,15 +430,15 @@ jobs:
.ci/env/apt.sh mkl
displayName: 'mkl installation'
- script: |
source /opt/intel/oneapi/compiler/latest/env/vars.sh
source /opt/intel/oneapi/setvars.sh
.ci/scripts/describe_system.sh
displayName: 'System info'
- script: |
source /opt/intel/oneapi/compiler/latest/env/vars.sh
source /opt/intel/oneapi/setvars.sh
.ci/scripts/build.sh --compiler icx --optimizations avx2 --target daal --conda-env ci-env
displayName: 'make daal'
- script: |
source /opt/intel/oneapi/compiler/latest/env/vars.sh
source /opt/intel/oneapi/setvars.sh
.ci/scripts/build.sh --compiler icx --optimizations avx2 --target onedal_dpc
displayName: 'make onedal_dpc'
- task: PublishPipelineArtifact@1
Expand All @@ -443,18 +448,15 @@ jobs:
displayName: 'Upload build artifacts'
continueOnError: true
- script: |
source /opt/intel/oneapi/compiler/latest/env/vars.sh
source /opt/intel/oneapi/mkl/latest/env/vars.sh
source /opt/intel/oneapi/setvars.sh
.ci/scripts/test.sh --test-kind examples --build-dir $(release.dir) --compiler clang --interface daal/cpp --build-system cmake
displayName: 'daal/cpp examples'
- script: |
source /opt/intel/oneapi/compiler/latest/env/vars.sh
source /opt/intel/oneapi/mkl/latest/env/vars.sh
source /opt/intel/oneapi/setvars.sh
.ci/scripts/test.sh --test-kind examples --build-dir $(release.dir) --compiler clang --interface oneapi/cpp --build-system cmake
displayName: 'oneapi/cpp examples'
- script: |
source /opt/intel/oneapi/compiler/latest/env/vars.sh
source /opt/intel/oneapi/mkl/latest/env/vars.sh
source /opt/intel/oneapi/setvars.sh
.ci/scripts/test.sh --test-kind samples --build-dir $(release.dir) --compiler gnu --interface daal/cpp/mpi --conda-env ci-env --build-system cmake
displayName: 'daal/cpp/mpi samples'
- task: PublishPipelineArtifact@1
Expand Down Expand Up @@ -532,15 +534,12 @@ jobs:
--test_thread_mode=par
displayName: 'cpp-examples-thread-release-static'
# The issue that bazel doesnt link MKL libs via -Wl, --start-group..
# oneDAL make build pass this test
# TODO: add cycle linking in bazel
# - script: |
# export DALROOT=`pwd`/bazel-bin/release/daal/latest
# bazel test //examples/oneapi/cpp:all \
# --test_link_mode=release_dynamic \
# --test_thread_mode=par
# displayName: 'cpp-examples-thread-release-dynamic'
- script: |
export DALROOT=`pwd`/bazel-bin/release/daal/latest
bazel test //examples/oneapi/cpp:all \
--test_link_mode=release_dynamic \
--test_thread_mode=par
displayName: 'cpp-examples-thread-release-dynamic'
- script: |
bazel test //cpp/daal:tests
Expand Down Expand Up @@ -603,7 +602,7 @@ jobs:
displayName: 'System info'
- script: |
conda update -y -q conda
conda create -q -y -n CB -c conda-forge python=$(python.version) tbb mpich
conda create -q -y -n CB -c conda-forge python=$(python.version) mpich
displayName: 'Conda create'
- script: |
git clone https://github.com/intel/scikit-learn-intelex.git sklearnex
Expand All @@ -613,6 +612,7 @@ jobs:
conda activate CB
pip install -r sklearnex/dependencies-dev
pip install -r sklearnex/requirements-test.txt
pip install tbb==2022.*
displayName: Create python environment
- script: |
source /usr/share/miniconda/etc/profile.d/conda.sh
Expand Down
2 changes: 1 addition & 1 deletion .ci/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ fi
if [[ ! -z "${TBB_INSTALL_DIR}" ]] ; then
export TBBROOT="${TBB_INSTALL_DIR}"
export LD_LIBRARY_PATH="${TBBROOT}/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"
elif [[ "${ARCH}" == "32e" ]]; then
elif [ "${ARCH}" == "32e" ] && [ "${backend_config}" == "ref" ]; then
"${ONEDAL_DIR}"/dev/download_tbb.sh
elif [[ "${ARCH}" == "arm" || ("${ARCH}" == "riscv64") ]]; then
if [[ "${ARCH}" == "arm" ]] ; then
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ permissions:
contents: read

env:
WINDOWS_BASEKIT_URL: 'https://registrationcenter-download.intel.com/akdlm/IRC_NAS/d91caaa0-7306-46ea-a519-79a0423e1903/w_BaseKit_p_2024.2.1.101_offline.exe'
WINDOWS_ALL_COMPONENTS: 'intel.oneapi.win.cpp-dpcpp-common:intel.oneapi.win.mkl.devel:intel.oneapi.win.tbb.devel'

jobs:
Expand All @@ -46,21 +45,26 @@ jobs:
run: .ci/env/apt.sh mkl
- name: System Info
run: |
source /opt/intel/oneapi/compiler/latest/env/vars.sh
source /opt/intel/oneapi/setvars.sh
.ci/scripts/describe_system.sh
- name: Make daal
run: |
source /opt/intel/oneapi/compiler/latest/env/vars.sh
source /opt/intel/oneapi/setvars.sh
.ci/scripts/build.sh --compiler icx --optimizations avx2 --target daal
- name: Make onedal
run: |
source /opt/intel/oneapi/compiler/latest/env/vars.sh
source /opt/intel/oneapi/setvars.sh
.ci/scripts/build.sh --compiler icx --optimizations avx2 --target onedal
- name: Archive build
uses: actions/upload-artifact@v4
with:
name: __release_lnx
path: ./__release_lnx
- name: Archive oneDAL environment
uses: actions/upload-artifact@v4
with:
name: oneDAL_env
path: .ci/env

build_win:
name: oneDAL Windows nightly build
Expand All @@ -76,7 +80,9 @@ jobs:
- name: Install DPC++
shell: cmd
run: |
call .\.ci\scripts\install_basekit.bat ${{ env.WINDOWS_BASEKIT_URL }} ${{ env.WINDOWS_ALL_COMPONENTS }} .\oneapi\
set PATH=C:\msys64\usr\bin;%PATH%
for /f "delims=" %%i in ('grep -oP -m 1 "(?<=WINDOWS_BASEKIT_URL: ).*" .ci\pipeline\ci.yml') do set "baseurl=%%i"
call .ci\scripts\install_basekit.bat %baseurl:'="% ${{ env.WINDOWS_ALL_COMPONENTS }} .\oneapi\
- name: Prepare Intel OpenCL CPU runtime
run: |
# Store the unpacked runtime to centralize and reduce external downloads
Expand Down
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ For your convenience we also added [coding guidelines](http://oneapi-src.github.

## Custom Components

### CPU Features Dispatching

oneDAL provides binaries that can contain code targeting different architectural extensions of a base instruction set architecture (ISA). For example, code paths can exist for Intel(R) SSE2, Intel(R) AVX2, Intel(R) AVX-512, etc. extensions, on top of the x86-64 base architecture.
When run on a specific hardware implementation like Haswell, Skylake-X, etc., oneDAL chooses the code path which is most suitable for that implementation.
Contributors should leverage [CPU Features Dispatching](http://oneapi-src.github.io/oneDAL/contribution/cpu_features.html) mechanism to implement the code of the algorithms that can perform most optimally on various hardware implementations.

### Threading Layer

In the source code of the algorithms, oneDAL does not use threading primitives directly. All the threading primitives used within oneDAL form are called the [threading layer](http://oneapi-src.github.io/oneDAL/contribution/threading.html). Contributors should leverage the primitives from the layer to implement parallel algorithms.
Expand Down
30 changes: 23 additions & 7 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

Required Software:
* C/C++ Compiler
* [DPC++ Compiler](https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compiler.html) if building with SYCL support
* [DPC++ Compiler](https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compiler.html) and [oneMKL](https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl.html) if building with SYCL support
* BLAS and LAPACK libraries - both provided by oneMKL
* Python version 3.9 or higher
* TBB library (repository contains script to download it)
* Microsoft Visual Studio\* (Windows\* only)
Expand All @@ -30,6 +31,10 @@ Required Software:

For details, see [System Requirements for oneDAL](https://www.intel.com/content/www/us/en/developer/articles/system-requirements/system-requirements-for-oneapi-data-analytics-library.html).

Note: the Intel(R) oneAPI components listed here can be installed together through the oneAPI Base Toolkit bundle:

https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit.html

## Docker Development Environment

[Docker file](https://github.com/oneapi-src/oneDAL/tree/main/dev/docker) with the oneDAL development environment
Expand All @@ -44,7 +49,7 @@ is available as an alternative to the manual setup.

set PATH=C:\msys64\usr\bin;%PATH%

3. Set the environment variables for one of the supported C/C++ compilers. For example:
3. Set the environment variables for one of the supported C/C++ compilers, such as [Intel(R)'s DPC compiler](https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compiler.html). For example:

- **Microsoft Visual Studio\* 2022**:

Expand All @@ -66,19 +71,30 @@ is available as an alternative to the manual setup.

call "C:\Program Files (x86)\Intel\oneAPI\compiler\latest\env\vars.bat"

4. Download and set an environment for micromkl libs:
Note: if the Intel compilers were installed as part of a bundle such as oneAPI Base Toolkit, it's also possible to set the environment variables at once for all oneAPI components used here (compilers, MKL, oneMKL, TBB) through the more general script that they provide - for Linux:

source /opt/intel/oneapi/setvars.sh

4. Set up MKL:

_Note: if you used the general oneAPI setvars script from a Base Toolkit installation, this step will not be necessary as oneMKL will already have been set up._

Download and install [Intel(R) oneMKL](https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl.html).
Set the environment variables for for Intel(R) oneMKL. For example:

- **Windows\***:

.\dev\download_micromkl.bat
call "C:\Program Files (x86)\Intel\oneAPI\mkl\latest\env\vars.bat" intel64

- **Linux\***:

./dev/download_micromkl.sh
source /opt/intel/oneapi/mkl/latest/env/vars.sh

5. Set up Intel(R) Threading Building Blocks (Intel(R) TBB):

5. Download and install Intel(R) Threading Building Blocks (Intel(R) TBB):
_Note: if you used the general oneAPI setvars script from a Base Toolkit installation, this step will not be necessary as oneTBB will already have been set up._

Download and install free Community License Intel(R) TBB (see [Get Intel(R) Performance Libraries for Free](https://registrationcenter.intel.com/en/forms/?productid=2558&licensetype=2)).
Download and install [Intel(R) TBB](https://www.intel.com/content/www/us/en/developer/tools/oneapi/onetbb.html).
Set the environment variables for for Intel(R) TBB. For example:

- oneTBB (Windows\*):
Expand Down
56 changes: 32 additions & 24 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,35 @@ load("@onedal//dev/bazel/deps:tbb.bzl", "tbb_repo")
tbb_repo(
name = "tbb",
root_env_var = "TBBROOT",
url = "https://github.com/oneapi-src/oneTBB/releases/download/v2021.7.0/oneapi-tbb-2021.7.0-lin.tgz",
sha256 = "3c2b3287c595e2bb833c025fcd271783963b7dfae8dc681440ea6afe5d550e6a",
strip_prefix = "oneapi-tbb-2021.7.0",
urls = [
"https://files.pythonhosted.org/packages/93/4b/2e29f4266be5a66f21fc2dadcde48f9acea86119d6fb1bb2d2a451222ff7/tbb-2022.0.0-py2.py3-none-manylinux_2_28_x86_64.whl",
"https://files.pythonhosted.org/packages/ff/8c/1eb1f856a7a328242d524f1bf64f2a212d46ce5651168e7c8bc7aeaf0f44/tbb_devel-2022.0.0-py2.py3-none-manylinux_2_28_x86_64.whl",
],
sha256s = [
"15a15a4e3ea4c3f3198bdb3c55fac75c589e15ed2ad0bbb080900d355c5b017e",
"474e4ed1dce2efeea1d3652e295a97713df5d0ed854c937ee7d0464c38353c36",
],
strip_prefixes = [
"tbb-2022.0.0.data/data",
"tbb_devel-2022.0.0.data/data",
]
)

load("@onedal//dev/bazel/deps:mpi.bzl", "mpi_repo")
mpi_repo(
name = "mpi",
root_env_var = "MPIROOT",
urls = [
"https://files.pythonhosted.org/packages/83/3c/c684b721f08f55fc1647d9bcb84e657a4b6217c078a209f2f7751b639957/impi_rt-2021.8.0-py2.py3-none-manylinux1_x86_64.whl",
"https://files.pythonhosted.org/packages/26/27/5b557da775ad23b20be85352e273dbdddd6ba2a531c6db21e3c9c02230f6/impi_devel-2021.8.0-py2.py3-none-manylinux1_x86_64.whl",
"https://files.pythonhosted.org/packages/0a/7c/0f4de62a3463e4ebcf232352b231427f3b34c6a0a1b102a94da3246cad76/impi_rt-2021.14.0-py2.py3-none-manylinux_2_28_x86_64.whl",
"https://files.pythonhosted.org/packages/10/9f/4ee3244c078b9e9e8f65ec51760e7a6e52988abba92a285ab8b0c4dbafff/impi_devel-2021.14.0-py2.py3-none-manylinux_2_28_x86_64.whl",
],
sha256s = [
"c80f86a2a9ff9d4d1b81c1559e9b9180a8c72fb9902ea7d61b07e6d71ad33225",
"65dfc774e1e853a36c2c6286ea0b8dc33ea1f1f2a6fcd271b917195e11ddc98a",
"f06ac9eba3de9609fb257d714e3041f82334ccfe27a9bec0f90007d6381dd52e",
"6a6ec66719ac4884a40a0504f4f186f51ee4169bece5f4486c31138ed6bcc87d",
],
strip_prefixes = [
"impi_rt-2021.8.0.data/data",
"impi_devel-2021.8.0.data/data",
"impi_rt-2021.14.0.data/data",
"impi_devel-2021.14.0.data/data",
]
)

Expand All @@ -60,35 +69,34 @@ ccl_repo(
name = "ccl",
root_env_var = "CCL_ROOT",
urls = [
"https://files.pythonhosted.org/packages/38/66/889fa7f40d4142194414efb3f79379ff2830e554d99eef49ac4d8e739245/oneccl_devel-2021.8.0-py2.py3-none-manylinux1_x86_64.whl",
"https://files.pythonhosted.org/packages/c4/34/84fcf891faabfcd88e1e054a9268cdbefac8c22ab37d7eea2d9a3bda0f52/oneccl_devel-2021.14.0-py2.py3-none-manylinux_2_28_x86_64.whl",
],
sha256s = [
"58995b5dd38f92034be7c7c2da51f531b6df4ef36b09fb648757ae0a7832f802",
"580641c9d296b673d225ed3ca740b3356d7408a5c792de596a8836fde7d6c79e",
],
strip_prefixes = [
"oneccl_devel-2021.14.0.data/data",
]
)

load("@onedal//dev/bazel/deps:mkl.bzl", "mkl_repo")
mkl_repo(
name = "mkl",
root_env_var = "MKLROOT",
urls = [
# TODO: when the issue with binutils will be solved, replace 2023.0 to 2024.2
"https://files.pythonhosted.org/packages/76/8c/2e6fb6186fa9335a0feb7845e001e18c22627a06ae68650e5a84ca2b536d/mkl_static-2023.0.0-py2.py3-none-manylinux1_x86_64.whl",
#"https://files.pythonhosted.org/packages/c1/44/42ea3ad7bbaa65acb54c977961118d7b24ea687e7c3d64aba0a019cbfa19/mkl_static-2024.2.0-py2.py3-none-manylinux1_x86_64.whl",
"https://files.pythonhosted.org/packages/80/e4/93ddfd475420f1c24d96f3bba1f87ec31a1eea847884c4ccb243cb336a61/mkl_include-2024.2.0-py2.py3-none-manylinux1_x86_64.whl",
"https://files.pythonhosted.org/packages/c9/3a/8797ef320a04e0b939a07365f09ce11f5484150bd3600c6400391c5c36e9/mkl_devel_dpcpp-2024.2.0-py2.py3-none-manylinux1_x86_64.whl",
"https://files.pythonhosted.org/packages/95/d8/76f53cde7c1df06fcd153b4f6fdf0516aafbfc3239ba8d5a8c354e20bbb2/mkl_static-2025.0.0-py2.py3-none-manylinux_2_28_x86_64.whl",
"https://files.pythonhosted.org/packages/b1/91/b76ab204c03f90d5ce008ba7cf6efd77168059866e96b70277fec959b940/mkl_include-2025.0.0-py2.py3-none-manylinux_2_28_x86_64.whl",
"https://files.pythonhosted.org/packages/b8/d7/ea82194db165d83e22dfedee4d45423477441202e2c321b9e96809d36e63/mkl_devel_dpcpp-2025.0.0-py2.py3-none-manylinux_2_28_x86_64.whl",
],
sha256s = [
"49d16f315f6803b1046a4796686af766ad487f9f6d98ea76b6cdb2ebd5b559f9",
#"8c2a6c6a144c5619f1df75fd550b32730f3e0632b55a15a42a95516e142ccf47",
"63ed16ece64d9420e9fe1d5e1b55e0680632b61ad1c0e5f207b17f85233fcc09",
"b80099209aef1b147b8f1c1621a47078fba2c17b2faee131939ea4d32da2c35c",
"706f92fcd6e00cc94155097a87528da52b4c3dda4616c8c334963251773a0d13",
"cf19e274bdd1449ef7285671576c545510bebff669363ee1926779192f618cdd",
"455281a590920fb58628dbc06ac007f2618c7315e4c04748c2a1b62efa01afb3",
],
strip_prefixes = [
"mkl_static-2023.0.0.data/data",
#"mkl_static-2024.2.0.data/data",
"mkl_include-2024.2.0.data/data",
"mkl_devel_dpcpp-2024.2.0.data/data",
"mkl_static-2025.0.0.data/data",
"mkl_include-2025.0.0.data/data",
"mkl_devel_dpcpp-2025.0.0.data/data",
],
)

Expand Down
Loading

0 comments on commit 02641b1

Please sign in to comment.