Get Started with Intel®
one API one API Data Analytics Library
Get Started with Intel® one API one API Data Analytics Library
Intel® oneAPI Data Analytics Library (oneDAL) is a library that helps speed up big data analysis by providing highly optimized algorithmic building blocks for all stages of data analytics (preprocessing, transformation, analysis, modeling, validation, and decision making) in batch, online, and distributed processing modes of computation. For general information about oneDAL, visit oneDAL official page.
Перед тим як ти почнеш
oneDAL is located in <install_dir>/dal directory where <install_dir> is the directory in which Intel® oneAPI Base Toolkit was installed.
The current version of oneDAL with SYCL support is available for Linux* and Windows* 64-bit operating systems. The prebuilt oneDAL libraries can be found in the <install_dir>/dal/<version>/resist directory.
To learn about the system requirements and the dependencies needed to build examples, refer to the Системні вимоги стр.
End-to-end Example
Below you can find a typical usage workflow for a oneDAL algorithm on GPU. The example is provided for Principal Component Analysis algorithm (PCA).
The following steps depict how to:
- Read the data from CSV file
- Run the training and inference operations for PCA
- Access intermediate results obtained at the training stage
- Include the following header that makes all oneDAL declarations available.
- Create a SYCL* queue with the desired device selector. In this case, GPU selector is used:
const auto queue = sycl::queue{ sycl::gpu_selector{} }; - Since all oneDAL declarations are in the oneapi::dal namespace, import all declarations from the oneapi namespace to use dal instead of oneapi::dal for brevity: using namespace oneapi;
- Use CSV data source to read the data from the CSV file into a table:
const auto data = dal::read<dal::table>(queue, dal::csv::data source{“data.csv”}); - Create a PCA descriptor, configure its parameters, and run the training algorithm on the data loaded from CSV.
- Print the learned eigenvectors:
- Use the trained model for inference to reduce dimensionality of the data:
Build and Run Exampле
Perform the following steps to build and run examples demonstrating the basic usage scenarios of one DAL with SYCL support. Go to <install_dir>/dal/<version> and then set up an environment as shown in the example нижче:
ПРИМІТКА All content below that starts with # is considered a comment and should not be run with the code.
- Set up the required environment for one DAL (variables such as CPATH, LIBRARY_PATH, and LD_LIBRARY_PATH):
• On Linux, there are two possible ways to set up the required environment: via vars.sh script or via module files.
• Setting up one DAL environment via vars.sh script Run the following command:
source ./env/vars.sh
• Setting up one DAL environment via module files
Initialize1. modules: source $MODULESHOME/infit/bash
ПРИМІТКА Refer to Environment Modules documentation for details.
Provide2. modules with a path to the module files directory: module
use ./module files
Run the3.module:
module load dal
• On Windows, run the following command:
/env/vars.bat - Copy ./examples/neap/dip to a writable directory if necessary (since it creates temporary files):
cp r ./examples/oneapi/dpc ${WRITABLE_DIR} - Set up the compiler environment for Intel® one API DPC++/C++ Compiler. See Get Started with Intel® oneAPI DPC++/C++ Compiler for details.
- Build and run the examples that show how to use one DAL with SYCL support:
ПРИМІТКА You need to have write permissions to the examples folder to build examples, and execute permissions to run them. Otherwise, you need to copy examples/oneapi/dpc and examples/ oneapi/data folders to the directory with right permissions. These two folders must be retained in the same directory level relative to each other.
• On Linux:• On Windows:
- To see all available parameters of the build procedure, type make on Linux* or unmake on Windows*.
The resulting example binaries and log files are written into the _results directory.
ПРИМІТКА You should run the examples from examples/oneapi/dpc folder, not from _results folder. Most examples require data to be stored in examples/oneapi/data folder and to have a relative link to it started from examples/oneapi/dip folder.
You can build traditional C++ examples located in examples/oneapi/cup folder in a similar way.
Compile and build applications with pkg-config
The pkg-config tool is a widely used tool for building software with dependencies. Intel® one API Data Analytics Library provides files with pug-config metadata for compiling and linking an application to the library.
Налаштуйте середовище
To use pug-config, build the library and then set up the environment using vars.sh or vars.bat scripts:
- On Linux: source ./env/vars.sh
- On Windows: /env/vars.bat
Choose a metadata file
Метадані files provided by one DAL cover only host device configuration on 64-bit Linux, macOS, or Windows operating system for C++.
Choose the metadata file based on one DAL threading mode and linking method you use:
one DAL pug-config metadata files
Single-threaded (non-threaded) | Multi-threaded (internally threaded) | |
Статичне пов'язування | dal-static-sequential-host | dal-static-threading-host |
Динамічне пов'язування | dal-dynamic-sequential-host | dal-dynamic-threading-host |
Compile a program using peg-config
To compile a test.cpp program with one DAL and peg-config, provide the name of the one DAL pug-config metadata file as an input parameter. For exampле:
- On Linux or macOS:
ice test.cpp pug-config –flags –libs dal-dynamic-threading-host - У Windows:
for /F “delimbs=,” %i in (‘pug-config –flags –libs dal-dynamic-threading-host) do icl test.cpp %i
А сample code for svm_two_class_thunder_dense_batch example with SYCL support. Run the following from the examples/oneapi/cpp directory: - On Linux or macOS:
icc -I source/ source/svm/svm_two_class_thunder_dense_batch.cpp icc test.cpp pkg-config –cflags –libs dal-dynamic-threading-host - У Windows:
for /F “delis=,” %i in (‘peg-config –flags –libs dal-dynamic-threading-host) do ill -I source/ ill svm_two_class_thunder_dense_batch.cpp %i
знайти
Документ | опис |
Developer Guide and Reference | Refer to one DAL Developer Guide and Reference for detailed information about implemented algorithms. |
Системні вимоги | Check system requirements before you install Intel® one API Data Analytics Library. |
Примітки до випуску | Refer to release notes for Intel® one API Data Analytics Library to learn about new updates in the latest release. |
Код Сampле | Learn how to use one DAL with daal4py, a Python* API. |
one DAL Specification | Learn about requirements for implementations of one API Data Analytics Library. |
Повідомлення та застереження
Технології Intel можуть вимагати активації апаратного, програмного забезпечення або послуги.
Жоден продукт чи компонент не може бути абсолютно безпечним.
Ваші витрати та результати можуть відрізнятися.
© Корпорація Intel. Intel, логотип Intel та інші знаки Intel є товарними знаками корпорації Intel або її дочірніх компаній. Інші назви та бренди можуть бути визнані власністю інших.
Цей документ не надає жодної ліцензії (прямої чи неявної, estoppel чи іншим чином) на будь-які права інтелектуальної власності.
Описана продукція може містити дефекти конструкції або помилки, відомі як помилки, які можуть призвести до відхилення виробу від опублікованих специфікацій. Поточні характеристичні помилки доступні за запитом.
Intel відмовляється від усіх явних і непрямих гарантій, включаючи, без обмежень, непрямі гарантії придатності для продажу, придатності для певної мети та непорушення прав, а також будь-які гарантії, що випливають із ходу роботи, поведінки чи використання в торгівлі.
Документи / Ресурси
![]() |
intel Get Started with oneAPI oneAPI Data Analytics Library [pdf] Посібник користувача Get Started with oneAPI oneAPI Data Analytics Library, Get Started, with oneAPI oneAPI Data Analytics Library, Analytics Library |
посилання
-
porkbun.com | паркований домен
-
oneAPI-samples/Libraries/oneDAL at master · oneapi-src/oneAPI-sampліс · GitHub
-
Environment Modules — Modules documentation
-
Release Notes for Intel® oneAPI Data Analytics Library
-
System Requirements for Intel® oneAPI Data Analytics Library
-
Почніть роботу з компілятором Intel® oneAPI DPC++/C++
-
Intel® oneAPI Data Analytics Library
-
Прискоріть ML & DL за допомогою бібліотеки аналізу даних Intel® oneAPI
-
oneDAL — oneAPI Specification 1.2-rev-1 documentation