Skip to content

Commit d28843d

Browse files
committed
Address comments
1 parent 32fe71b commit d28843d

4 files changed

Lines changed: 191 additions & 9 deletions

File tree

08-openvino/08-openvino.tex

Lines changed: 184 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@
77
\usepackage{graphicx} % For including images
88
\usepackage{amsmath} % For math symbols and formulas
99
\usepackage{hyperref} % For hyperlinks
10+
\usepackage{listings} % For code listings
11+
12+
\lstset{
13+
basicstyle=\ttfamily\footnotesize,
14+
breaklines=true,
15+
breakatwhitespace=false,
16+
columns=fullflexible,
17+
keepspaces=true
18+
}
1019

1120
% Small helpers for simple boxes in diagrams
1221
\newcommand{\ovbox}[2]{\colorbox{#1}{\strut\parbox[c][1.2em]{0.6\linewidth}{\centering #2}}}
@@ -61,7 +70,7 @@ \section{Overview}
6170
\begin{column}{0.7\textwidth}
6271
OpenVINO (Open Visual Inference and Neural Network Optimization)
6372
is a toolkit developed by Intel for optimizing and deploying deep learning models
64-
for inference on Intel hardware. It provides a unified API and a set of tools to streamline
73+
for inference on Intel and other vendors hardware. It provides a unified API and a set of tools to streamline
6574
the process of model optimization, conversion, and deployment across various Intel architectures.
6675
\end{column}
6776
\begin{column}{0.25\textwidth}
@@ -73,10 +82,10 @@ \section{Overview}
7382

7483
\begin{frame}{OpenVINO at a Glance}
7584
\begin{itemize}
76-
\item \textbf{Purpose:} Optimize and deploy AI inference across Intel CPUs, GPUs, NPUs, and other accelerators
77-
\item \textbf{Core components:} Model Optimizer, Runtime (Inference Engine), Post-Training Optimization Tool, Benchmark tools, Notebooks
78-
\item \textbf{Model formats (Frontends):} IR (\texttt{.xml/.bin}), ONNX (\texttt{.onnx}), TensorFlow (SavedModel/MetaGraph/frozen \texttt{.pb/.pbtxt}), TensorFlow Lite (\texttt{.tflite}), PaddlePaddle (\texttt{.pdmodel}), PyTorch (TorchScript/FX)
79-
\item \textbf{Targets:} CPU, iGPU, dGPU (e.g., Intel Arc), NPU, and more via plugins
85+
\item \textbf{Purpose:} Optimize and deploy AI inference across CPUs (x86, ARM, RISC-V), GPUs, NPUs, and other accelerators
86+
\item \textbf{Core components:} Runtime (Inference Engine), Post-Training Optimization Tool, Benchmark tools, Notebooks
87+
\item \textbf{Model formats (Frontends):} IR (\texttt{.xml/.bin}), ONNX (\texttt{.onnx}), TensorFlow (SavedModel/MetaGraph/frozen \texttt{.pb/.pbtxt}), TensorFlow Lite (\texttt{.tflite}), PaddlePaddle (\texttt{.pdmodel}), PyTorch (TorchScript/FX \texttt{.pt/.pth})
88+
\item \textbf{Targets:} CPU, GPU (e.g., Intel Arc), NPU, and more via plugins
8089
\item \textbf{Key benefits:} Performance, portability, unified API, quantization (INT8), easy deployment
8190
\end{itemize}
8291
\footnotesize Reference: \href{https://docs.openvino.ai/}{docs.openvino.ai}
@@ -96,7 +105,7 @@ \section{Overview}
96105

97106
\begin{frame}{Device Plugins Architecture}
98107
\centering
99-
\ovbox{gray!15}{\textbf{Application} (C++/Python)}\\[0.6em]
108+
\ovbox{gray!15}{\textbf{Application} (C/C++, Python, Java, JavaScript)}\\[0.6em]
100109
$\Downarrow$\\[0.2em]
101110
\ovbox{gray!15}{\textbf{OpenVINO Runtime} (\texttt{ov::Core})}\\[0.6em]
102111
$\Downarrow$\\[0.2em]
@@ -119,7 +128,7 @@ \section{Overview}
119128
\item \textbf{NPU}: Intel NPU (e.g., Core Ultra) for efficient, low-power inference on common vision/LLM ops; ideal for always-on and battery-sensitive workloads.
120129
\item \textbf{TEMPLATE plugin}: Reference backend for building custom device plugins; demonstrates the plugin API (compiled model, infer request, op support, memory) and is useful for prototyping.
121130
\end{itemize}
122-
\footnotesize See: \href{https://docs.openvino.ai/2025/documentation/compatibility-and-support/supported-devices.html}{https://docs.openvino.ai/2025/documentation/compatibility-and-support/supported-devices.html} \;\;|\;\; \href{https://docs.openvino.ai/2024/openvino_docs_OV_UG_supported_plugins_Supported_Devices.html}{Supported devices}
131+
\footnotesize See: \href{https://docs.openvino.ai/2025/documentation/compatibility-and-support/supported-devices.html}{https://docs.openvino.ai/2025/documentation/compatibility-and-support/supported-devices.html} \;\;|\;\; \href{https://docs.openvino.ai/2025/openvino_docs_OV_UG_supported_plugins_Supported_Devices.html}{Supported devices}
123132
\end{frame}
124133

125134
\begin{frame}{Inference Modes}
@@ -128,7 +137,173 @@ \section{Overview}
128137
\item \textbf{MULTI plugin}: Executes across multiple devices in parallel to maximize throughput, e.g., \texttt{MULTI:GPU,CPU}.
129138
\item \textbf{HETERO plugin}: Splits a single graph by layer/op support across devices, e.g., heavy ops on GPU, fallbacks on CPU\@.
130139
\end{itemize}
131-
\footnotesize See: \href{https://docs.openvino.ai/2025/openvino-workflow/running-inference/inference-devices-and-modes.html}{https://docs.openvino.ai/2025/openvino-workflow/running-inference/inference-devices-and-modes.html} \;\;|\;\; \href{https://docs.openvino.ai/2024/openvino_docs_OV_UG_supported_plugins_Supported_Devices.html}{Inference Devices and Modes}
140+
\footnotesize See: \href{https://docs.openvino.ai/2025/openvino-workflow/running-inference/inference-devices-and-modes.html}{https://docs.openvino.ai/2025/openvino-workflow/running-inference/inference-devices-and-modes.html} \;\;|\;\; \href{https://docs.openvino.ai/2025/openvino_docs_OV_UG_supported_plugins_Supported_Devices.html}{Inference Devices and Modes}
141+
\end{frame}
142+
143+
\section{OpenVINO Network Intermediate Representation}
144+
\begin{frame}{What is OpenVINO IR?}
145+
\begin{itemize}
146+
\item \textbf{IR (Intermediate Representation)} is OpenVINO's graph format used by the runtime for efficient inference.
147+
\item A model is stored as two files: \texttt{model.xml} (network topology, layers, attributes) and \texttt{model.bin} (weights).
148+
\item IR is framework-agnostic: models from PyTorch, TensorFlow, ONNX, and others are converted into a unified format.
149+
\item The same IR can be executed on different devices (CPU, GPU, NPU, etc.) via plugins without changing the model itself.
150+
\end{itemize}
151+
\end{frame}
152+
153+
\begin{frame}{IR Structure and Benefits}
154+
\begin{itemize}
155+
\item Graph of operations (nodes) and tensors (edges) with explicit input / output shapes and data types.
156+
\item Uses OpenVINO operation sets (\textit{opsets}) that define supported ops and attributes for compatibility across versions.
157+
\item Enables offline optimizations such as constant folding, layout changes, precision conversions (FP32 \textrightarrow{} FP16/INT8).
158+
\item Portable artifact for CI/CD: generate IR once, then deploy to multiple targets (cloud, edge, embedded) with the same files.
159+
\end{itemize}
160+
\end{frame}
161+
162+
\section{API Examples}
163+
\begin{frame}{Language Frontends}
164+
\begin{itemize}
165+
\item \textbf{C++}: primary, feature-complete API for production workloads and samples; direct access to \texttt{ov::Core} and low-level controls.
166+
\item \textbf{C}: lightweight C wrapper for integrating OpenVINO into C-only or legacy codebases.
167+
\item \textbf{Python}: high-level API (\texttt{openvino}, \texttt{openvino.runtime}) for rapid prototyping, notebooks, and integration with the Python ML ecosystem.
168+
\item \textbf{Java} (contrib, optional): bindings for JVM-based services and desktop apps, suitable for server-side inference pipelines.
169+
\item \textbf{JavaScript}: Web and Node.js frontends (via WebAssembly and native addons) for running inference in browsers or JS backends.
170+
\end{itemize}
171+
\footnotesize See: \href{https://docs.openvino.ai/2025/api/api_reference.html}{https://docs.openvino.ai/2025/api/api\_reference.html}
172+
\end{frame}
173+
174+
\begin{frame}[fragile]{Python API Example (YOLO-style Model)}
175+
\begin{itemize}
176+
\item \textbf{Goal:} Run object detection with a YOLO-like model using OpenVINO Runtime
177+
\item \textbf{Code sketch}
178+
\end{itemize}
179+
\begin{lstlisting}[language=Python]
180+
import openvino as ov
181+
182+
core = ov.Core()
183+
model = core.read_model("yolo.xml")
184+
compiled = core.compile_model(model, "AUTO")
185+
infer_request = compiled.create_infer_request()
186+
infer_request.set_tensor(input_name, image_tensor)
187+
infer_request.infer()
188+
output = infer_request.get_tensor(output_name)
189+
\end{lstlisting}
190+
\end{frame}
191+
192+
\begin{frame}[fragile]{C++ API Example (YOLO-style Model)}
193+
\begin{itemize}
194+
\item \textbf{Goal:} Same pipeline in C++ with \texttt{ov::Core}
195+
\item \textbf{Code sketch}
196+
\end{itemize}
197+
\begin{lstlisting}[language=C++]
198+
#include <openvino/openvino.hpp>
199+
200+
int main(int argc, char* argv[]) {
201+
...
202+
ov::Core core;
203+
auto model = core.read_model("yolo.xml");
204+
auto compiled = core.compile_model(model, "AUTO");
205+
auto infer_request = compiled.create_infer_request();
206+
infer_request.set_tensor(input_port, input_tensor);
207+
infer_request.infer();
208+
auto output = infer_request.get_tensor(output_port);
209+
...
210+
}
211+
\end{lstlisting}
212+
\end{frame}
213+
214+
\section{Tools and Benchmarks}
215+
\begin{frame}{Command-line Tools Overview}
216+
\begin{itemize}
217+
\item \textbf{benchmark\_app}: measures latency / throughput on target devices
218+
\item \textbf{OpenVINO Notebooks}: interactive tutorials for many models (YOLO, SSD, Segmentation, LLMs) \\
219+
\href{https://github.com/openvinotoolkit/openvino_notebooks}{https://github.com/openvinotoolkit/openvino\_notebooks}
220+
\end{itemize}
221+
\end{frame}
222+
223+
\begin{frame}{benchmark\_app Usage Examples}
224+
\begin{itemize}
225+
\item \textbf{Basic run on CPU}
226+
\begin{itemize}
227+
\item \texttt{benchmark\_app -m yolo.xml -d CPU}
228+
\end{itemize}
229+
\item \textbf{Run on GPU with async API}
230+
\begin{itemize}
231+
\item \texttt{benchmark\_app -m yolo.xml -d GPU -api async}
232+
\end{itemize}
233+
\item \textbf{Use AUTO plugin and prioritize throughput}
234+
\begin{itemize}
235+
\item \texttt{benchmark\_app -m yolo.xml -d AUTO -hint throughput}
236+
\end{itemize}
237+
\item \textbf{What to look at}
238+
\begin{itemize}
239+
\item Latency, FPS, device utilization, batch size, number of streams
240+
\end{itemize}
241+
\end{itemize}
242+
\footnotesize See: \href{https://docs.openvino.ai/nightly/get-started/learn-openvino/openvino-samples/benchmark-tool.html}{https://docs.openvino.ai/nightly/get-started/learn-openvino/openvino-samples/benchmark-tool.html}
243+
\end{frame}
244+
245+
\section{GenAI with OpenVINO}
246+
\begin{frame}{OpenVINO GenAI}
247+
\begin{itemize}
248+
\item \textbf{Target use cases:} chatbots, code assistants, summarization, RAG pipelines, text-to-image / image editing with diffusion models
249+
\item \textbf{Model types:} LLMs (decoder-only, encoder-decoder), vision-language models, diffusion models; integration with Hugging Face and ONNX model zoo
250+
\item \textbf{Optimizations:} 8-bit / 4-bit quantization, weight compression, low-rank adapters (LoRA), CPU/GPU-specific graph optimizations for lower latency
251+
\item \textbf{Deployment:} Python/C++ APIs, OpenVINO GenAI APIs, notebooks and samples for serving models locally or in containers
252+
\item \textbf{Resources:} \href{https://github.com/openvinotoolkit/openvino.genai}{https://github.com/openvinotoolkit/openvino.genai}, \href{https://docs.openvino.ai/2025/openvino-workflow-generative/inference-with-genai.html}{https://docs.openvino.ai/2025/openvino-workflow-generative/inference-with-genai.html}
253+
\end{itemize}
254+
\end{frame}
255+
256+
\begin{frame}{GenAI Workflow Diagram}
257+
\centering
258+
\includegraphics[width=\textwidth]{openvino-genai-main-diagram.png}
259+
\footnotesize Source: \href{https://docs.openvino.ai/2025/_images/genai_main_diagram.svg}{https://docs.openvino.ai/2025/openvino-workflow-generative/inference-with-genai.html}
260+
\end{frame}
261+
262+
\section{Getting OpenVINO}
263+
\begin{frame}[fragile]{Installing OpenVINO (User)}
264+
\begin{itemize}
265+
\item Use prebuilt packages from Intel:
266+
\begin{itemize}
267+
\item Linux: \texttt{pip install openvino-dev} (Python API + tools)
268+
\item Windows: \texttt{pip install openvino-dev} or installer from \href{https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit/download.html}{Intel website}
269+
\end{itemize}
270+
\item (Optional) Create isolated environment:
271+
\begin{itemize}
272+
\item \texttt{python -m venv venv} \\
273+
\texttt{source venv/bin/activate} (Linux/macOS) \\
274+
\texttt{venv\textbackslash Scripts\textbackslash activate} (Windows)
275+
\end{itemize}
276+
\item Verify installation in Python:
277+
\begin{lstlisting}
278+
import openvino as ov
279+
print(ov.__version__)
280+
\end{lstlisting}
281+
\item Check available devices:
282+
\begin{lstlisting}
283+
core = ov.Core()
284+
print(core.get_available_devices())
285+
\end{lstlisting}
286+
\end{itemize}
287+
\end{frame}
288+
289+
\begin{frame}[fragile]{Building OpenVINO (Developer)}
290+
\begin{itemize}
291+
\item Clone sources:
292+
\begin{lstlisting}
293+
git clone https://github.com/openvinotoolkit/openvino.git
294+
cd openvino
295+
\end{lstlisting}
296+
\item Install build dependencies (compiler, CMake, Python, git)
297+
\item Configure build directory:
298+
\begin{lstlisting}
299+
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DENABLE_PYTHON=ON -DENABLE_TESTS=ON
300+
\end{lstlisting}
301+
Note: the full cmake flags reference can be found in the documentation
302+
\item Build and run tests:
303+
\begin{lstlisting}
304+
cmake --build build --parallel
305+
\end{lstlisting}
306+
\end{itemize}
132307
\end{frame}
133308

134309
\section{References}
@@ -138,6 +313,7 @@ \section{References}
138313
\item OpenVINO repository: \href{https://github.com/openvinotoolkit/openvino}{https://github.com/openvinotoolkit/openvino}
139314
\item OpenVINO Contrib: \href{https://github.com/openvinotoolkit/openvino_contrib}{https://github.com/openvinotoolkit/openvino\_contrib}
140315
\item OpenVINO Notebooks: \href{https://github.com/openvinotoolkit/openvino_notebooks}{https://github.com/openvinotoolkit/openvino\_notebooks}
316+
\item OpenVINO GenAI: \href{https://github.com/openvinotoolkit/openvino.genai}{https://github.com/openvinotoolkit/openvino.genai}
141317
\end{itemize}
142318
\end{frame}
143319

08-openvino/08-openvino.toc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
\beamer@sectionintoc {1}{Overview}{3}{0}{1}
2-
\beamer@sectionintoc {2}{References}{11}{0}{2}
2+
\beamer@sectionintoc {2}{OpenVINO Network Intermediate Representation}{11}{0}{2}
3+
\beamer@sectionintoc {3}{API Examples}{14}{0}{3}
4+
\beamer@sectionintoc {4}{Tools and Benchmarks}{18}{0}{4}
5+
\beamer@sectionintoc {5}{GenAI with OpenVINO}{21}{0}{5}
6+
\beamer@sectionintoc {6}{Getting OpenVINO}{24}{0}{6}
7+
\beamer@sectionintoc {7}{References}{27}{0}{7}
53.8 KB
Loading

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ <h1>ITLab slides</h1>
5454
<li><a href="https://embedded-dev-research.github.io/itlab_slides/slides/05-embedded-arm.pdf" target="_blank">05: Embedded architectures (ARM)</a></li>
5555
<li><a href="https://embedded-dev-research.github.io/itlab_slides/slides/06-dl-tech-intro.pdf" target="_blank">06: Deep Learning Tech Introduction</a></li>
5656
<li><a href="https://embedded-dev-research.github.io/itlab_slides/slides/07-acl.pdf" target="_blank">07: ARM Compute Library introduction</a></li>
57+
<li><a href="https://embedded-dev-research.github.io/itlab_slides/slides/08-openvino.pdf" target="_blank">08: OpenVINO introduction</a></li>
5758
</ul>
5859
</body>
5960
</html>

0 commit comments

Comments
 (0)