nncf icon indicating copy to clipboard operation
nncf copied to clipboard

[Fixed]: Onnx function transform error in onnx ptq

Open thinvy opened this issue 10 months ago • 3 comments

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 avatar Feb 06 '25 15:02 thinvy

@kshpv , please take a look

MaximProshin avatar Feb 06 '25 16:02 MaximProshin

@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.

kshpv avatar Feb 07 '25 13:02 kshpv

@thinvy , do you have any input requested above? Otherwise I would close this PR.

MaximProshin avatar Apr 18 '25 10:04 MaximProshin