feat(openvino): добавлена поддержка Intel GPU через OpenVINO

- Зачем:
  - OpenVINO backend хардкодил "CPU", хотя Intel Arc GPU доступен и даёт ~2x ускорение.
- Что:
  - новые device modes: --device openvino-gpu, openvino-cpu; openvino — авто-детект GPU/CPU.
  - detect_device() проверяет Intel GPU через OpenVINO Core API (с fail-safe).
  - OpenVINOBackend передаёт "GPU"/"CPU" в WhisperPipeline вместо хардкода "CPU".
  - подсказка "Совет: --model large-v3" при наличии GPU и модели не large-v3.
  - .gitattributes для нормализации line endings (eol=lf).
  - 150 тестов, включая GPU detection, routing, fallback, CLI device info.
  - README, docs/gpu.md, docs/PRD.md обновлены для Intel GPU.
- Проверка:
  - uv run pytest (150 passed).
  - uv run transcribe --device openvino-gpu file.mp4 на Intel Arc 140T GPU.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Dmitry Dementiev
2026-03-22 15:45:27 +03:00
co-authored by Claude Opus 4.6
parent dc59d2a620
commit 617181f2dc
17 changed files with 522 additions and 66 deletions
+2 -2
View File
@@ -47,8 +47,8 @@ transcribe <путь_к_файлу> [опции]
По умолчанию: auto (автодетект)
--output, -o Путь к выходному файлу
По умолчанию: <input_stem>-transcript.md
--device, -d Устройство (auto|cpu|cuda)
По умолчанию: auto (CUDA если доступен, иначе CPU)
--device, -d Устройство (auto|cpu|cuda|openvino|openvino-gpu|openvino-cpu)
По умолчанию: auto (CUDA → OpenVINO GPU → OpenVINO CPU → CPU)
--compute-type Тип вычислений (float16|int8|int8_float16|float32)
По умолчанию: int8 (универсален для GPU 4-8 GB и CPU)
--verbose, -v Подробный вывод (прогресс сегментов)
+6 -3
View File
@@ -2,9 +2,11 @@
## Режимы `--device`
- `auto` (по умолчанию) — CUDA → OpenVINO → CPU (первый доступный)
- `auto` (по умолчанию) — CUDA → OpenVINO GPU → OpenVINO CPU → CPU (первый доступный)
- `cuda` — строго NVIDIA GPU, ошибка если недоступен
- `openvino`OpenVINO на CPU (ускорение 2-4x на x86)
- `openvino`авто-выбор OpenVINO GPU или CPU
- `openvino-gpu` — строго Intel GPU через OpenVINO
- `openvino-cpu` — строго CPU через OpenVINO (ускорение 2-4x на x86)
- `cpu` — строго CPU (faster-whisper/CTranslate2)
## Какой бэкенд на каком оборудовании
@@ -12,7 +14,8 @@
| Оборудование | Рекомендуемый `--device` | Бэкенд | Ожидаемая скорость |
|---|---|---|---|
| NVIDIA GPU (6+ GB VRAM) | `auto` / `cuda` | faster-whisper (CTranslate2) | 7-19x реалтайм |
| Intel/AMD x86 CPU | `auto` / `openvino` | OpenVINO GenAI | 3-6x реалтайм* |
| Intel Arc iGPU / dGPU | `auto` / `openvino-gpu` | OpenVINO GenAI (GPU) | TBD |
| Intel/AMD x86 CPU | `auto` / `openvino-cpu` | OpenVINO GenAI (CPU) | 3-6x реалтайм* |
| Любой CPU (fallback) | `cpu` | faster-whisper (CTranslate2) | ~1.5x реалтайм |
| Apple Silicon (macOS) | `cpu` | faster-whisper (CTranslate2) | ~2x реалтайм |