Skip to content

Commit

Permalink
Merge branch 'oneapi-src:main' into dev/asolovev_onemkl_enabling_clear
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandr-Solovev authored Sep 26, 2024
2 parents 5786288 + f8a3953 commit 62deb9d
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 28 deletions.
14 changes: 6 additions & 8 deletions .ci/env/apt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,15 @@ function update {
}

function add_repo {
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo add-apt-repository -y "deb https://apt.repos.intel.com/oneapi all main"
sudo apt-get update
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | \
gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" \
| sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt update
}

function install_dpcpp {
sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp-2024.2
sudo bash -c 'echo libintelocl.so > /etc/OpenCL/vendors/intel-cpu.icd'
sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp intel-oneapi-runtime-libs
}

function install_mkl {
Expand Down
1 change: 0 additions & 1 deletion .ci/env/environment.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: ci-env
channels:
- conda-forge
- defaults
dependencies:
- impi-devel=2021.12.0
9 changes: 8 additions & 1 deletion dev/bazel/toolchains/cc_toolchain_lnx.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ def _preapre_builtin_include_directory_paths(repo_ctx, tools):
tools.dpcc,
"-xc++",
get_no_canonical_prefixes_opt(repo_ctx, tools.dpcc) +
_add_gcc_toolchain_if_needed(repo_ctx, tools.dpcc),
_add_gcc_toolchain_if_needed(repo_ctx, tools.dpcc) +
_add_sycl_linkage(repo_ctx, tools.dpcc) if tools.is_dpc_found else [],
) +
required_tmp_includes,
)
Expand All @@ -154,6 +155,12 @@ def _add_gcc_toolchain_if_needed(repo_ctx, cc):
else:
return []

def _add_sycl_linkage(repo_ctx, cc):
if ("icx" in cc) or ("icpx" in cc):
return ["-fsycl"]
else:
return []

def configure_cc_toolchain_lnx(repo_ctx, reqs):
if reqs.os_id != "lnx":
auto_configure_fail("Cannot configure Linux toolchain for '{}'".format(reqs.os_id))
Expand Down
15 changes: 10 additions & 5 deletions dev/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,18 @@
*******************************************************************************/-->

# Docker Development Environment

## How To Use

There is a simple docker dev environment for the oneDAL development and build process.
It includes dependencies for building all oneDAL components with ``make`` and ``bazel``

Note: The docker setup assumes that it is executed from the oneDAL repo and copies repo files inside the container
Note: The docker setup assumes that it is executed from the oneDAL repo and copies repo files inside the container. In order to build the container locally from the root of the `oneDAL` repository, execute the following:
```shell
docker build -t onedal-dev -f dev/docker/onedal-dev.Dockerfile .
```

For that, run:
```sh
docker run -it onedal-dev /bin/bash
```
Then, in order to use the container interactively, run:
```shell
docker run -it onedal-dev /bin/bash
```
25 changes: 12 additions & 13 deletions dev/docker/onedal-dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,28 @@
FROM ubuntu:22.04@sha256:adbb90115a21969d2fe6fa7f9af4253e16d45f8d4c1e930182610c4731962658

ARG workdirectory="/sources/oneDAL"

COPY . ${workdirectory}

WORKDIR ${workdirectory}

#Env setup
RUN apt-get update && \
apt-get -y install sudo wget gnupg git make python3-setuptools doxygen
apt-get -y install sudo wget gnupg git make python3-setuptools doxygen software-properties-common

# Install miniconda
ENV CONDA_DIR /opt/conda
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -p /opt/conda
ENV CONDA_DIR=/opt/conda
RUN wget --quiet \
"https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" && \
bash Miniforge3* -b -p /opt/conda

# Put conda in path to use conda activate
ENV PATH=$CONDA_DIR/bin:$PATH

# Installing environment for bazel
RUN wget https://github.com/bazelbuild/bazelisk/releases/download/v1.18.0/bazelisk-linux-amd64 && \
chmod 755 bazelisk-linux-amd64 && \
mv bazelisk-linux-amd64 /usr/bin/bazel

COPY . ${workdirectory}

# Installing environment for base development dependencies
RUN .ci/env/apt.sh dev-base

Expand All @@ -46,14 +51,8 @@ RUN .ci/env/apt.sh mkl
# Installing environment for clang-format
RUN .ci/env/apt.sh clang-format

# Installing environment for bazel
RUN wget https://github.com/bazelbuild/bazelisk/releases/download/v1.18.0/bazelisk-linux-amd64 && \
chmod 755 bazelisk-linux-amd64 && \
mv bazelisk-linux-amd64 /usr/bin/bazel

# Installing openBLAS dependency
RUN .ci/env/openblas.sh

# Installing oneTBB dependency
RUN ./dev/download_tbb.sh

0 comments on commit 62deb9d

Please sign in to comment.