@prev_tutorial{tutorial_linux_install} @next_tutorial{tutorial_linux_gcc_cmake}
| | | | -: | :- | | Original author | Alessandro de Oliveira Faria | | Compatibility | OpenCV >= 4.11.0 |
oneAPI is Intel's open initiative (now also maintained by the UXL Foundation) that combines a specification and a set of toolkits for programming CPUs, GPUs, FPGAs and NPUs with a single code base. The core is the SYCL standard (single-source C++ for parallelism), complemented by high-performance libraries — oneTBB (parallelism), oneMKL (linear algebra), oneDNN (neural networks), oneVPL (video), etc. Thus, when you compile with oneAPI's DPC++ (icpx) compiler, the binary gains optimized execution paths that choose, at runtime, the best vector instructions or the available device, without changing the source code.
Systems based on Intel® 64 architectures below are supported both as host and target platforms.
@note: During the installation process, the installer may need up to 6 GB of additional temporary disk storage to manage the download and intermediate installation files.
Installing oneAPI: To quickly set up the oneAPI ecosystem on openSUSE, simply follow the official guide https://www.intel.com/content/www/us/en/developer/articles/guide/installation-guide-for-oneapi-toolkits.html, which shows you how to enable the distribution’s dedicated repository (zypper ar … oneAPI) and install the metapackages ― for example, intel-basekit (DPC++, TBB, oneDNN, IPP compilers) and, optionally, intel-hpckit or intel-renderkit if you need HPC or graphics tools. The guide also explains post-installation tweaks, such as loading the environment with source /opt/intel/oneapi/setvars.sh , ensuring that the binaries (icpx, dpcpp) and libraries are immediately available in your shell for compiling and running accelerated applications.
Below are the commands to download last version (latest release on the date of publication of this text):
git clone https://github.com/opencv/opencv.git
and make sure you are using branch 4.*:
git status
On branch 4.x
Navigate to OpenCV repository and prepare the build folder:
cd opencv
mkdir build
cd build
Set up Intel oneAPI environment variables. For default installation:
source /opt/intel/oneapi/setvars.sh
Run CMake * with Intel® oneAPI DPC++/C++ Compiler to configure the project:
cmake -DCMAKE_C_COMPILER=icx \
-DCMAKE_CXX_COMPILER=icpx
-DCMAKE_CXX_FLAGS="-march=native -mavx -mfma -msse -msse2" ..
cmake --build .
Now Make sure openCV* is compiled with Intel® oneAPI DPC++/C++ Compiler and install:
readelf -p .comment bin/opencv_annotation
String dump of section '.comment':
[ 0] GCC: (SUSE Linux) 13.3.1 20250313 [revision 4ef1d8c84faeebffeb0cc01ee22e891b41e5c4e0]
[ 56] GCC: (SUSE Linux) 12.3.0
[ 6f] Intel(R) oneAPI DPC++/C++ Compiler 2025.1.1 (2025.1.1.20250418)
make install
Have fun...