Closed hoangtv2000 closed 2 months ago
Hi, I reproduced the issue and figured out that it is some extra operations on the quantized weights that leads to the error, which seems to be caused by the PyTorch codebase. Luckily, we may workaround this problem by adding the following keyword parameter QATQuantizer(..., config={...., 'extra_tracer_opts': {'eliminate_dead_graph': True},}
so that those operations will be removed. (P.S. There are multiple QATQuantizer instances and I think you should apply it to all the instances)
You may refer to #344 as well if I didn't make it clear in the previous comment.
Hi @zk1998, I have an another issue with your repository. I implemented PTQ on ViT by following the code in vit_post.py and got error below:
Here is the part of TorchScript Graph of model, I think the problem is come from ' prim::TupleUnpack', but I don't know how to fix it.
Can you show me how to resolve this error. Thank you so much.