Skip to content

Commit

Permalink
Merge pull request #11 from oneapi-src/master
Browse files Browse the repository at this point in the history
Pull changes from master
  • Loading branch information
Vika-F committed Oct 4, 2023
2 parents 061af10 + d42294c commit ca47338
Show file tree
Hide file tree
Showing 254 changed files with 3,506 additions and 22,118 deletions.
6 changes: 0 additions & 6 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ test --test_env=FI_PROVIDER_PATH
# This variable is used to determine location of datasets for testing
test --test_env=DAAL_DATASETS

# These variables enable float64 emulation on platforms
# that do not support it on hardware level
test --test_env=OverrideDefaultFP64Settings \
--test_env=IGC_ForceDPEmulation \
--test_env=IGC_EnableDPEmulation

# Flag for setting the test timeout to 15 minutes
test --test_timeout=900

Expand Down
36 changes: 27 additions & 9 deletions .ci/env/oneapi.sh → .ci/env/apt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@

component=$1

function update {
sudo apt-get update
}

function add_repo {
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
Expand All @@ -27,14 +31,7 @@ function add_repo {
}

function install_dpcpp {
sudo apt-get install \
intel-oneapi-common-vars \
intel-oneapi-common-licensing \
intel-oneapi-tbb-devel \
intel-oneapi-dpcpp-cpp-compiler \
intel-oneapi-dev-utilities \
intel-oneapi-libdpstd-devel \
cmake
sudo apt-get install -y intel-dpcpp-cpp-compiler-2023.2.1
sudo bash -c 'echo libintelocl.so > /etc/OpenCL/vendors/intel-cpu.icd'
sudo mv -f /opt/intel/oneapi/compiler/latest/linux/lib/oclfpga /opt/intel/oneapi/compiler/latest/linux/lib/oclfpga_
}
Expand All @@ -43,14 +40,35 @@ function install_mkl {
sudo apt-get install intel-oneapi-mkl-devel
}

function install_clang-format {
sudo apt-get install -y clang-format-14
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-14 100
sudo update-alternatives --set clang-format /usr/bin/clang-format-14
}

function install_dev-base {
sudo apt-get install -y gcc-multilib g++-multilib dos2unix tree
}

function install_dev-base-conda {
conda env create -f .ci/env/environment.yml
}

if [ "${component}" == "dpcpp" ]; then
add_repo
install_dpcpp
elif [ "${component}" == "mkl" ]; then
add_repo
install_mkl
elif [ "${component}" == "clang-format" ]; then
update
install_clang-format
elif [ "${component}" == "dev-base" ]; then
update
install_dev-base
install_dev-base-conda
else
echo "Usage:"
echo " $0 [dpcpp|mkl]"
echo " $0 [dpcpp|mkl|clang-format|dev-base]"
exit 1
fi
16 changes: 12 additions & 4 deletions ...s/daal/cpp_sycl/source/pca/CMakeLists.txt → .ci/env/bazelisk.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
#===============================================================================
# Copyright 2021 Intel Corporation
# Copyright 2023 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -14,6 +15,13 @@
# limitations under the License.
#===============================================================================

list(APPEND EXAMPLES pca_cor_dense_batch)

add_examples(${EXAMPLES})
# Download Bazelisk
export SHA256="ce52caa51ef9e509fb6b7e5ad892e5cf10feb0794b0aed4d2f36adb00a1a2779 bazelisk-linux-amd64"
wget https://github.com/bazelbuild/bazelisk/releases/download/v1.18.0/bazelisk-linux-amd64
echo ${SHA256} | sha256sum --check
# "Install" bazelisk
chmod +x bazelisk-linux-amd64
mkdir -p bazel/bin
mv bazelisk-linux-amd64 bazel/bin/bazel
export BAZEL_VERSION=$(./bazel/bin/bazel --version | awk '{print $2}')
export PATH=$PATH:$(pwd)/bazel/bin
7 changes: 7 additions & 0 deletions .ci/env/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: ci-env
channels:
- conda-forge
- intel
- defaults
dependencies:
- impi-devel=2021.10.0
Empty file modified .ci/env/tbb.bat
100644 → 100755
Empty file.
51 changes: 20 additions & 31 deletions .ci/pipeline/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ jobs:
vmImage: 'ubuntu-22.04'
steps:
- script: |
sudo apt-get update && sudo apt-get install -y clang-format-14
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-14 100
sudo update-alternatives --set clang-format /usr/bin/clang-format-14
.ci/env/apt.sh clang-format
displayName: 'apt-get'
- script: |
.ci/scripts/clang-format.sh
Expand All @@ -46,8 +44,7 @@ jobs:
vmImage: 'ubuntu-22.04'
steps:
- script: |
sudo apt-get update && sudo apt-get install -y gcc-multilib g++-multilib dos2unix tree
conda create -n ci-env -q -y -c intel -c conda-forge impi-devel=2021.10.0 openjdk=17.0.3
.ci/env/apt.sh dev-base
displayName: 'apt-get and conda install'
- script: |
.ci/scripts/describe_system.sh
Expand Down Expand Up @@ -95,8 +92,7 @@ jobs:
vmImage: 'ubuntu-22.04'
steps:
- script: |
sudo apt-get update && sudo apt-get install -y gcc-multilib g++-multilib dos2unix tree
conda create -n ci-env -q -y -c intel -c conda-forge impi-devel=2021.8.0 openjdk=17.0.3
.ci/env/apt.sh dev-base
displayName: 'apt-get and conda install'
- script: |
.ci/scripts/describe_system.sh
Expand Down Expand Up @@ -136,11 +132,10 @@ jobs:
vmImage: 'ubuntu-22.04'
steps:
- script: |
sudo apt-get update && sudo apt-get install -y gcc-multilib g++-multilib dos2unix
conda create -n ci-env -q -y -c conda-forge -c intel impi-devel=2021.10.0 openjdk=17.0.3
.ci/env/apt.sh dev-base
displayName: 'apt-get and conda install'
- script: |
bash .ci/scripts/install_dpcpp.sh
.ci/env/apt.sh dpcpp
displayName: 'dpcpp installation'
- script: |
source /opt/intel/oneapi/compiler/latest/env/vars.sh
Expand Down Expand Up @@ -190,27 +185,21 @@ jobs:
BAZEL_CACHE_MAX_SIZE_KB: 4194304 # Size in kilobytes ~ 4Gb
steps:
- script: |
# Download Bazelisk
export SHA256="168851e70cf5f95c0e215e7f3aaca5132ffc3c8dd8f585a4157b0be2b53cfe32 bazelisk-linux-amd64"
wget https://github.com/bazelbuild/bazelisk/releases/download/v1.16.0/bazelisk-linux-amd64
echo ${SHA256} | sha256sum --check
# "Install" bazelisk
chmod +x bazelisk-linux-amd64
mv bazelisk-linux-amd64 ${BAZEL_VERSION}
displayName: 'install-deps'
# sourcing done to set bazel version value from script
source .ci/env/bazelisk.sh
echo "##vso[task.setvariable variable=BAZEL_VERSION]${BAZEL_VERSION}"
displayName: 'install-bazel'
- script: |
.ci/scripts/describe_system.sh
displayName: 'System info'
- task: Cache@2
inputs:
# Commit ID is added to a cache key. Caches are immutable by design,
# so we always need to change a key to upload the last version
# of the Bazel cache. Cache lookup is based on `restoreKeys` option.
key: '"$(BAZEL_VERSION)" | "$(Agent.OS)" | "v2" | "$(Build.SourceVersion)"'
key: '"$(BAZEL_VERSION)" | "$(Agent.OS)" | "v1" | "$(Build.SourceVersion)"'
restoreKeys: |
"$(BAZEL_VERSION)" | "$(Agent.OS)" | "v2"
"$(BAZEL_VERSION)" | "$(Agent.OS)" | "v1"
path: $(BAZEL_CACHE_DIR)
displayName: 'bazel-cache'

Expand All @@ -227,41 +216,41 @@ jobs:
echo "build --disk_cache=$(BAZEL_CACHE_DIR) --cpu=avx2" > ~/.bazelrc
# Display oneDAL build configuration
$(BAZEL_VERSION) build @config//:dump
bazel build @config//:dump
echo
cat bazel-bin/external/config/config.json
echo
displayName: 'bazel-configure'
- script: |
$(BAZEL_VERSION) build :release
bazel build :release
displayName: 'release'
- task: PublishPipelineArtifact@1
inputs:
artifactName: '$(platform.type) Bazel build'
targetPath: '$(Build.Repository.LocalPath)/bazel-bin/release'
displayName: 'Upload build artifacts'
- script: |
$(BAZEL_VERSION) test //examples/oneapi/cpp:all \
bazel test //examples/oneapi/cpp:all \
--test_link_mode=dev \
--test_thread_mode=par
displayName: 'cpp-examples-thread-dev'
- script: |
export DALROOT=`pwd`/bazel-bin/release/daal/latest
$(BAZEL_VERSION) test //examples/oneapi/cpp:all \
bazel test //examples/oneapi/cpp:all \
--test_link_mode=release_static \
--test_thread_mode=par
displayName: 'cpp-examples-thread-release-static'
- script: |
export DALROOT=`pwd`/bazel-bin/release/daal/latest
$(BAZEL_VERSION) test //examples/oneapi/cpp:all \
bazel test //examples/oneapi/cpp:all \
--test_link_mode=release_dynamic \
--test_thread_mode=par
displayName: 'cpp-examples-thread-release-dynamic'
- script: |
$(BAZEL_VERSION) test //cpp/oneapi/dal:tests \
bazel test //cpp/oneapi/dal:tests \
--config=host \
--test_link_mode=dev \
--test_thread_mode=par
Expand Down Expand Up @@ -310,7 +299,7 @@ jobs:
inputs:
artifact: '$(platform.type) build'
path: $(Pipeline.Workspace)
- script: sudo apt-get update && sudo apt-get install -y git gcc-multilib g++-multilib
- script: .ci/env/apt.sh dev-base
displayName: 'apt-get'
- script: |
.ci/scripts/describe_system.sh
Expand Down Expand Up @@ -364,7 +353,7 @@ jobs:
ret_code=0
python -m daal4py daal4py/tests/run_examples.py
ret_code=$(($ret_code + $?))
python -m daal4py daal4py/examples/daal4py/sycl/sklearn_sycl.py
python -m daal4py daal4py/tests/daal4py/sycl/sklearn_sycl.py
ret_code=$(($ret_code + $?))
exit $ret_code
displayName: daal4py examples
Expand Down Expand Up @@ -392,7 +381,7 @@ jobs:
steps:
- script: |
brew install dos2unix tree
conda create -n ci-env -q -y -c conda-forge python=3.9 openjdk=17.0.3
conda create -n ci-env -q -y -c conda-forge python=3.10
source /usr/local/miniconda/etc/profile.d/conda.sh
conda activate ci-env
pip install -q cpufeature
Expand Down
26 changes: 0 additions & 26 deletions .ci/scripts/install_dpcpp.sh

This file was deleted.

19 changes: 19 additions & 0 deletions .github/workflows/docker-validation-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: docker-validation CI

on:
pull_request:
branches:
- master
push:
branches:
- master

jobs:
validate:
name: Docker validation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- name: Build docker image
run: docker build . --file dev/docker/onedal-dev.Dockerfile --tag onedal-dev:latest
35 changes: 35 additions & 0 deletions .github/workflows/docker-validation-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: docker-validation Nightly

on:
schedule:
- cron: "0 23 * * *"
pull_request:
branches:
- master
paths:
- .github/workflows/docker-validation-nightly.yml
- dev/docker/onedal-dev.Dockerfile
- .ci/env
- .ci/scripts
push:
branches:
- master
paths:
- .github/workflows/docker-validation-nightly.yml
- dev/docker/onedal-dev.Dockerfile
- .ci/env
- .ci/scripts

jobs:
validate:
name: Docker validation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- name: Build docker image
run: docker build . --file dev/docker/onedal-dev.Dockerfile --tag onedal-dev:latest
- name: Building oneDAL
run: docker run onedal-dev .ci/scripts/build.sh --compiler gnu --optimizations avx2 --target daal --conda-env ci-env
- name: Building oneDAL with bazel
run: docker run onedal-dev bazel build :release
2 changes: 1 addition & 1 deletion .github/workflows/renovate-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- name: Validate
uses: suzuki-shunsuke/github-action-renovate-config-validator@v0.1.3
with:
Expand Down
5 changes: 5 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ 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).

## Docker Development Environment

[Docker file](https://github.com/oneapi-src/oneDAL/tree/master/dev/docker) with the oneDAL development environment
is available as an alternative to the manual setup.

## Installation Steps
1. Clone the sources from GitHub\* as follows:

Expand Down
Loading

0 comments on commit ca47338

Please sign in to comment.