Skip to content

Commit 082a625

Browse files
docs: record upstream OpenVINO GenAI PR #4807 for GAP-04
1 parent 317d55f commit 082a625

2 files changed

Lines changed: 33 additions & 4 deletions

File tree

‎docs/OPENVINO_UPSTREAM_GAPS_AND_PR_ROADMAP.md‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ This roadmap consolidates all 14 gaps into a single engineering authority docume
2828
| **GAP-01** | `openvino::op` | **Critical** | Missing native `RMSNorm` in standard opsets | `src/core/include/openvino/op/` | PR-01: Native `RMSNorm` op with fused GPU/NPU kernels |
2929
| **GAP-02** | `xml_util` | **High** | Raw `i < m_inputs.size()` index out-of-range crash | `src/core/xml_util/src/xml_deserialize_util.cpp` | **[RESOLVED & PR SUBMITTED]** [PR #39429](https://github.com/openvinotoolkit/openvino/pull/39429): Actionable disconnected port diagnostics |
3030
| **GAP-03** | `openvino::op::Const` | **Medium** | Cryptic shape/size mismatch without layer context | `src/core/src/op/constant.cpp`, `src/core/xml_util/` | **[RESOLVED & PR SUBMITTED]** [PR #39448](https://github.com/openvinotoolkit/openvino/pull/39448): Actionable Constant shape & size diagnostics |
31-
| **GAP-04** | `openvino.genai` | **High** | Aborts with `invalid vector subscript` on invalid IR | `openvino_genai/src/llm_pipeline.cpp` | PR-04: DAG topological pre-flight validation |
31+
| **GAP-04** | `openvino.genai` | **High** | Aborts with `invalid vector subscript` on invalid IR | `openvino_genai/src/llm_pipeline.cpp` | **[RESOLVED & PR SUBMITTED]** [PR #4807](https://github.com/openvinotoolkit/openvino.genai/pull/4807): DAG topological pre-flight validation |
3232
| **GAP-05** | `openvino.genai` | **Critical** | Zero native GGUF container ingestion | `openvino_genai/src/` | PR-05: Zero-dependency C++ GGUF container reader |
3333
| **GAP-06** | `intel_gpu` plugin | **High** | Lack of native GGUF k-quant (`Q4_K_M`) matrix kernels | `src/plugins/intel_gpu/src/kernel_selector/` | PR-06: Dynamic k-quant to Xe INT4/INT8 repack kernels |
3434
| **GAP-07** | `openvino::op::MatMul` | **Medium** | Rigid mixed-precision requiring explicit Convert | `src/core/src/op/matmul.cpp` | PR-07: Auto-promotion and implicit FP16/INT4 fusion |
@@ -171,16 +171,17 @@ This roadmap consolidates all 14 gaps into a single engineering authority docume
171171
- Validated 100% pass on negative diagnostic tests (undersized FP32 buffer, safe unnamed fallbacks, sub-byte U4 bitwidth ceiling delta) and 0 regressions on full-scale production models (`qwen-2.5-1.5b` with 2,059 constants and `deepseek-r1-1.5b` with 1,973 constants).
172172
173173
### PR-04: DAG Topological Pre-flight Validation in OpenVINO GenAI
174-
- **Status**: **✅ RESOLVED & PR BRANCH READY**
174+
- **Status**: **✅ RESOLVED & UPSTREAM PR SUBMITTED**
175175
- **Target Repo**: `openvinotoolkit/openvino.genai`
176+
- **Upstream PR**: [openvinotoolkit/openvino.genai#4807](https://github.com/openvinotoolkit/openvino.genai/pull/4807)
176177
- **Fork Branch**: [`techdeveloper-org/openvino.genai:fix/llm-pipeline-dag-preflight-validation`](https://github.com/techdeveloper-org/openvino.genai/tree/fix/llm-pipeline-dag-preflight-validation)
177178
- **Tracking Issue**: [`techdeveloper-org/intel-arc-models-runner#63`](https://github.com/techdeveloper-org/intel-arc-models-runner/issues/63)
178-
- **Commit**: `8784531` (`feat(llm-pipeline): add DAG topological pre-flight validation (GAP-04)`)
179+
- **Commit**: `8784531` (`feat(llm-pipeline): add DAG topological pre-flight validation (GAP-04)`), `965ad4f` (`test(llm-pipeline): fix Variable initialization in preflight gtest suite`)
179180
- **Subsystem**: `src/cpp/src/utils.hpp`, `src/cpp/src/utils.cpp`, `src/cpp/src/llm/pipeline_stateful.cpp`, `src/cpp/src/llm/pipeline_static.cpp`, `tests/cpp/test_llm_pipeline_preflight.cpp`
180181
- **Scope & Implementation**:
181182
1. Implemented `ov::genai::utils::validate_llm_model_dag` with Gate 0 (Null guard), Gate A (Role-based parameter whitelist for PRIMARY_LLM and DRAFT/EAGLE3 models), Gate B (Fuzzy logit name heuristics), and Gate C (Dual-root backward BFS from Results and Sinks).
182183
2. Integrated defensive pre-flight hook in `StatefulLLMPipeline` and `StaticLLMPipeline` before device compilation, preventing uninformative `invalid vector subscript` aborts.
183-
3. Added comprehensive GTest suite `tests/cpp/test_llm_pipeline_preflight.cpp` auto-discovered by CMake.
184+
3. Added comprehensive GTest suite `tests/cpp/test_llm_pipeline_preflight.cpp` (16 test cases, 100% pass) auto-discovered by CMake.
184185
4. Executed physical silicon verification harness `scratch/verify_gap04_dag_preflight.py` on Intel Core Ultra 5 125H silicon (Arc Xe-LPG iGPU & AI Boost NPU 3720), proving 0 regressions on `qwen-2.5-1.5b`, `deepseek-r1-1.5b`, and `qwen-0.5b-npu-certified`.
185186
186187
### PR-05: Native C++ Zero-Dependency GGUF Container Reader

‎scratch/openvino_pr_body.md‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
## Description
2+
Malformed or corrupt OpenVINO IR models (e.g. models missing `input_ids`, missing vocabulary `logits`, or with topologically disconnected parameters from aggressive pruning/quantization tools) currently bypass `ov::Core::read_model` and fail deep inside pipeline instantiation with cryptic internal runtime errors such as `std::out_of_range: invalid vector subscript` or null pointer dereferences.
3+
4+
This PR introduces topological pre-flight validation `ov::genai::utils::validate_llm_model_dag` in `src/cpp/src/utils.hpp` and `src/cpp/src/utils.cpp`, called during `StatefulLLMPipeline` construction (in both stateful and static pipeline paths) before KV-cache initialization and plugin compilation:
5+
6+
1. **Gate 0 (Null & Zero-Element Guard)**:
7+
Asserts model pointer is non-null and contains at least one parameter and at least one result or sink.
8+
2. **Gate A (Role-Aware Input Validation)**:
9+
Verifies primary LLMs possess `input_ids`. For speculative draft models (`ModelRole::DRAFT_MODEL` / `EAGLE3_DRAFT`), whitelists `input_ids`, `hidden_states`, or `inputs_embeds`.
10+
3. **Gate B (Heuristic Logits Output Verification)**:
11+
Inspects output friendly names and tensor names for `logits`, `lm_logits`, rank $\ge 2$ single-result fallback, and draft heads.
12+
4. **Gate C (Dual-Root Backward BFS Traversal)**:
13+
Traverses backward from both `ov::Result` nodes and `ov::Sink` nodes (`ov::op::v6::Assign` in stateful KV-cache loops) to confirm that critical parameters are topologically connected to outputs, preventing disconnected-subgraph crashes.
14+
15+
When validation fails, an informative `ov::Exception` is raised detailing the model name, exact missing tensor, list of existing tensors, and actionable advice to re-export or fix the graph.
16+
17+
Fixes https://github.com/techdeveloper-org/intel-arc-models-runner/issues/63
18+
19+
## Checklist:
20+
- [x] This PR follows [GenAI Contributing guidelines](https://github.com/openvinotoolkit/openvino.genai?tab=contributing-ov-file#contributing).
21+
- [x] Tests have been updated or added to cover the new code: Added 16 GTest test cases in `tests/cpp/test_llm_pipeline_preflight.cpp` covering null models, empty models, missing inputs, missing logits, disconnected parameters, draft models, stateful sink loops, thread safety, and latency budget (<5ms).
22+
- [x] This PR fully addresses the ticket.
23+
- [x] I have made corresponding changes to the documentation (N/A - internal pre-flight validation without public API contract changes).
24+
25+
## AI Usage Disclosure:
26+
AI assistance used: yes
27+
If yes: Assisted in drafting initial boilerplate and exhaustive test permutations for GTest.
28+
Human validation performed: Complete manual architectural review, MSVC 2026 build verification, 16/16 GTest suite passing, regression suite passing, and physical silicon validation on Intel Meteor Lake Core Ultra 5 125H (Arc GPU & NPU) with Optimum-Intel models (Qwen2.5-1.5B, DeepSeek-R1-1.5B, Qwen-0.5B NPU).

0 commit comments

Comments
 (0)