Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fixed]: Onnx function transform error in onnx ptq #3260

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

thinvy
Copy link

@thinvy thinvy commented Feb 6, 2025

Changes

Added the function member transfer when constructing the _insert_outputs onnx model.

Reason for changes

Onnx function is a widely used new feature. In 'torch.onnx.dynamo_export' and 'torch.onnx.export' ('export_modules_as_functions' param), some user modules will be converted to onnx functions. However, the current nncf onnx quantization does not do special processing for it, resulting in the onnx exported by this function converting the user's onnx function into an unimplemented custom operator, causing errors in the subsequent ptq process.

image

@thinvy thinvy requested a review from a team as a code owner February 6, 2025 15:36
@github-actions github-actions bot added the NNCF ONNX Pull requests that updates NNCF ONNX label Feb 6, 2025
@MaximProshin MaximProshin requested a review from kshpv February 6, 2025 16:05
@MaximProshin
Copy link
Collaborator

@kshpv , please take a look

@kshpv
Copy link
Collaborator

kshpv commented Feb 7, 2025

@thinvy thanks for raising the issue. Could you provide more details on the scenario where you encountered it? Did this fix completely resolve the problem? I am wondering whether the model that you mentioned having function inside would be handled correctly by quantization algorithm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NNCF ONNX Pull requests that updates NNCF ONNX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants