openvinotoolkit / openvino

OpenVINO™ is an open-source toolkit for optimizing and deploying AI inference
https://docs.openvino.ai
Apache License 2.0
7.33k stars 2.28k forks source link

[Performance]: Why there is almost no performance improvement when using zero-copy technology and not using it on openvino + intel xboard #22370

Open wxxz975 opened 10 months ago

wxxz975 commented 10 months ago

OpenVINO Version

No response

Operating System

Ubuntu 22.04 (LTS)

Device used for inference

iGPU

OpenVINO installation

Build from source

Programming Language

C++

Hardware Architecture

x86 (64 bits)

Model used

https://github.com/wxxz975/ZeroCopyWithOpenVINO/blob/main/models/resnet50v2.onnx

Model quantization

No

Target Platform

lscpu: Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 39 bits physical, 48 bits virtual Byte Order: Little Endian CPU(s): 4 On-line CPU(s) list: 0-3 Vendor ID: GenuineIntel Model name: Intel(R) Celeron(R) N5105 @ 2.00GHz CPU family: 6 Model: 156 Thread(s) per core: 1 Core(s) per socket: 4 Socket(s): 1 Stepping: 0 CPU max MHz: 2900.0000 CPU min MHz: 800.0000 BogoMIPS: 3993.60 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fx sr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good n opl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl v mx est tm2 ssse3 sdbg cx16 xtpr pdcm sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes x save rdrand lahf_lm 3dnowprefetch cpuid_fault epb cat_l2 cdp_l2 ssbd ibrs ibpb stibp ibrs_enhan ced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust smep erms rdt_a rdseed sma p clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves split_lock_detect dtherm ida a rat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req umip waitpkg gfni rdpid movdiri m ovdir64b md_clear flush_l1d arch_capabilities Virtualization features: Virtualization: VT-x Caches (sum of all): L1d: 128 KiB (4 instances) L1i: 128 KiB (4 instances) L2: 1.5 MiB (1 instance) L3: 4 MiB (1 instance) NUMA: NUMA node(s): 1 NUMA node0 CPU(s): 0-3 Vulnerabilities: Gather data sampling: Not affected Itlb multihit: Not affected L1tf: Not affected Mds: Not affected Meltdown: Not affected Mmio stale data: Mitigation; Clear CPU buffers; SMT disabled Retbleed: Not affected Spec rstack overflow: Not affected Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Spectre v2: Mitigation; Enhanced IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS Not affected Srbds: Vulnerable: No microcode Tsx async abort: Not affected

lscpu -e CPU NODE SOCKET CORE L1d:L1i:L2:L3 ONLINE MAXMHZ MINMHZ MHZ 0 0 0 0 0:0:0:0 yes 2900.0000 800.0000 1987.862 1 0 0 1 2:2:0:0 yes 2900.0000 800.0000 2000.000 2 0 0 2 4:4:0:0 yes 2900.0000 800.0000 2000.000 3 0 0 3 6:6:0:0 yes 2900.0000 800.0000 2000.000

Performance issue description

The hardware device I use is Intel xboard. I'm trying to test inference on this resnet50v2. But I've found that there isn't much of a difference in performance with or without zero-copy. When adding zero-copy technology, it only increased 1fps,Why?

Step-by-step reproduction

I currently have a requirement that involves first decoding a video and then feeding each frame of the decoded data into OpenVINO for inference. During this process, the data transfer is implemented using zero-copy technology。I referred to this sample I wrote a demo of my own and found that there was almost no performance improvement. this is my code

Issue submission checklist

mlukasze commented 10 months ago

hey @wxxz975

if you are using zero-copy with GPU I need to inform you that your observations might be correct, yet good news is that we are working on this exact topic as we speak. Please stay tuned :)

fyi: @gkrivor && @geunhwan

avitial commented 9 months ago

Ref. 122319