Skip to content

Move parameter node creation from decoder to translate#252

Closed
zhaixuejun1993 wants to merge 39 commits into
ravi9:dev_backend_openvinofrom
zhaixuejun1993:xuejun/create_ov_node_in_translater
Closed

Move parameter node creation from decoder to translate#252
zhaixuejun1993 wants to merge 39 commits into
ravi9:dev_backend_openvinofrom
zhaixuejun1993:xuejun/create_ov_node_in_translater

Conversation

@zhaixuejun1993

Copy link
Copy Markdown
Collaborator

This pull request refactors how model inputs and extra inputs are represented and handled in the OpenVINO backend, replacing direct use of OpenVINO node objects with new structured info types. The changes improve abstraction, simplify input management, and make the codebase more maintainable and extensible. Key updates include the introduction of ModelInputInfo and ModelExtraInputInfo structs, updates to interfaces and internal data structures, and refactoring of related logic to use these new types.

API and Data Structure Refactoring:

  • Introduced ModelInputInfo and ModelExtraInputInfo structs to represent model inputs and extra inputs, respectively, encapsulating type, shape, value, and parameter status. (ggml/src/ggml-openvino/openvino/decoder.h)
  • Updated interface methods in GgmlDecoder and its implementations to use these new structs instead of std::shared_ptr<ov::Node>. (ggml/src/ggml-openvino/openvino/decoder.h, ggml/src/ggml-openvino/ggml-decoder.h) [1] [2] [3]

Logic and Implementation Updates:

  • Refactored creation and storage of model inputs and extra inputs in GgmlOvDecoder to use the new structs, simplifying logic and removing redundant code. (ggml/src/ggml-openvino/ggml-decoder.cpp) [1] [2] [3]
  • Updated input node construction in the translation session to use helper functions that build OpenVINO nodes from the new info structs, ensuring consistent parameter and constant creation. (ggml/src/ggml-openvino/openvino/translate_session.cpp) [1] [2]

Utility Function Update:

  • Modified utility code to construct input tensors from the new ModelExtraInputInfo struct, removing the need for a separate map of extra input values. (ggml/src/ggml-openvino/utils.cpp)

Dependency Cleanup:

  • Removed unnecessary OpenVINO header includes, reflecting the reduced direct dependency on OpenVINO node types in header files. (ggml/src/ggml-openvino/ggml-decoder.cpp)

These changes collectively improve code clarity and set the stage for easier future modifications to input handling.## Overview

Additional information

Requirements

zhaixuejun1993 and others added 30 commits July 1, 2026 13:07
…g_src to recorde the src ggml tensor for OpenVINO dynamic shape infer
…utput_info

Clean node information in OpenVINO backend
…issue

Enable zero-size copy for OpenVINO backend view
enable qwen35

Fix after rebase

remove logging
…t reason: the backend test initializes unary op inputs over a wide range, [-150, 150]. For FP32, exp(x) overflows around x ~= 88.7, so this test can randomly generate values right in or beyond the overflow region
In stateful mode the NEOX RoPE branch fed rank-3 data ([S, n_heads,
head_size]) into the Multiply against the rank-4 cos/sin tables
([1, S, 1, n_dims/2]). That mixed-rank broadcast is miscomputed by the
OpenVINO GPU plugin, corrupting the rotated Q/K and producing garbage
output (e.g. Phi-3-mini). Lift the data to rank-4 before the split/
Multiply so the operands are equal-rank, matching what the TYPE_NORMAL
branch already does. CPU and stateless paths are unaffected.

Phi-3-mini-Q4_K_M, wiki.test perplexity, GPU stateful:
  before: PPL = 27120.43
  after:  PPL = 6.2263   (CPU reference: 6.2251)
…ov name in ov bk; 3) fix issue in arch test & op test with latest code update
Update OpenVINO backend: remove unique name, add new OV name, fix tests
…s-in-llama

OpenVINO Backenb: remove changes in llama.cpp
@ravi9
ravi9 force-pushed the dev_backend_openvino branch from 7a9b001 to ab6cd7e Compare July 14, 2026 04:06
@ravi9 ravi9 mentioned this pull request Jul 14, 2026
ravi9 added a commit that referenced this pull request Jul 14, 2026
@ravi9

ravi9 commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Merged PR#253 instead of this.

@ravi9 ravi9 closed this Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants