diff --git a/CMakeLists.txt b/CMakeLists.txt index ddd4eb3d3..79af06f6a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,12 +20,6 @@ cmake_minimum_required (VERSION 3.13) -# Set flags from Conan if Conan is used -if(EXISTS "${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") - include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake" REQUIRED) - conan_basic_setup() -endif() - # Define build type set(DEFAULT_BUILD_TYPE "Release") diff --git a/README.md b/README.md index d9be54420..63af73a25 100644 --- a/README.md +++ b/README.md @@ -434,11 +434,6 @@ Microsoft Windows* Server | 2016, 2019 | *Not supported* - - - - - @@ -446,16 +441,16 @@ Microsoft Windows* Server | 2016, 2019 | *Not supported* - + + + + - - - @@ -476,80 +471,33 @@ Microsoft Windows* Server | 2016, 2019 | *Not supported* - - - - - - - -
Using Conan Using CMake Directly
Functional Testing Build Only Documentation
Linux* : GNU* GCC 5.1 or higher
Windows* : MSVS* 2017 or MSVS* 2019 (version 16.5 or newer)
CMake (version 3.13 or newer)
Linux* : GNU* GCC 5.1 or higher
Windows* : MSVS* 2017 or MSVS* 2019 (version 16.5 or newer)
Python 3.6 or higher CMake
Ninja (optional)
Conan C++ package manager GNU* FORTRAN Compiler - Sphinx Operating System Device PackageInstalled by Conan
Linux*/Windows* x86 CPU Intel(R) oneAPI DPC++ Compiler
or
oneAPI DPC++ Compiler
No
Intel(R) oneAPI Math Kernel Library Yes
Intel GPU Intel(R) oneAPI DPC++ Compiler No
Intel GPU driver No
Intel(R) oneAPI Math Kernel Library Yes
Linux* only NVIDIA GPU oneAPI DPC++ Compiler
or
AdaptiveCpp with CUDA backend and dependencies
No
AMD GPU oneAPI DPC++ Compiler
or
AdaptiveCpp with ROCm backend and dependencies
No
-*If [Building with Conan](https://oneapi-src.github.io/oneMKL/building_the_project.html#building-with-conan), above packages marked as "No" must be installed manually.* - -*If [Building with CMake](https://oneapi-src.github.io/oneMKL/building_the_project.html#building-with-cmake), above packages must be installed manually.* - -#### Notice for Use of Conan Package Manager -**LEGAL NOTICE: By downloading and using this container or script as applicable (the "Software Package") and the included software or software made available for download, you agree to the terms and conditions of the software license agreements for the Software Package, which may also include notices, disclaimers, or license terms for third party software (together, the "Agreements") included in this README file.** - -**If the Software Package is installed through a silent install, your download and use of the -Software Package indicates your acceptance of the Agreements.** - -#### Product and Version Information: - -Product | Supported Version | Installed by Conan | Conan Package Source | Package Install Location on Linux* | License -:--- | :--- | :--- | :--- | :--- | :--- -Python | 3.6 or higher | No | *N/A* | *Pre-installed or Installed by user* | [PSF](https://docs.python.org/3.6/license.html) -[Conan C++ Package Manager](https://conan.io/downloads.html) | 1.24 or higher | No | *N/A* | *Installed by user* | [MIT](https://github.com/conan-io/conan/blob/develop/LICENSE.md) -[CMake](https://cmake.org/download/) | 3.13 or higher | Yes
(3.15 or higher) | conan-center | ~/.conan/data or $CONAN_USER_HOME/.conan/data | [The OSI-approved BSD 3-clause License](https://gitlab.kitware.com/cmake/cmake/raw/master/Copyright.txt) -[Ninja](https://ninja-build.org/) | 1.10.0 | Yes | conan-center | ~/.conan/data or $CONAN_USER_HOME/.conan/data | [Apache License v2.0](https://github.com/ninja-build/ninja/blob/master/COPYING) -[GNU* FORTRAN Compiler](https://gcc.gnu.org/wiki/GFortran) | 7.4.0 or higher | Yes | apt | /usr/bin | [GNU General Public License, version 3](https://gcc.gnu.org/onlinedocs/gcc-7.5.0/gfortran/Copying.html) -[Intel(R) oneAPI DPC++ Compiler](https://software.intel.com/en-us/oneapi/dpc-compiler) | latest | No | *N/A* | *Installed by user* | [End User License Agreement for the Intel(R) Software Development Products](https://software.intel.com/en-us/license/eula-for-intel-software-development-products) -[AdaptiveCpp](https://github.com/AdaptiveCpp/AdaptiveCpp) | later than [2cfa530](https://github.com/AdaptiveCpp/AdaptiveCpp/commit/2cfa5303fd88b8f84e539b5bb6ed41e49c6d6118) | No | *N/A* | *Installed by user* | [BSD-2-Clause License ](https://github.com/AdaptiveCpp/AdaptiveCpp/blob/develop/LICENSE) -[oneAPI DPC++ Compiler binary for x86 CPU](https://github.com/intel/llvm/releases) | Daily builds | No | *N/A* | *Installed by user* | [Apache License v2](https://github.com/intel/llvm/blob/sycl/sycl/LICENSE.TXT) -[oneAPI DPC++ Compiler source for NVIDIA and AMD GPUs](https://github.com/intel/llvm) | Daily source releases | No | *N/A* | *Installed by user* | [Apache License v2](https://github.com/intel/llvm/blob/sycl/sycl/LICENSE.TXT) -[Intel(R) oneAPI Math Kernel Library](https://software.intel.com/en-us/oneapi/onemkl) | latest | Yes | apt | /opt/intel/inteloneapi/mkl | [Intel Simplified Software License](https://software.intel.com/en-us/license/intel-simplified-software-license) -[NVIDIA CUDA SDK](https://developer.nvidia.com/cublas) | 10.2 | No | *N/A* | *Installed by user* |[End User License Agreement](https://docs.nvidia.com/cuda/eula/index.html) -[AMD rocBLAS](https://rocblas.readthedocs.io/en/rocm-4.5.2/) | 4.5 | No | *N/A* | *Installed by user* |[AMD License](https://github.com/ROCmSoftwarePlatform/rocBLAS/blob/develop/LICENSE.md) -[AMD rocRAND](https://github.com/ROCmSoftwarePlatform/rocRAND) | 5.1.0 | No | *N/A* | *Installed by user* |[AMD License](https://github.com/ROCmSoftwarePlatform/rocRAND/blob/develop/LICENSE.txt) -[AMD rocSOLVER](https://github.com/ROCmSoftwarePlatform/rocSOLVER) | 5.0.0 | No | *N/A* | *Installed by user* |[AMD License](https://github.com/ROCmSoftwarePlatform/rocRAND/blob/develop/LICENSE.txt) -[AMD rocFFT](https://github.com/ROCmSoftwarePlatform/rocFFT) | rocm-5.4.3 | No | *N/A* | *Installed by user* |[AMD License](https://github.com/ROCmSoftwarePlatform/rocFFT/blob/rocm-5.4.3/LICENSE.md) -[NETLIB LAPACK](https://www.netlib.org/) | 3.7.1 | Yes | conan-community | ~/.conan/data or $CONAN_USER_HOME/.conan/data | [BSD like license](http://www.netlib.org/lapack/LICENSE.txt) -[Sphinx](https://www.sphinx-doc.org/en/master/) | 2.4.4 | Yes | pip | ~/.local/bin (or similar user local directory) | [BSD License](https://github.com/sphinx-doc/sphinx/blob/3.x/LICENSE) -[portBLAS](https://github.com/codeplaysoftware/portBLAS) | 0.1 | No | *N/A* | *Installed by user* | [Apache License v2.0](https://github.com/codeplaysoftware/portBLAS/blob/master/LICENSE) -[portFFT](https://github.com/codeplaysoftware/portFFT) | 0.1 | No | *N/A* | *Installed by user or automatically by cmake* | [Apache License v2.0](https://github.com/codeplaysoftware/portFFT/blob/master/LICENSE) - - -*conan-center: https://api.bintray.com/conan/conan/conan-center* - -*conan-community: https://api.bintray.com/conan/conan-community/conan* - --- ## Documentation @@ -606,22 +554,6 @@ Having installed oneMKL Interfaces headers as `-I` instead on system includes (a - Option 1: Use CMake >=3.25. In this case oneMKL Interfaces will be built with `EXPORT_NO_SYSTEM` property set to `true` and you won't see the issue. - Option 2: If you use CMake < 3.25, set `PROPERTIES NO_SYSTEM_FROM_IMPORTED true` for your target. E.g: `set_target_properties(test PROPERTIES NO_SYSTEM_FROM_IMPORTED true)`. -### Conan - -1. I am behind a proxy. How can Conan download dependencies from external network? - - `~/.conan/conan.conf` has a `[proxies]` section where you can add the list of proxies. For details refer to [Conan proxy settings](https://docs.conan.io/en/latest/reference/config_files/conan.conf.html#proxies). - -2. I get an error while installing packages via APT through Conan. - ``` - dpkg: warning: failed to open configuration file '~/.dpkg.cfg' for reading: Permission denied - Setting up intel-oneapi-mkl-devel (2021.1-408.beta07) ... - E: Sub-process /usr/bin/dpkg returned an error code (1) - ``` - - Although your user session has permissions to install packages via `sudo apt`, it does not have permissions to update debian package configuration, which throws an error code 1, causing a failure in `conan install` command. - - The package is most likely installed correctly and can be verified by: - 1. Running the `conan install` command again. - 2. Checking `/opt/intel/inteloneapi` for `mkl` and/or `tbb` directories. - --- diff --git a/conan/profiles/inteldpcpp_lnx b/conan/profiles/inteldpcpp_lnx deleted file mode 100644 index 59192f974..000000000 --- a/conan/profiles/inteldpcpp_lnx +++ /dev/null @@ -1,47 +0,0 @@ -#=============================================================================== -# Copyright 2020-2021 Intel Corporation -# -# 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. -# -# -# SPDX-License-Identifier: Apache-2.0 -#=============================================================================== - -COMPILER_PREFIX= - -[settings] -os=Linux -os_build=Linux -arch=x86_64 -arch_build=x86_64 -compiler=clang -compiler.version=11 -compiler.libcxx=libstdc++11 -build_type=Release - -[build_requires] -cmake/[>=3.15] -ninja/1.10.0 - -[env] -CONAN_CMAKE_GENERATOR="Ninja" -CONAN_SYSREQUIRES_MODE=enabled -CONAN_SYSREQUIRES_SUDO=True -CC=$COMPILER_PREFIX/bin/clang -CXX=$COMPILER_PREFIX/bin/dpcpp -CPATH=[$COMPILER_PREFIX/include] -CFLAGS=-fdiagnostics-color -fdiagnostics-show-template-tree -march=native -CXXFLAGS=-fdiagnostics-color -fdiagnostics-show-template-tree -march=native -LDFLAGS=-Wl,-rpath=$COMPILER_PREFIX/lib/ -LIBRARY_PATH=$COMPILER_PREFIX/../../../tbb/latest/lib/intel64/gcc4.8/ -LD_LIBRARY_PATH=[$COMPILER_PREFIX/lib:$COMPILER_PREFIX/lib/x64:$COMPILER_PREFIX/compiler/lib/intel64:$COMPILER_PREFIX/../../../tbb/latest/lib/intel64/gcc4.8/] diff --git a/conan/remotes.txt b/conan/remotes.txt deleted file mode 100644 index 569ddd4e2..000000000 --- a/conan/remotes.txt +++ /dev/null @@ -1,2 +0,0 @@ -conan-center https://api.bintray.com/conan/conan/conan-center True -conan-community https://api.bintray.com/conan/conan-community/conan True diff --git a/conan/settings.yml b/conan/settings.yml deleted file mode 100644 index aa8bdadbd..000000000 --- a/conan/settings.yml +++ /dev/null @@ -1,92 +0,0 @@ - -# Only for cross building, 'os_build/arch_build' is the system that runs Conan -os_build: [Windows, WindowsStore, Linux, Macos, FreeBSD, SunOS, AIX] -arch_build: [x86, x86_64, ppc32be, ppc32, ppc64le, ppc64, armv5el, armv5hf, armv6, armv7, armv7hf, armv7s, armv7k, armv8, armv8_32, armv8.3, sparc, sparcv9, mips, mips64, avr, s390, s390x, sh4le] - -# Only for building cross compilation tools, 'os_target/arch_target' is the system for -# which the tools generate code -os_target: [Windows, Linux, Macos, Android, iOS, watchOS, tvOS, FreeBSD, SunOS, AIX, Arduino, Neutrino] -arch_target: [x86, x86_64, ppc32be, ppc32, ppc64le, ppc64, armv5el, armv5hf, armv6, armv7, armv7hf, armv7s, armv7k, armv8, armv8_32, armv8.3, sparc, sparcv9, mips, mips64, avr, s390, s390x, asm.js, wasm, sh4le] - -# Rest of the settings are "host" settings: -# - For native building/cross building: Where the library/program will run. -# - For building cross compilation tools: Where the cross compiler will run. -os: - Windows: - subsystem: [None, cygwin, msys, msys2, wsl] - WindowsStore: - version: ["8.1", "10.0"] - WindowsCE: - platform: ANY - version: ["5.0", "6.0", "7.0", "8.0"] - Linux: - Macos: - version: [None, "10.6", "10.7", "10.8", "10.9", "10.10", "10.11", "10.12", "10.13", "10.14", "10.15"] - Android: - api_level: ANY - iOS: - version: ["7.0", "7.1", "8.0", "8.1", "8.2", "8.3", "9.0", "9.1", "9.2", "9.3", "10.0", "10.1", "10.2", "10.3", "11.0", "11.1", "11.2", "11.3", "11.4", "12.0", "12.1", "12.2", "12.3", "12.4", "13.0", "13.1"] - watchOS: - version: ["4.0", "4.1", "4.2", "4.3", "5.0", "5.1", "5.2", "5.3", "6.0", "6.1"] - tvOS: - version: ["11.0", "11.1", "11.2", "11.3", "11.4", "12.0", "12.1", "12.2", "12.3", "12.4", "13.0"] - FreeBSD: - SunOS: - AIX: - Arduino: - board: ANY - Emscripten: - Neutrino: - version: ["6.4", "6.5", "6.6", "7.0"] -arch: [x86, x86_64, ppc32be, ppc32, ppc64le, ppc64, armv4, armv4i, armv5el, armv5hf, armv6, armv7, armv7hf, armv7s, armv7k, armv8, armv8_32, armv8.3, sparc, sparcv9, mips, mips64, avr, s390, s390x, asm.js, wasm, sh4le] -compiler: - sun-cc: - version: ["5.10", "5.11", "5.12", "5.13", "5.14"] - threads: [None, posix] - libcxx: [libCstd, libstdcxx, libstlport, libstdc++] - gcc: &gcc - version: ["4.1", "4.4", "4.5", "4.6", "4.7", "4.8", "4.9", - "5", "5.1", "5.2", "5.3", "5.4", "5.5", - "6", "6.1", "6.2", "6.3", "6.4", - "7", "7.1", "7.2", "7.3", "7.4", - "8", "8.1", "8.2", "8.3", - "9", "9.1", "9.2"] - libcxx: [libstdc++, libstdc++11] - threads: [None, posix, win32] # Windows MinGW - exception: [None, dwarf2, sjlj, seh] # Windows MinGW - cppstd: [None, 98, gnu98, 11, gnu11, 14, gnu14, 17, gnu17, 20, gnu20] - Visual Studio: &visual_studio - runtime: [MD, MT, MTd, MDd] - version: ["8", "9", "10", "11", "12", "14", "15", "16"] - toolset: [None, v90, v100, v110, v110_xp, v120, v120_xp, - v140, v140_xp, v140_clang_c2, LLVM-vs2012, LLVM-vs2012_xp, - LLVM-vs2013, LLVM-vs2013_xp, LLVM-vs2014, LLVM-vs2014_xp, - LLVM-vs2017, LLVM-vs2017_xp, v141, v141_xp, v141_clang_c2, v142] - cppstd: [None, 14, 17, 20] - clang: - version: ["3.3", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "4.0", - "5.0", "6.0", "7.0", "7.1", - "8", "9", "10", "11"] - libcxx: [libstdc++, libstdc++11, libc++, c++_shared, c++_static] - cppstd: [None, 98, gnu98, 11, gnu11, 14, gnu14, 17, gnu17, 20, gnu20] - apple-clang: - version: ["5.0", "5.1", "6.0", "6.1", "7.0", "7.3", "8.0", "8.1", "9.0", "9.1", "10.0", "11.0"] - libcxx: [libstdc++, libc++] - cppstd: [None, 98, gnu98, 11, gnu11, 14, gnu14, 17, gnu17, 20, gnu20] - intel: - version: ["11", "12", "13", "14", "15", "16", "17", "18", "19"] - base: - gcc: - <<: *gcc - threads: [None] - exception: [None] - Visual Studio: - <<: *visual_studio - qcc: - version: ["4.4", "5.4"] - libcxx: [cxx, gpp, cpp, cpp-ne, accp, acpp-ne, ecpp, ecpp-ne] - -build_type: [None, Debug, Release, RelWithDebInfo, MinSizeRel] - - -cppstd: [None, 98, gnu98, 11, gnu11, 14, gnu14, 17, gnu17, 20, gnu20] # Deprecated, use compiler.cppstd diff --git a/conanfile.py b/conanfile.py deleted file mode 100644 index 930cedc51..000000000 --- a/conanfile.py +++ /dev/null @@ -1,156 +0,0 @@ -#=============================================================================== -# Copyright 2020-2021 Intel Corporation -# -# 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. -# -# -# SPDX-License-Identifier: Apache-2.0 -#=============================================================================== - -from conans import ConanFile, CMake, tools -from packaging.version import parse -from six import StringIO - -class oneMKLConan(ConanFile): - name = "oneMKL" - version = "0.1.0-beta" - url = "https://github.com/oneapi-src/oneMKL" - description = "oneMKL interfaces is an open-source implementation of oneMKL Data Parallel C++ (DPC++) interfaces according to oneMKL specification that can work with multiple devices (backends) using device specific libraries underneath." - license = "Apache License Version 2.0" - legal_notice = "\ -LEGAL NOTICE: By downloading and using this container or script as applicable \n \ -(the “Software Package”), and any included software or software made available \n \ -for download, you agree to the terms and conditions of the software license \n \ -agreements for the Software Package, which may also include notices, \n \ -disclaimers or license terms for third party software (the “Agreements”) \n \ -located at https://github.com/conan-io/conan/blob/develop/LICENSE.md, the \n \ -THIRD-PARTY-PROGRAMS file and in the README.md file included with the Software Package. \n \ - " - - # Dependencies - netlib_version = "3.7.1" - sphinx_version = "2.4.4" - - settings = "os", "compiler", "build_type", "arch" - options = { - # Build style - "build_shared_libs": [True, False], - "target_domains" : "ANY", - - # Backends - "enable_mklcpu_backend" : [True, False], - "enable_mklgpu_backend" : [True, False], - - # Threading for mklcpu_backend - "enable_mklcpu_thread_tbb": [True, False], - - # Testing - "build_functional_tests" : [True, False], - - # Documentation - "build_doc" : [True, False] - } - default_options = { - "build_shared_libs" : True, - "target_domains" : None, - - "enable_mklcpu_backend" : True, - "enable_mklgpu_backend" : True, - - "enable_mklcpu_thread_tbb": True, - - "build_functional_tests" : True, - - "build_doc" : False, - - # External package options - "lapack:shared": True - } - generators = "cmake" - no_copy_source = True - exports_sources = "cmake/*", "include/*", "tests/*", "CMakeLists.txt" - - - def system_requirements(self): - self.output.info(f"\n {self.legal_notice}") - self.global_system_requirements = True - installer = tools.SystemPackageTool() - if self.options.enable_mklcpu_backend or self.options.enable_mklgpu_backend: - installer.add_repository("\"deb https://apt.repos.intel.com/oneapi all main\"") - installer.install("intel-oneapi-mkl-devel") # User must apt-key add GPG key before they can download oneMKL - if self.options.enable_mklcpu_thread_tbb: - installer.install("intel-oneapi-tbb-devel") # For libtbb.so used during link-time - - - def get_python_exe(self): - # Find supported Python binary - python_exe = "python3" - try: - self.run(f"{python_exe} --version", output=False) - except: - python_exe = "python" - my_buffer = StringIO() - self.run(f"{python_exe} --version", output=my_buffer) - ver_found = parse( my_buffer.getvalue().replace('Python ', '') ) - if ver_found < parse('3.6.0'): - self.output.error(f"Python 3.6.0 or higher required. Found {ver_found}") - return - return python_exe - - - def build_requirements(self): - if self.options.build_functional_tests: - self.build_requires(f"lapack/{self.netlib_version}@conan/stable") - # For Sphinx only - if self.options.build_doc: - # Use pip to install Sphinx as a user package - self.run(f"{self.get_python_exe()} -m pip install sphinx=={self.sphinx_version}") - - - def _cmake(self): - cmake = CMake(self) - return cmake - - - def build(self): - cmake = self._cmake() - cmake.definitions.update({ - # Options - "BUILD_SHARED_LIBS" : self.options.build_shared_libs, - "ENABLE_MKLCPU_BACKEND" : self.options.enable_mklcpu_backend, - "ENABLE_MKLGPU_BACKEND" : self.options.enable_mklgpu_backend, - "ENABLE_MKLCPU_THREAD_TBB" : self.options.enable_mklcpu_thread_tbb, - "BUILD_FUNCTIONAL_TESTS" : self.options.build_functional_tests, - "BUILD_DOC" : self.options.build_doc, - - # Paramaters - # Conan does not officially support oneAPI DPC++ Compiler, hence disable the compiler_id check - "CONAN_DISABLE_CHECK_COMPILER" : True, - "MKL_ROOT" : "/opt/intel/inteloneapi/mkl/latest", - }) - # Pass target_domains definition transparently to CMake, since CMakeLists.txt contains checks and defaults. - if self.options.target_domains != None: - cmake.definitions["TARGET_DOMAINS"] = self.options.target_domains - cmake.configure() - cmake.build() - if tools.get_env("CONAN_RUN_TESTS", default=True) and self.options.build_functional_tests: - cmake.test() - - - def package(self): - cmake = self._cmake() - cmake.install() - - - def package_info(self): - self.cpp_info.libs = ["onemkl"] diff --git a/docs/README.md b/docs/README.md index 32a56f82c..040d22aac 100644 --- a/docs/README.md +++ b/docs/README.md @@ -3,9 +3,8 @@ This folder contains oneMKL documentation in reStructuredText (rST) format. The documentation build step is skipped by default. -To enable building documentation from the main build: -- Set `-o build_doc=True` when building with Conan. For more information see [Building with Conan](../README.md#building-with-conan) -- Set `-DBUILD_DOC=ON` when building with CMake. For more information see [Building with CMake](../README.md#building-with-cmake) +To enable building documentation from the main build, set `-DBUILD_DOC=ON`. +For more information see [Building with CMake](../README.md#building-with-cmake). To build documentation only, use the following commands from the current folder: ```bash diff --git a/docs/building_the_project.rst b/docs/building_the_project.rst index eb7556b1b..c55731dca 100644 --- a/docs/building_the_project.rst +++ b/docs/building_the_project.rst @@ -17,15 +17,8 @@ Build Setup is the root directory of this repository. #. - You can :ref:`Build with Conan ` to automate the - process of getting dependencies or you can download and install the - required dependencies manually and - :ref:`Build with CMake ` directly. + Download and install the required dependencies manually and :ref:`Build with CMake `. -.. note:: - Conan package manager automates the process of getting required packages - so that you do not have to go to different web location and follow different - instructions to install them. .. _build_setup_with_hipsycl: @@ -55,216 +48,7 @@ Build Setup with hipSYCL Download and install the required dependencies manually and :ref:`Build with CMake `. -.. _building_with_conan: - -Building with Conan -################### - -** This method currently works on Linux* only ** - -** Make sure you have completed :ref:`Build Setup `. ** - -.. note:: - To understand how dependencies are resolved, refer to "Product and Version - Information" under - `Support and Requirements `_. - For details about Conan package manager, refer to the - `Conan Documentation `_. - -Getting Conan -^^^^^^^^^^^^^ - -Conan can be `installed `_ from pip: - -.. code-block:: bash - - pip3 install conan - -Setting up Conan -^^^^^^^^^^^^^^^^ - -Conan Default Directory -~~~~~~~~~~~~~~~~~~~~~~~ - -Conan stores all files and data in ``~/.conan``. If you are fine with this -behavior, you can skip to the :ref:`Conan Profiles ` section. - -To change this behavior, set the environment variable ``CONAN_USER_HOME`` to a -path of your choice. A ``.conan/`` directory will be created in this path and -future Conan commands will use this directory to find configuration files and -download dependent packages. Packages will be downloaded into -``$CONAN_USER_HOME/data``. To change the ``"/data"`` part of this directory, -refer to the ``[storage]`` section of ``conan.conf`` file. - -To make this setting persistent across terminal sessions, you can add the -line below to your ``~/.bashrc`` or custom runscript. Refer to the -`Conan Documentation `_ -for more details. - -.. code-block:: sh - - export CONAN_USER_HOME=/usr/local/my_workspace/conan_cache - -.. _conan-profiles: - -Conan Profiles -~~~~~~~~~~~~~~ - -Profiles are a way for Conan to determine a basic environment to use for -building a project. This project ships with profiles for: - - -* Intel(R) oneAPI DPC++ Compiler for x86 CPU and Intel GPU backend: ``inteldpcpp_lnx`` - - -#. Open the profile you wish to use from ``/conan/profiles/`` - and set ``COMPILER_PREFIX`` to the path to the root folder of compiler. - The root folder is the one that contains the ``bin`` and ``lib`` - directories. For example, Intel(R) oneAPI DPC++ Compiler root folder for - default installation on Linux is - ``/opt/intel/inteloneapi/compiler//linux``. The user can define a - custom path for installing the compiler. - -.. code-block:: ini - - COMPILER_PREFIX= - - -#. - You can customize the ``[env]`` section of the profile based on individual - requirements. - -#. - Install configurations for this project: - - .. code-block:: sh - - # Inside - $ conan config install conan/ - - This command installs all contents of ``/conan/``\ , most - importantly profiles, to conan default directory. - -.. note:: - If you change the profile, you must re-run the above command before you can - use the new profile. - -Building -^^^^^^^^ - -#. - Out-of-source build - - .. code-block:: bash - # Inside - mkdir build && cd build - -#. - If you choose to build backends with the Intel(R) oneAPI - Math Kernel Library, install the GPG key as mentioned here: - https://software.intel.com/en-us/articles/oneapi-repo-instructions#aptpkg - -#. - Install dependencies - - .. code-block:: sh - - conan install .. --profile --build missing [-o =] [-o =] - - The ``conan install`` command downloads and installs all requirements for - the oneMKL DPC++ Interfaces project as defined in - ``/conanfile.py`` based on the options passed. It also - creates ``conanbuildinfo.cmake`` file that contains information about all - dependencies and their directories. This file is used in top-level - ``CMakeLists.txt``. - -``-pr | --profile `` -Defines a profile for Conan to use for building the project. - -``-b | --build `` -Tells Conan to build or re-build a specific package. If ``missing`` is passed -as a value, all missing packages are built. This option is recommended when -you build the project for the first time, because it caches required packages. -You can skip this option for later use of this command. - - -#. Build Project - .. code-block:: sh - - conan build .. [--configure] [--build] [--test] # Default is all - -The ``conan build`` command executes the ``build()`` procedure from -``/conanfile.py``. Since this project uses ``CMake``\ , you -can choose to ``configure``\ , ``build``\ , ``test`` individually or perform -all steps by passing no optional arguments. - - -#. Optionally, you can also install the package. Similar to ``cmake --install . --prefix ``. - -.. code-block:: sh - - conan package .. --build-folder . --install-folder - -``-bf | --build-folder`` -Tells Conan where to find the built project. - -``-if | --install-folder`` -Tells Conan where to install the package. It is similar to specifying ``CMAKE_INSTALL_PREFIX`` - -.. note:: - For a detailed list of commands and options, refer to the - `Conan Command Reference `_. - -Conan Build Options -^^^^^^^^^^^^^^^^^^^ - -Backend-Related Options -~~~~~~~~~~~~~~~~~~~~~~~ - -The following ``options`` are available to pass on ``conan install`` when -building the oneMKL library: - - -* ``build_shared_libs=[True | False]``. Setting it to ``True`` enables the building of dynamic libraries. The default value is ``True``. -* ``target_domains=[]``. Setting it to ``blas`` or any other list of domain(s), enables building of those specific domain(s) only. If not defined, the default value is all supported domains. -* ``enable_mklcpu_backend=[True | False]``. Setting it to ``True`` enables the building of oneMKL mklcpu backend. The default value is ``True``. -* ``enable_mklgpu_backend=[True | False]``. Setting it to ``True`` enables the building of oneMKL mklgpu backend. The default value is ``True``. -* ``enable_mklcpu_thread_tbb=[True | False]``. Setting it to ``True`` enables oneMKL on CPU with TBB threading instead of sequential. The default value is ``True``. - -Testing-Related Options -~~~~~~~~~~~~~~~~~~~~~~~ - -* ``build_functional_tests=[True | False]``. Setting it to ``True`` enables - the building of functional tests. The default value is ``True``. - -Example-Related Options -~~~~~~~~~~~~~~~~~~~~~~~ - -* ``build_examples=[True | False]``. Setting it to ``True`` enables - the building of examples. The default value is ``True``. Compile_time_dispatching examples will always be built if this value is set to true. Run_time_dispatching examples will be build if both this value and ``build_shared_libs`` is set to true - -Documentation -~~~~~~~~~~~~~ - -* ``build_doc=[True | False]``. Setting it to ``True`` enables the building of rst files to generate HTML files for updated documentation. The default value is ``False``. - -.. note:: - For a mapping between Conan and CMake options, refer to - :ref:`Building with CMake `. - -Example -^^^^^^^ - -Build oneMKL as a static library for oneMKL cpu and gpu backend: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. code-block:: sh - - # Inside - mkdir build && cd build - conan install .. --build missing --profile inteldpcpp_lnx -o build_shared_libs=False - conan build .. .. _building_with_cmake: @@ -568,85 +352,63 @@ When building oneMKL the SYCL implementation can be specified by setting the `oneAPI DPC++ Compiler `_ compilers. * ``hipsycl`` for the `hipSYCL `_ SYCL implementation. -All options specified in the Conan section are available to CMake. You can -specify these options using ``-D=``. - -The following table provides a detailed mapping of options between Conan and -CMake. +The following table provides details of CMake options and their default values: .. list-table:: :header-rows: 1 - * - Conan Option - - CMake Option + * - CMake Option - Supported Values - Default Value - * - build_shared_libs - - BUILD_SHARED_LIBS + * - BUILD_SHARED_LIBS - True, False - True - * - enable_mklcpu_backend - - ENABLE_MKLCPU_BACKEND + * - ENABLE_MKLCPU_BACKEND - True, False - True - * - enable_mklgpu_backend - - ENABLE_MKLGPU_BACKEND + * - ENABLE_MKLGPU_BACKEND - True, False - True - * - *Not Supported* - - ENABLE_CUBLAS_BACKEND + * - ENABLE_CUBLAS_BACKEND - True, False - False - * - *Not Supported* - - ENABLE_CUSOLVER_BACKEND + * - ENABLE_CUSOLVER_BACKEND - True, False - False - * - *Not Supported* - - ENABLE_CUFFT_BACKEND + * - ENABLE_CUFFT_BACKEND - True, False - False - * - *Not Supported* - - ENABLE_CURAND_BACKEND + * - ENABLE_CURAND_BACKEND - True, False - False - * - *Not Supported* - - ENABLE_NETLIB_BACKEND + * - ENABLE_NETLIB_BACKEND - True, False - False - * - *Not Supported* - - ENABLE_ROCBLAS_BACKEND + * - ENABLE_ROCBLAS_BACKEND - True, False - False - * - *Not Supported* - - ENABLE_ROCFFT_BACKEND + * - ENABLE_ROCFFT_BACKEND - True, False - False - * - enable_mklcpu_thread_tbb - - ENABLE_MKLCPU_THREAD_TBB + * - ENABLE_MKLCPU_THREAD_TBB - True, False - True - * - *Not Supported* - - ENABLE_PORTBLAS_BACKEND + * - ENABLE_PORTBLAS_BACKEND - True, False - False - * - *Not Supported* - - ENABLE_PORTFFT_BACKEND + * - ENABLE_PORTFFT_BACKEND - True, False - False - * - build_functional_tests - - BUILD_FUNCTIONAL_TESTS + * - BUILD_FUNCTIONAL_TESTS - True, False - True - * - build_examples - - BUILD_EXAMPLES + * - BUILD_EXAMPLES - True, False - True - * - build_doc - - BUILD_DOC + * - BUILD_DOC - True, False - False - * - target_domains (list) - - TARGET_DOMAINS (list) + * - TARGET_DOMAINS (list) - blas, lapack, rng, dft - All domains @@ -680,8 +442,7 @@ Most use-cases involve building the project without the need to cleanup the build directory. However, if you wish to cleanup the build directory, you can delete the ``build`` folder and create a new one. If you wish to cleanup the build files but retain the build configuration, following commands will help -you do so. They apply to both ``Conan`` and ``CMake`` methods of building -this project. +you do so. .. code-block:: sh diff --git a/tests/README.md b/tests/README.md index 54ff0f3c5..f00d38523 100644 --- a/tests/README.md +++ b/tests/README.md @@ -4,7 +4,7 @@ Inside the `unit_tests` directory, there are domain-level directories which contain domain-specific tests, usually per function or per configuration. ## Steps -Functional testing is enabled by default via `Conan` and `CMake`, so all relevant functional tests will run automatically after the project is built successfully. +Functional testing is enabled by default, so all relevant functional tests will run automatically after the project is built successfully. *Note: A set of `build options` define a `build configuration`. `CMake` builds and runs different set of tests depending on your `build configuration`. This is because `CMake` generates an export header file (config.hpp) for the selected build configuration. Check `/src/config.hpp.in` and `/src/CMakeLists.txt` for details. For details on how `CMake` performs export header generation, refer to [CMake documentation](https://cmake.org/cmake/help/v3.13/module/GenerateExportHeader.html).*