YOLOv8n 在 Core Ultra 235H:NPU/核显/混合三档吞吐天梯 32→147→240 张/s

一颗 CPU 里其实藏了三块'算力':P/E 核的 CPU、Arc 核显、还有常被当摆设的 NPU。我在一台 Core Ultra 5 235H(14 核 CPU + Arc 140T 共享 12GB + Intel AI Boost NPU)上,用 YOLOv8n 转 OpenVINO FP16 做人形检测,把这三条路从单进程一路榨到双硬件并行混跑,测出了完整的吞吐天梯——最终数字你们可能意想不到:混合池能达到单核 NPU 的 7.5 倍

测试环境:Core Ultra 5 235H / Arc 140T 核显(12GB 共享)/ Intel AI Boost NPU / OpenVINO 2026.5.0.dev,设备 CPU/GPU/NPU / 模型 yolov8n_openvino_model(FP16,导出自 yolov8n.pt)/ conf=0.25,classes=[0](person)/ 逐帧 predict,n%fps==1 抽一帧。2026-09-12 实测。

三条路的单极点

先看各硬件单打独斗能到多少张/秒(每张=一次 YOLOv8n 推理)。注意这里的数字有一个关键前提:推理输入得先用 ffmpeg 抽帧,而不是 cv2 全量解码——之前测出来的'GPU 很慢'全是 cv2 解码路径的误导,后面避坑专章里有详细解释。

配置吞吐(张/s)备注
NPU 1 进程32单核 NPU
NPU 3 进程72NPU 天花板
GPU 1 进程65.6核显单进程
GPU 2 进程99
GPU 3 进程131.5
GPU 4 进程147.8核显峰值
GPU 6 进程147已饱和

信息量很大:单进程看偏弱,多进程才能喂饱硬件。核显 4 进程 147.8 是单进程 65.6 的 2.25 倍,而 6 进程掉头回落 → 核显算力就在 150 张/s 附近。NPU 三进程冲到 72 就是天花板了,再多进程也不涨。

各配置吞吐(张/s)
NPU×132
NPU×372
GPU×165.6
GPU×4147.8
混合 GPU×4+NPU×3240

混合双打:GPU+NPU 一起上

一个显而易见但容易被忽略的事实:NPU 和核显是两块独立的硬件。既然互不冲突,那就让两个池子各跑各的进程,任务文件按比例分给两边。结果没有任何调度冲突,纯叠加:

配置吞吐(张/s)说明
混合 GPU2+NPU2188.6较均衡
混合 GPU3+NPU3238双硬件叠加无冲突
混合 GPU4+NPU3(生产)~240最终推荐配置

GPU4+NPU3 稳定在 240 张/s,正好是单核 NPU(32)的 7.5 倍。做监控人形检测这类海量抽帧任务,这一下就把'检测'环节从瓶颈变成了几乎免费的步骤。

gpu_ratio:任务怎么分才不空等

都分一半(1:1)其实不是最优的——两块硬件能吃得下的任务量不一样。按能力比例分,两边才能同时收工。我扫了一个比例曲线(0606 副本,60 文件 / 3593s):

gpu_ratio检测耗时x 实时
0.518.3s197x
0.5517.2s209x
0.5817.0s212x
0.616.7s216x
0.6217.0s211x
0.719.0s189x

最优点 0.6:核显更猛(147 vs 72),给它 60% 的任务,两台几乎同时结束;给少了核显空等 NPU,给多了核显拖尾。0.5→0.6 省了不到 2 秒,但 0.7 又退回 19s——比例做对了就是白捡的吞吐。

采样:不用每帧都判

人形检测最终是为了剪视频,1 秒抽 1 帧就够判了。既然容忍剪辑误差,就能把推理量按 3 秒、5 秒稀释,检测耗时直线下降:

采样间隔pad检测耗时x 实时
1s016.5~23.2s155~218x
3s38.0~8.4s429~450x
5s34.8~5.6s640~751x

生产参数定为 interval=3, pad=3:推理量减 2/3,耗时翻近 3 倍,pad 前后各扩 3 秒反而把活动覆盖提了一档(活动占比 52%→56%)。推理量不再是问题之后,检测阶段已经快过了抽帧本身

总结

  • 单进程永远低估硬件:iGPU 要 4 进程才到 147.8 张/s,NPU 天花板在 3 进程 72
  • NPU+核显独立可叠加:GPU4+NPU3 稳定 240 张/s = 单核 NPU 的 7.5 倍,无调度冲突
  • 比例按能力分:gpu_ratio=0.6 最优,0.5 和 0.7 都更慢
  • 采样稀释香:3s 一帧 + pad 后检测 8s 干完 1 小时视频(~440x 实时)
提醒:以上吞吐是 YOLOv8n(FP16)在特定驱动/OpenVINO 版本下的实测值;换模型大小、分辨率(如 640x360 管道)或核显共享显存设置,绝对数字会变,但'多进程喂饱 + 双池比例分配'的规律不变。完整落地流水线见监控只留有人画面,踩坑记录见NPU 推理避坑

One CPU actually hides three 'compute engines': P/E-core CPU, the Arc iGPU, and an NPU everyone treats as decoration. On a Core Ultra 5 235H (14-core CPU + Arc 140T sharing 12GB + Intel AI Boost NPU) I ran YOLOv8n→OpenVINO FP16 person detection, pushed all three lanes from single-process to dual-hardware hybrid pool, and built the full throughput ladder — the headline might surprise you: the hybrid pool hits 7.5× a single NPU core.

Env: Core Ultra 5 235H / Arc 140T iGPU (12GB shared) / Intel AI Boost NPU / OpenVINO 2026.5.0.dev (devices: CPU/GPU/NPU) / yolov8n_openvino_model (FP16, exported from yolov8n.pt) / conf=0.25, classes=[0] person / per-frame predict, one sampled frame per second. Tested 2026-09-12.

The single-device ceiling

First, the single-device frames-per-second numbers. One vital premise: frames were pulled with ffmpeg, not cv2 full decode — an earlier 'GPU is slow' conclusion was entirely cv2-decode path noise; that's dissected in the pitfalls article.

ConfigFPSNotes
NPU 1 进程32single NPU core
NPU 3 进程72NPU ceiling
GPU 1 进程65.6iGPU, 1 process
GPU 2 进程99
GPU 3 进程131.5
GPU 4 进程147.8iGPU peak
GPU 6 进程147saturated

Lots to unpack: single-process numbers underrate these parts — you must multi-process to feed them. The iGPU at 4 processes (147.8) is 2.25× the single-process 65.6, and 6 processes dips back → the iGPU saturates around 150 FPS. The NPU peaks at 72 with three processes, no further gains beyond.

Throughput per config (FPS)
NPU×132
NPU×372
GPU×165.6
GPU×4147.8
混合 GPU×4+NPU×3240

Doubles: GPU + NPU in parallel

Obvious but often missed: the NPU and iGPU are two independent chips. If they don't fight, give each pool its own processes and split the file queue by ratio. Zero scheduling contention, pure stacking:

ConfigFPSNotes
混合 GPU2+NPU2188.6balanced
混合 GPU3+NPU3238no contention
混合 GPU4+NPU3(生产)~240recommended config

GPU×4 + NPU×3 holds ~240 FPS, exactly 7.5× a single NPU core. For massive frame-sampling jobs like surveillance person detection, this turns 'detection' from the bottleneck into a nearly-free step.

gpu_ratio: how to split the queue without idle waits

A 1:1 split is actually suboptimal — the two chips have different appetites. Split by capability and both sides finish together. Here's a ratio sweep (0606 copy, 60 files / 3593s):

gpu_ratiodetect time× realtime
0.518.3s197x
0.5517.2s209x
0.5817.0s212x
0.616.7s216x
0.6217.0s211x
0.719.0s189x

The sweet spot is 0.6: the iGPU is stronger (147 vs 72), so giving it 60% of the queue makes both chips land at once; too little starves the iGPU, too much and it trails. 0.5→0.6 saves under 2s, but 0.7 slides back to 19s — getting the ratio right is free throughput.

Sampling: you don't need every frame

The goal of person detection is video cutting, so one frame per second is already plenty. If a few seconds of cutting error is acceptable, you can dilute the workload 3× or 5× and detection time collapses:

intervalpaddetect time× realtime
1s016.5~23.2s155~218x
3s38.0~8.4s429~450x
5s34.8~5.6s640~751x

Production lands on interval=3, pad=3: 1/3 the inferences, ~3× faster, and the 3s pad on both sides actually lifts activity coverage (52%→56%). Once inference stops being the bottleneck, detection outruns frame extraction itself.

TL;DR

  • Single-process always underrates the part: the iGPU needs 4 processes for 147.8 FPS, the NPU tops at 72 with 3
  • NPU + iGPU stack independently: GPU×4+NPU×3 holds 240 FPS = 7.5× a single NPU, no contention
  • Split by capability: gpu_ratio=0.6 is optimal; 0.5 and 0.7 are both slower
  • Sampling dilution pays: every-3s + pad lets detection finish an hour of video in 8s (~440× realtime)
Heads-up:These are YOLOv8n (FP16) numbers on this driver/OpenVINO build; model size, resolution (e.g. 640x360 pipeline) or iGPU shared-memory settings will shift the absolute values, but 'multi-process to feed + ratio-split dual pool' holds. Full pipeline: surveillance person-cut; pitfalls: NPU inference pitfalls.
返回文章列表