Skip to content

Commit

Permalink
Merge branch 'oneapi-src:main' into dev/asolovev_libmklsycl_remove
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandr-Solovev authored Nov 7, 2024
2 parents 0a9b94c + 84ec51f commit ae2f967
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 46 deletions.
33 changes: 5 additions & 28 deletions .ci/env/apt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,36 +59,11 @@ function install_qemu_emulation_apt {
}

function install_qemu_emulation_deb {
set +e

versions=(9.0.2 9.0.1 8.2.4)
suffixes=("" "~bpo12+1")
found_version=""
for version in ${versions[@]}; do
for suffix in ${suffixes[@]}; do
qemu_deb="qemu-user-static_${version}+ds-1${suffix}_amd64.deb"
echo "Checking for http://ftp.debian.org/debian/pool/main/q/qemu/${qemu_deb}"
if wget -q --method=HEAD http://ftp.debian.org/debian/pool/main/q/qemu/${qemu_deb} &> /dev/null;
then
echo "Found qemu version ${version}"
found_version=${qemu_deb}
break 2
fi
done
done

set -eo pipefail
if [[ -z "${found_version}" ]] ; then
# If nothing is found, error out and fail
echo "None of the requested qemu versions ${versions[*]} are available."
false
fi

# get last version of qemu listed on debian, changes may need to occur to this with version 10 of qemu
found_version=$(wget -q http://ftp.debian.org/debian/pool/main/q/qemu/ -O - | grep -oP "(?<=\")$1_.*_amd64.deb(?=\")" | tail -1)
wget http://ftp.debian.org/debian/pool/main/q/qemu/${found_version}
sudo dpkg -i ${found_version}

sudo systemctl restart systemd-binfmt.service
set +eo pipefail
}

function install_llvm_version {
Expand Down Expand Up @@ -140,7 +115,9 @@ elif [ "${component}" == "qemu-apt" ]; then
install_qemu_emulation_apt
elif [ "${component}" == "qemu-deb" ]; then
update
install_qemu_emulation_deb
install_qemu_emulation_deb qemu-user
install_qemu_emulation_deb qemu-user-binfmt
install_qemu_emulation_deb qemu-user-static
elif [ "${component}" == "llvm-version" ] ; then
update
install_llvm_version "$2"
Expand Down
15 changes: 6 additions & 9 deletions .ci/pipeline/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -542,15 +542,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
16 changes: 16 additions & 0 deletions .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,27 @@ name: Nightly-build
on:
schedule:
- cron: '0 21 * * *'
pull_request:
branches:
- main
paths:
- .github/workflows/nightly-build.yml
- .ci/pipeline/ci.yml
- makefile
- '.ci/env/**'
- '.ci/scripts/**'
- 'dev/make/**'
- 'dev/make/compiler_definitions/**'
- 'dev/make/function_definitions/**'
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref_name }}-${{ github.event.number || github.sha }}
cancel-in-progress: true

env:
WINDOWS_ALL_COMPONENTS: 'intel.oneapi.win.cpp-dpcpp-common:intel.oneapi.win.mkl.devel:intel.oneapi.win.tbb.devel'

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
13 changes: 12 additions & 1 deletion dev/bazel/deps/mkl.tpl.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,22 @@ cc_library(
"lib/libmkl_tbb_thread.a",
],
linkopts = [
# The source libraries have circular symbol dependencies. To successfully build this cc_library,
# oneMKL requires wrapping the libraries with -Wl,--start-group and -Wl,--end-group.
"-Wl,--start-group",
"$(location lib/libmkl_core.a)",
"$(location lib/libmkl_intel_ilp64.a)",
"$(location lib/libmkl_tbb_thread.a)",
"-Wl,--end-group",
"-lpthread",
"-lm",
"-ldl",
],
deps = [
":headers",
]
],
alwayslink = 1,
linkstatic = 1,
)

cc_library(
Expand Down
2 changes: 1 addition & 1 deletion dev/make/compiler_definitions/dpcpp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CMPLRDIRSUFF.dpcpp = _dpcpp

CORE.SERV.COMPILER.dpcpp = generic

-Zl.dpcpp = $(if $(OS_is_win),-Zl,) $(-Q)no-intel-lib
-Zl.dpcpp = $(if $(OS_is_win),-Zl -Q,-)no-intel-lib
-DEBC.dpcpp = $(if $(OS_is_win),-debug:all -Z7,-g) -fno-system-debug

COMPILER.lnx.dpcpp = icpx -fsycl -m64 -stdlib=libstdc++ -fgnu-runtime -fwrapv \
Expand Down

0 comments on commit ae2f967

Please sign in to comment.