Welcome to this
episode of Bone Hunt: Discovering Dinosaurs with AI.
I’m Bob Chesbrough, a solution engineer and technical evangelist
supporting oneAPI AI here at Intel Corporation!
In this episode, I want to begin by describing what oneAPI is.
oneAPI is a programming model designed to take advantage
of multiple accelerator devices.
It is an industry initiative developed by the Khronos Group,
and the underpinnings are all built on SYCL.
SYCL is a royalty free
cross-platform abstraction layer that enables code for heterogeneous
processors to be written using standard ISO C++ with the host
and kernel code for an application contained in the same source file.
For future reference, we have lots of training around Sycl and oneAPI.
You'll be able to find links to learn more about that in the description.
SYCL allows for parallelism to make these accelerators
work great for you and it's primarily written in C++,
although there are Python bindings for many of these libraries as well.
The Intel AI Analytics Toolkit is powered
by oneAPI and provides the bindings for a compendium of libraries
such as the Intel extensions for PyTorch, the Intel extensions for TensorFlow
and the Intel Neural Compressor on the deep learning side.
The Intel AI Analytics Toolkit consists of oneDNN Library,
which is the oneDeep Neural Network Library,
the oneDAL Library, which is the Data Analytics Library, oneMKL,
which is the Math Kernel Library, and also for OpenVINO.
On the machine learning side it encompasses
Intel optimized XGBoost for classification or regression
and the intel extension for Scikit-learn for traditional machine learning.
There are other things that we accelerate with the AI Analytics Toolkit as well.
Many of these things are already accelerated in the stock
versions of tools such as NumPy, PANDAS, and SciPy.
The Intel extension for Scikit-learn are built on top of oneDAL
and it provides an easy way to get a drop in replacement for your standard machine
learning algorithms by using two lines of code to get great performance.
You can target both Intel, CPUs and GPUs with many of these algorithms.
We use Intel extensions for Scikit-learn accelerations in our bone hunt.
We use K-means or DBSCAN to perform clustering,
and I explain in a previous episode why context matters for dinosaur bones
and how clustering is an important function.
We also use Intel extensions for Scikit-learn for classification
on our tabular data, specifically support vector classifier or random forest,
and we can use them to perform classification for our labels.
Intel updates the AI Analytics Toolkit frequently
with new optimizations to make things better and faster.
The cadence that Intel provides these updates is typically quicker
than the framework developers or other library
developers in the open source community adopt into their mainline.
oneDNN is intended for use by framework developers.
What are framework developers?
A Framework developer develops software
such as TensorFlow, PyTorch or Caffe, for example.
oneDNN is a deep neural network focused on deep learning.
So those technologies that rely on oneDNN, including the open source
off the shelf stock versions of PyTorch and TensorFlow
are currently using oneDNN under the hood and they are powered by oneAPI.
oneDNN is the key library accelerating OpenVINO as well.
The good news is that many of these optimizations are already implemented
in the stock versions of PyTorch, TensorFlow, NumPy, SciPy, PANDAS, etc.
and all you need to do is to update your Pytorch, TensorFlow or NumPy libraries.
But if you want the latest and greatest speed ups,
they may not be there yet in those stock tools.
Then you could use the AI Analytics Toolkit.
One of the things that I do after I've done the labeling
and the feature engineering is apply the labels to aerial photos.
I use Resnet written in PyTorch to create a model based on fine tuning.
PyTorch is already accelerated with oneAPI under the hood in the stock version,
but we also get some extra benefits using the Intel Extensions for PyTorch
to accelerate our training
once we have a Resnet PyTorch model,
we can train it relatively quickly using the fine tuning approach.
We optimize it using OpenVINO for scoring an image or inferencing.
What do I mean by optimized with OpenVINO?
It optimizes and prunes, PyTorch TensorFlow and other models
to target multiple accelerators in an easy command line or Python programing way.
It can convert models from disparate frameworks such as PyTorch, TensorFlow
or ONNX into an intermediate representation.
This intermediate representation is fast and can enable your DevOps
to be more efficient and able to service many user requests.
For performance and deployment purposes OpenVINO is a great tool for accelerating
and making that inference more efficient, taking less space,
converting it down to FP16 or maybe even INT8 for quantization.
OpenVINO looks for
ways of streamlining the underlying graph that the deep neural network uses.
It can prune out nodes that don't have much effect.
It does a lot of fine tuning to make your final model run incredibly fast
on whatever architecture, CPU, GPU, VPU etc.
And it does that with just the command line.
This wraps up our overview of oneAPI as applied to our dino adventure.
You can find links to resources, tools and downloads as well as where
you can learn more about everything in this series in the description.
Remember to like
and share this video and subscribe to the Intel Software YouTube channel.
In our next episode, we will take a deeper look at the Intel Dev Cloud.
We'll see you then as we continue our dinosaur bone hunting adventure.
Let the
adventure begin!