Page 1
Industrial Machine Vision Application Optimization with Intel® one API and Intel® Distribution of Open VINO™ Toolkit White Paper November 2021 Document Number: 647703–0.5
Page 2
No license (express or implied, by estoppel or otherwise) to any intellectual property rights is granted by this document. All information provided here is subject to change without notice. Contact yo...
Page 3
Contents 1.0 Introduction .................................................................................................................................. 5 1.1 Terminology ............................
Page 4
Revision History Date Revision Description November 2021 0.5 • Initial release Industrial Machine Vision Application Optimization with Intel® one API and Intel® Distribution of Open VINO™ Toolkit Whit...
Page 5
Introduction 1.0 Introduction 1.1 Terminology Table 1. Terminology Terminology Description 11th Gen Intel® 11th Gen Intel® Core™ processors (codenamed 'Tiger Lake') Core™ were officially launched on 2...
Page 6
Introduction 1.2 Industrial Machine Vision Algorithm Usage Industrial machine vision solutions have several compelling applications that support automatic control to increase efficiency and reduce cos...
Page 7
Introduction Logistic Asset Management Deep Learning Multi Streams w/ High Speed Welding Safety and Security Deep Learning Multi Streams w/ High Speed This white paper proposes several general optimiz...
Page 8
Introduction algorithms. Nevertheless, deep learning-based CV algorithms require more compute resources and longer inference processing time. The following is a non-exhaust list of methods used to imp...
Page 9
Intel® one API and Open VINO™ Toolkit 2.0 Intel® one API and Open VINO™ Toolkit 2.1 Intel® one API Roughly 40% of developers target heterogeneous systems that use more than one type of processor, proc...
Page 10
Intel® one API and Open VINO™ Toolkit 2.2 Open VINO™ Toolkit The Open VINO™ toolkit is a comprehensive toolkit used to quickly develop applications and solutions aimed at solving a variety of tasks, i...
Page 11
Intel® one API and Open VINO™ Toolkit Integrated Graphics, Intel® Neural Compute Stick 2, and Intel® Vision Accelerator Design with the Intel® Movidius™ Myriad™ VPU. Industrial Machine Vision Applicat...
Page 12
CV Workload Optimization and Tuning 3.0 CV Workload Optimization and Tuning The following section provides an overview of optimization steps and includes several examples illustrating solutions to som...
Page 13
CV Workload Optimization and Tuning Windows Linux & Comment mac OS /Ofast -Ofast “This option improves the speed of your application. It sets compiler options -O3, -no-prec-div, and -fp-model fast...
Page 14
CV Workload Optimization and Tuning Scalar processing means that for every CPU clock cycle, the processor only processes one scalar calculation. Scalar data is usually in 32-bit or 64-bit. Vector proc...
Page 15
CV Workload Optimization and Tuning __m512i w_512_in Feature; __m512i w_512_db Feature, w_512_mul, w_512_sum; int out Put; __m512i * p In Feature Buffer = (__m512i *) input A; __m512i * p Feature Data...
Page 16
CV Workload Optimization and Tuning Optimized for Performance These software components are highly optimized with the Intel® SSE2, Intel® AVX2, and Intel® AVX-512 instruction sets. Plugin and Go These...
Page 17
CV Workload Optimization and Tuning 3.1.2.2 Intel® one API Math Kernel Library The Intel-Optimized Math Library for Numerical Computing is the fastest and most widely used math library for Intel-based...
Page 18
CV Workload Optimization and Tuning static int16_t B[65536];// static matrix declared before calculation for parameters for (int j = 0; j < 256; j++) { for (int i = j; i < 256; i++) { B[j * 256 ...
Page 19
CV Workload Optimization and Tuning To change the code to an Open MP version, we can set the value of thread Number to 3. The code below only takes around 443 ms to execute in experiment, much faster ...
Page 20
CV Workload Optimization and Tuning void* thread Func(void* p) Thread Status* stat = (Thread Status*)p; long long result = 0; long long start = stat->n Floor; long long end = stat->n Top; for (l...
Page 21
CV Workload Optimization and Tuning If we want to bind a thread to specific CPU core, we can use the following code: void* thread Func(void* p) Thread Status* stat = (Thread Status*)p; long core Idx =...
Page 22
CV Workload Optimization and Tuning a. Direct programming Use DPC++ for development on CPU, GPU, and other hardware. This method is more flexible, but requires more skill and knowledge. b. Library (AP...
Page 23
CV Workload Optimization and Tuning sycl::queue cpu_queue{sycl::cpu_selector{}}; auto D = sycl::malloc_shared<double>(m * k, cpu_queue); auto E = sycl::malloc_shared<double>(k * n, cpu_que...
Page 24
CV Workload Optimization and Tuning auto trans A = oneapi::mkl::transpose::nontrans; auto trans B = oneapi::mkl::transpose::nontrans; int m = 600; int k = 1200; int n = 2400; int lda = k; int ldb = n;...
Page 25
CV Workload Optimization and Tuning learning model itself, and uses methods such as pruning, distillation, quantification to reduce the size and amount of calculation, thereby accelerating the deploym...
Page 26
CV Workload Optimization and Tuning Step 2: Fine-Tuning: Only necessary when the accuracy of the quantized model does not satisfy the accuracy criteria. Open VINO™ toolkit includes the Neural Network ...
Page 27
CV Workload Optimization and Tuning /* Optimization hyperparameters */ "compression": { "target_device": "CPU", //Target device, the //specificity of which will //be take...
Page 28
CV Workload Optimization and Tuning Open VINO™ toolkit also includes the Accuracy Checker tool. The tool’s modular structure allows for the reproduction of a validation pipeline and collection of aggr...
Page 29
CV Workload Optimization and Tuning Open VINO™ toolkit also provide the useful Benchmark App tool for obtaining performance data. The program includes various parameters such as "-nstreams",...
Page 30
CV Workload Optimization and Tuning requests at the same time, the GPU can only execute one, and the CPU has a higher priority, the Multi-Device plugin will arrange the CPU to execute the first two in...
Page 31
Conclusion 4.0 Conclusion The results of our analysis indicate that Open VINO™ toolkit and Intel® one API provide a useful solution for the optimization of both traditional CV and deep learning applic...
Page 32
References 5.0 References [1] Intel Corporation, “one API Overview,” 2021. https://www.intel.com/content/www/us/en/developer/tools/oneapi/overview.htm l#gs.djvsaf (accessed Jan. 07, 2021). [2] S. Wu, ...