Enable various operations in OpenVINO backend#159
Open
zhaixuejun1993 wants to merge 5 commits into
Open
Conversation
Collaborator
|
you can merge on yourself when ci finishes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds support for several new operations to the OpenVINO backend in the
ggmllibrary, includingDIV,MUL_MAT_ID,SUM_ROWS, andCLAMP. It introduces the necessary translation logic for these operations, updates operator tables, and improves handling of certain edge cases and resource limits. The changes also refine the implementation of thePERMUTEoperation.New operator support and translation:
DIV, including broadcasting and type conversion logic inopenvino/op/div.cpp, and updated the operator table to use the new translation function. [1] [2] [3]MUL_MAT_ID, including input processing, expert weight selection, and shape handling inopenvino/op/mul_mat_id.cpp, and updated the operator table. [1] [2] [3] [4]SUM_ROWSandCLAMPoperations, including their translation logic and registration in the operator table. [1] [2] [3] [4] [5] [6] [7]Operator support and scheduling improvements:
ggml_backend_openvino_device_supports_opto include the new operations, and added checks to avoid scheduling unsupported or resource-intensive cases (e.g., large temporaries inMUL_MAT_ID, or unsupported input patterns forSUM_ROWS). [1] [2] [3] [4] [5]Other improvements:
PERMUTEoperation to correctly interpret permutation parameters, improving axis mapping logic.These changes collectively expand the backend's capabilities and robustness, allowing it to handle a wider range of models and operations.## Overview
Additional information
Requirements