[Fixed]: Onnx function transform error in onnx ptq
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.
@kshpv , please take a look
@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.
@thinvy , do you have any input requested above? Otherwise I would close this PR.