Skip to content

Commit

Permalink
Merge branch 'main' into dev/asolovev_win_icx_migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandr-Solovev authored Aug 14, 2024
2 parents 6ec4137 + d270077 commit f274f37
Show file tree
Hide file tree
Showing 415 changed files with 817 additions and 52,893 deletions.
32 changes: 32 additions & 0 deletions .ci/env/editorconfig-checker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
#===============================================================================
# Copyright contributors to the oneDAL project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#===============================================================================

VERSION=v3.0.3
NAME=ec-linux-amd64
ASSET=$NAME.tar.gz

# Download
export SHA256="fc698b0bf5bca0d42e28dd59d72e25487a51f645ca242c5f74bae975369f16aa $ASSET"
wget https://github.com/editorconfig-checker/editorconfig-checker/releases/download/$VERSION/$ASSET
echo "${SHA256}" | sha256sum --check

# Install
tar -xzf $ASSET
mv bin/$NAME /usr/local/bin/editorconfig-checker

# Clean up the downloaded archive
rm $ASSET
11 changes: 7 additions & 4 deletions .ci/pipeline/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,22 @@ variables:
SYSROOT_OS: 'jammy'

jobs:
- job: 'ClangFormat'
- job: 'FormatterChecks'
pool:
vmImage: '$(VM_IMAGE)'
steps:
- script: |
.ci/env/apt.sh clang-format
displayName: 'apt-get'
.ci/env/editorconfig-checker.sh
displayName: 'Install Dependencies'
- script: |
.ci/scripts/clang-format.sh
displayName: 'clang-format check'
failOnStderr: true
- script: |
editorconfig-checker
displayName: 'editorconfig-checker'
failOnStderr: true
- job: 'LinuxMakeGNU_MKL'
timeoutInMinutes: 0
Expand Down Expand Up @@ -623,8 +628,6 @@ jobs:
ret_code=0
python -m sklearnex sklearnex/tests/run_examples.py
ret_code=$(($ret_code + $?))
python -m sklearnex sklearnex/tests/daal4py/sycl/sklearn_sycl.py
ret_code=$(($ret_code + $?))
exit $ret_code
displayName: sklearnex examples
- script: |
Expand Down
21 changes: 21 additions & 0 deletions .ci/scripts/collect_opencl_rt.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#===============================================================================
# Copyright contributors to the oneDAL project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#===============================================================================

echo "Download intel opencl runtime"
(new-object System.Net.WebClient).DownloadFile("https://registrationcenter-download.intel.com/akdlm/IRC_NAS/d9883ab0-0e26-47fd-9612-950b95460d72/w_opencl_runtime_p_2024.2.0.980.exe", "opencl_installer.exe")
echo "Unpacking opencl runtime installer"
Start-Process ".\opencl_installer.exe" -ArgumentList "--s --x --f ocl" -Wait
Move-Item -Path ".\ocl\w_opencl_runtime_p_2024.2.0.980.msi" -Destination ".\opencl_rt.msi"
27 changes: 27 additions & 0 deletions .ci/scripts/install_dpc.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#===============================================================================
# Copyright contributors to the oneDAL project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#===============================================================================
echo "Download intel DPC++ compiler"
(new-object System.Net.WebClient).DownloadFile("https://registrationcenter-download.intel.com/akdlm/IRC_NAS/7991e201-ca0f-4689-bdb6-1ed73a8246fd/w_dpcpp-cpp-compiler_p_2024.2.0.491_offline.exe", "dpcpp_installer.exe")
echo "Unpacking DPC++ installer"
Start-Process ".\dpcpp_installer.exe" -ArgumentList "--s --x --f oneAPI" -Wait
echo "Installing DPC++ compiler"
# Installing the compiler can take upwards of 20 minutes
# It does not print any messages during installation
Start-Process ".\oneAPI\bootstrapper.exe" -ArgumentList "-s --eula=accept --install-dir=dpcpp" -Wait
echo "remove installer files"
Remove-Item -LiteralPath .\oneAPI -Force -Recurse -ErrorAction Ignore
Remove-Item .\dpcpp_installer.exe -Force
echo "DPC++ install complete"
17 changes: 17 additions & 0 deletions .ecrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"Verbose": false,
"Debug": false,
"IgnoreDefaults": false,
"SpacesAftertabs": false,
"NoColor": false,
"AllowedContentTypes": [],
"PassedFiles": [],
"Disable": {
"EndOfLine": false,
"Indentation": false,
"InsertFinalNewline": false,
"TrimTrailingWhitespace": false,
"IndentSize": true,
"MaxLineLength": false
}
}
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
root = true

[*.{py,pl,pm,i,inc,c,cpp,h,hpp,s,f,f77,f90,fi,java}]
indent_style = space
trim_trailing_whitespace = true
insert_final_newline = true
# max_line_length = 150
23 changes: 16 additions & 7 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,24 @@
},
"packageRules": [
{
"groupName": "Doc packages",
"matchUpdateTypes": ["patch", "minor"],
"schedule": ["before 2am on the first day of the month"],
"matchFileNames": ["docs/requirements.txt"]
"groupName": "Doc packages",
"matchUpdateTypes": ["patch", "minor"],
"schedule": ["before 2am on the first day of the month"],
"matchFileNames": ["docs/requirements.txt"]
},
{
"groupName": "Dockerfile",
"schedule": ["before 2am on the first day of the month"],
"matchFileNames": ["**/*.Dockerfile"]
"groupName": "Dockerfile",
"schedule": ["before 2am on the first day of the month"],
"matchFileNames": ["**/*.Dockerfile"]
}
],
"customManagers": [
{
"customType": "regex",
"fileMatch": ["^\\.ci\\/env\\/editorconfig-checker\\.sh$"],
"matchStrings": ["VERSION=(?<currentValue>v\\d+\\.\\d+\\.\\d+)"],
"depNameTemplate": "editorconfig-checker/editorconfig-checker",
"datasourceTemplate": "github-releases"
}
]
}
116 changes: 116 additions & 0 deletions .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
#===============================================================================
# Copyright contributors to the oneDAL project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#===============================================================================

name: Nightly-build

on:
schedule:
- cron: '0 21 * * *'
workflow_dispatch:

permissions:
contents: read

jobs:
build_lnx:
name: oneDAL Linux nightly build
if: github.repository == 'oneapi-src/oneDAL'
runs-on: ubuntu-22.04
timeout-minutes: 120

steps:
- name: Checkout oneDAL
uses: actions/checkout@v4
with:
repository: oneapi-src/oneDAL
- name: Install DPC++
run: .ci/env/apt.sh dpcpp
- name: System Info
run: |
source /opt/intel/oneapi/compiler/latest/env/vars.sh
.ci/scripts/describe_system.sh
- name: Make daal
run: |
source /opt/intel/oneapi/compiler/latest/env/vars.sh
.ci/scripts/build.sh --compiler icx --optimizations avx2 --target daal
- name: Make onedal
run: |
source /opt/intel/oneapi/compiler/latest/env/vars.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_icx

build_win:
name: oneDAL Windows nightly build
if: github.repository == 'oneapi-src/oneDAL'
runs-on: windows-2022
timeout-minutes: 120

steps:
- name: Checkout oneDAL
uses: actions/checkout@v4
with:
repository: oneapi-src/oneDAL
- name: Install DPC++
run: |
& .ci/scripts/install_dpc.ps1
- name: Prepare Intel OpenCL CPU runtime
run: |
# Store the unpacked runtime to centralize and reduce external downloads
& .ci/scripts/collect_opencl_rt.ps1
- name: System Info
shell: cmd
run: |
set PATH=C:\msys64\usr\bin;%PATH%
pip install cpufeature
call .\dpcpp\compiler\latest\env\vars.bat
bash .ci/scripts/describe_system.sh
- name: Make daal
shell: cmd
run: |
call .\.ci\scripts\build.bat daal vc avx2
- name: Make onedal
shell: cmd
run: |
call .\.ci\scripts\build.bat onedal_c vc avx2
- name: Make oneapi_dpc
shell: cmd
run: |
call .\dpcpp\compiler\latest\env\vars.bat
call .\dpcpp\compiler\latest\bin\sycl-ls.exe
call .\.ci\scripts\build.bat onedal_dpc vc avx2
- name: Archive build
uses: actions/upload-artifact@v4
with:
name: __release_win
path: .\__release_win_vc
- name: Compress DPC++
shell: cmd
run: |
tar -cvzf icx.zip .\dpcpp
- name: Archive DPC++
uses: actions/upload-artifact@v4
with:
name: icx_compiler
path: .\icx.zip
- name: Archive Intel OpenCL CPU runtime
uses: actions/upload-artifact@v4
with:
name: opencl_rt_installer
path: .\opencl_rt.msi
16 changes: 15 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Refer to our guidelines on [pull requests](#pull-requests) and [issues](#issues)

## Contacting maintainers
You may reach out to Intel project maintainers privately at onedal.maintainers@intel.com.
[Codeowners](https://github.com/oneapi-src/oneDAL/blob/main/.github/CODEOWNERS) configuration defines specific maintainers for corresponding code sections, however it's currently limited to Intel members. With further migration to UXL we will be changing this, but here are non-Intel contacts:
[Codeowners](https://github.com/oneapi-src/oneDAL/blob/main/.github/CODEOWNERS) configuration defines specific maintainers for corresponding code sections, however it's currently limited to Intel members. With further migration to UXL we will be changing this, but here are non-Intel contacts:

For ARM specifics you may contact: [@rakshithgb-fujitsu](https://github.com/rakshithgb-fujitsu/)

Expand Down Expand Up @@ -65,6 +65,20 @@ clang-format style=file <your file>

Refer to [ClangFormat documentation](https://clang.llvm.org/docs/ClangFormat.html) for more information.

### editorconfig-checker

We also recommend using [editorconfig-checker](https://github.com/editorconfig-checker/editorconfig-checker) to ensure your code adheres to the project's coding style. EditorConfig-Checker is a command-line tool that checks your code against the rules defined in the [.editorconfig](https://github.com/oneapi-src/oneDAL/blob/main/.editorconfig) file.

To use it, follow these steps:

1. Install the tool by following the instructions in the [official documentation](https://github.com/editorconfig-checker/editorconfig-checker#installation).
2. Navigate to the root directory of your project.
3. Run the following command to check your code:

```
editorconfig-checker
```

### Coding Guidelines

For your convenience we also added [coding guidelines](http://oneapi-src.github.io/oneDAL/contribution/coding_guide.html) with examples and detailed descriptions of the coding style oneDAL follows. We encourage you to consult them when writing your code.
Expand Down
24 changes: 7 additions & 17 deletions cpp/daal/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -122,23 +122,6 @@ daal_module(
],
)

daal_module(
name = "sycl",
hdrs = glob(["src/sycl/**/*.h", "src/sycl/**/*.cl"]),
srcs = glob(["src/sycl/**/*.cpp"]),
deps = select({
"@config//:backend_ref": [
":services",
"@onedal//cpp/daal/src/algorithms/engines:kernel",
],
"//conditions:default": [
":services",
"@onedal//cpp/daal/src/algorithms/engines:kernel",
"@micromkl_dpc//:headers",
],
}),
)

daal_module(
name = "threading_tbb",
srcs = glob(["src/threading/**/*.cpp"]),
Expand All @@ -164,6 +147,13 @@ daal_module(
}),
)

daal_module(
name = "engines",
deps = [
"@onedal//cpp/daal/src/algorithms/engines:kernel",
],
)

daal_module(
name = "core",
deps = [
Expand Down
5 changes: 0 additions & 5 deletions cpp/daal/include/algorithms/algorithm_container_base_batch.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@

#include "services/daal_memory.h"
#include "services/internal/daal_kernel_defines.h"
#include "services/internal/gpu_support_checker.h"
#include "services/internal/execution_context.h"

namespace daal
{
Expand Down Expand Up @@ -174,9 +172,6 @@ class AlgorithmDispatchContainer<batch, RV64Container DAAL_KERNEL_RV64_ONLY(rv64

virtual services::Status compute() DAAL_C11_OVERRIDE
{
services::internal::sycl::ExecutionContextIface & context = services::internal::getDefaultContext();
services::internal::sycl::InfoDevice & deviceInfo = context.getInfoDevice();
if (!daal::services::internal::isImplementedForDevice(deviceInfo, _cntr)) return services::Status(services::ErrorDeviceSupportNotImplemented);
_cntr->setArguments(this->_in, this->_res, this->_par, this->_hpar);
return _cntr->compute();
}
Expand Down
5 changes: 0 additions & 5 deletions cpp/daal/include/algorithms/algorithm_container_base_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@

#include "algorithms/algorithm_container_base.h"
#include "services/error_handling.h"
#include "services/internal/gpu_support_checker.h"
#include "services/internal/execution_context.h"

namespace daal
{
Expand Down Expand Up @@ -78,9 +76,6 @@ class DAAL_EXPORT AlgorithmDispatchContainer : public AlgorithmContainerImpl<mod

virtual services::Status compute() DAAL_C11_OVERRIDE
{
services::internal::sycl::ExecutionContextIface & context = services::internal::getDefaultContext();
services::internal::sycl::InfoDevice & deviceInfo = context.getInfoDevice();
if (!daal::services::internal::isImplementedForDevice(deviceInfo, _cntr)) return services::Status(services::ErrorDeviceSupportNotImplemented);
_cntr->setArguments(this->_in, this->_pres, this->_par, this->_hpar);
return _cntr->compute();
}
Expand Down
Loading

0 comments on commit f274f37

Please sign in to comment.