Skip to content

[core] Add natvie stream and stream buff#36511

Merged
praasz merged 36 commits into
openvinotoolkit:masterfrom
praasz:feature/api-io-read-utils
Jul 2, 2026
Merged

[core] Add natvie stream and stream buff#36511
praasz merged 36 commits into
openvinotoolkit:masterfrom
praasz:feature/api-io-read-utils

Conversation

@praasz

@praasz praasz commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Details:

  • Base class for Native stream and stream buffer to replace parallel read.
  • Add some file utils to get native handler, concept requires further implementation. To replace some file utils as parallel utils.

Tickets:

Add file utils functions
@github-actions github-actions Bot added the category: Core OpenVINO Core (aka ngraph) label Jun 22, 2026
@praasz
praasz marked this pull request as ready for review June 26, 2026 14:10
@praasz
praasz requested a review from a team as a code owner June 26, 2026 14:10
Comment thread src/common/util/include/openvino/util/file_util.hpp Outdated
Comment thread src/common/util/include/openvino/util/native_stream.hpp
Comment thread src/common/util/src/os/lin/lin_file_util.cpp
@praasz
praasz requested a review from olpipi June 30, 2026 10:14
@praasz
praasz added this pull request to the merge queue Jul 1, 2026
@praasz praasz added this to the 2026.3 milestone Jul 1, 2026
@praasz
praasz removed this pull request from the merge queue due to a manual request Jul 1, 2026
pereanub and others added 8 commits July 1, 2026 15:57
…penvinotoolkit#36571)

### Details:
- *Create compiler in plugin handle using device properties if the
device exists*

### Tickets:
 - *N/A*

### AI Assistance:
 - *AI assistance used: no / yes*
- *If yes, summarize how AI was used and what human validation was
performed (build/tests/manual checks).*

---------

Signed-off-by: Bogdan Pereanu <bogdan.pereanu@intel.com>
…envinotoolkit#36602)

### Details:
Reuse `compose_loop_args()` in the AArch64 loop end emitter so pointer
increments and finalization offsets arescaled consistently with
x64/RISC-V. This removes duplicate byte-offset math while keeping
dynamic loop arguments loaded from runtime data.

### Tickets:
 - N/A

### AI Assistance:
 - *AI assistance used:  yes*
 - Implementation is agentically assisted and then manually validated
### Details:
- Isolate GQA subgraph properly with the new decomposition update (
openvinotoolkit#34980 )

### Tickets:
 - EISW-220403

### AI Assistance:
 - *AI assistance used: yes*

---------

Co-authored-by: Ekaterina Shiryaeva <ekaterina.shiriaeva@intel.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…umentation (openvinotoolkit#36542)

### Details:
- *Added documentation with best practices for transformation tests
writing*
- *Added a corresponding skill to ensure automatic LLM agent routing to
the new documentation in transformation tests writing scenario*
- *The new skill was applied to a few existing legacy tests files to
check how it works. Prompt example: `/ov-transformation-tests refactor
@src/common/transformations/tests/common_optimizations/convert_convertlike.cpp
tests`. The skill has been confirmed to work on lightweight models as
well (e.g. Haiku).*

### Tickets:
 - *N\A*

### AI Assistance:
 - *AI assistance used: yes*
- *AI was used to test the new skill and for the new documentation
adjustments*
### Details:
PR openvinotoolkit#35720 fixed a Phi accuracy bug (garbage output) by disabling the
onednn `sum` post-op for any fused eltwise add whose addend is an
`input_layout` node:
```
  && !(dep_node.is_type<input_layout>())
```
This was over-broad. The onednn `sum` post-op aliases the addend buffer
in-place as the node's output (see `get_reused_eltwmem_idx` →
`primitive_inst.cpp`), so the primitive overwrites the addend. That is
only unsafe when the `input_layout` addend has another live consumer -
which is exactly the Phi `input_hidden_states` residual case: the
network input feeds both the FullyConnected (reaching `sum` via
`is_direct_ancestor`) and downstream blocks (`users > 1`), so the
in-place write corrupts the value the residual still needs.

When the `input_layout` addend has a single user, there is no surviving
reader of the original buffer, so the in-place `sum` is safe.
Blanket-disabling it forced these cases onto a slower `binary_add`
post-op (extra addend read, lost buffer reuse, possible extra reorder),
which regressed per-token decode latency.

This caused a 2nd-token (decode) latency regression for distil-large-v2
INT8-CW on GPU (b_fs_yx_fsv16/compressed-FC path). Measured on a
Battlemage dGPU (arls): INT8-CW 2nd-token went from ~2.54 ms to ~2.96 ms
(+16.6%), with 1st-token unaffected. FP16/INT4 were unaffected because
they dispatch through a different FC path.

### Fix:
Narrow the guard so sum is only disabled for the unsafe multi-consumer
case:
```
  && !(dep_node.is_type<input_layout>() && dep_node.get_users().size() > 1)
```
- Multi-user input_layout addend (Phi residual): users > 1 → falls back
to binary add → accuracy preserved.
- Single-user input_layout addend (distil-large-v2 INT8-CW FC): keeps
the in-place sum → regression fixed.

The new clause is only reachable in the multi-user case through the
existing is_direct_ancestor branch (a single-user dependency already
satisfies get_users().size() == 1 on the preceding line), so single-user
behavior is unchanged everywhere else. fuse_nodes() appends the fused
addend edge to the dependency's user list without dedup, so a residual
addend reliably has users > 1 after fusing.

### Results (arls, distil-large-v2, 2nd-token AVG latency)

``` 
┌────────────┬─────────────────────────┬───────────────────────┬─────────────────────────────────┐
│ precision  │ before openvinotoolkit#35720 (healthy) │ on openvinotoolkit#35720 (regressed) │          with this fix          │
├────────────┼─────────────────────────┼───────────────────────┼─────────────────────────────────┤
│ INT8-CW    │ 2.537 ms                │ 2.959 ms              │ 2.695 ms (back in healthy band) │
├────────────┼─────────────────────────┼───────────────────────┼─────────────────────────────────┤
│ FP16       │ 3.158 ms                │ 3.042 ms              │ 3.010 ms (unchanged)            │
├────────────┼─────────────────────────┼───────────────────────┼─────────────────────────────────┤
│ INT4-MIXED │ 2.715 ms                │ 2.545 ms              │ 2.525 ms (unchanged)            │
└────────────┴─────────────────────────┴───────────────────────┴─────────────────────────────────┘
```

### Tickets:
 - CVS-170687
…SequenceArrayLowering (openvinotoolkit#36445)

### Details:
 - SequenceIfReplacer (common_translators):
- Rewrites the "If-branch lazy sequence initialization" idiom (past-KV
cache first produced on loop iteration 0 inside a Loop body) into a form
the array lowering can process.

 - SequenceArrayLowering (common_translators):
- Lowers loop-carried sequence-of-N patterns (SequenceConstruct /
SequenceInsert / SequenceErase / SequenceAt / SequenceLength) into N
parallel slot tensors, producing a fully numeric IR with no sequence
residuals.
Reader gate: true no-op when no SequenceAt/SequenceLength reader exists
(prevents SequenceConcatReplacer corruption).
Two-phase Loop slot resolver: breaks nested-Loop chicken-and-egg
dependencies.
- Per-body slot-count reconciliation: pads mismatched slot counts with
zero-dummies.
- SequenceLength static-N fallback: axis_ambiguous flag correctly defers
only sequences with genuinely runtime-varying length; all others emit
Constant(slots->size()).

### Tickets:
 - CVS-187784

### AI Assistance:
 - AI assistance used: yes
 - GitHub Copilot was used to prototype

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
### Details:
 - Detect if current system supports interoperability. 
- If check is passed, then create OCL remote context over L0 GPU
runtime.
   - If check fails, then create L0 remote context over L0 GPU runtime.
- Remote context and remote tensors query internal GPU plugin objects
fur runtime specific handles.
   - OCL remote context will query for OCL handles.
   - L0 remote context will query for L0 handles.
- Enable L0 internal GPU plugin objects to return converted OCL handles.
 - Add `resource_owner` template for gpu resource management.
- Add `ze_resource` template that will hold Level Zero objects and
optionally corresponding OpenCL objects.
- Add operators for conversion between Level Zero objects and OpenCL
objects.

### Benchmarks:
Peak memory usage measured on benchmark_app running resnet-50 on BMG
Linux
|  | VmPeak (kB) | MaxRSS (kB) |
| --- | --- | --- |
| This PR (runtime=L0, interop=ON) | 3,262,536 | 190,924 |
| This PR (runtime=L0, interop=OFF) | 3,263,688 | 193,200 |
| Master (runtime=L0) | 3,293,048 | 192,188 |
| [REF] Master (runtime=OCL) | 3,281,412 | 193,196 |

### Tickets:
 - [CVS-185378](https://jira.devtools.intel.com/browse/CVS-185378)

### AI Assistance:
 - AI assistance used: yes
 - AI help was used to create tests

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added category: C API OpenVINO C API bindings category: transformations OpenVINO Runtime library - Transformations category: CI OpenVINO public CI category: docs OpenVINO documentation category: ONNX FE OpenVINO ONNX FrontEnd category: CPP API OpenVINO CPP API bindings github_actions Pull requests that update GitHub Actions code category: PyTorch FE OpenVINO PyTorch Frontend category: JS API OpenVino JS API Bindings no-match-files category: NPU OpenVINO NPU plugin category: NPUW NPUW plugin labels Jul 1, 2026
@github-actions github-actions Bot removed category: inference OpenVINO Runtime library - Inference category: IE Tests OpenVINO Test: plugins and common category: GPU OpenVINO GPU plugin category: CPU OpenVINO CPU plugin category: Python API OpenVINO Python bindings category: C API OpenVINO C API bindings category: transformations OpenVINO Runtime library - Transformations category: CI OpenVINO public CI category: docs OpenVINO documentation category: ONNX FE OpenVINO ONNX FrontEnd category: CPP API OpenVINO CPP API bindings github_actions Pull requests that update GitHub Actions code category: PyTorch FE OpenVINO PyTorch Frontend category: JS API OpenVino JS API Bindings no-match-files category: NPU OpenVINO NPU plugin labels Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: build OpenVINO cmake script / infra category: Core OpenVINO Core (aka ngraph)

Projects

None yet

Development

Successfully merging this pull request may close these issues.