Hello,
I’m currently facing a limitation with a model that TVM can’t fully quantize. My workaround is to skip layers that cause problems using the skip_conv_layers
parameter. After a lot of experimentation, I have noticed that I have to remove the first 9 layers so that the rest of the model can be quantized: skip_conv_layers = [0, 1, 2, 3, 4, 5, 6, 7, 8]
. However, after looking at the IR, it can be seen that only layers 5,6,7,8 are problematic. So I wanted to re-enable the quantization of the first layers, but I receive the following error:
File "/home/anonymus/tvm/src/relay/quantize/realize.cc", line 382
TVMError: Check failed: !new_args[0]->IsInstance<TempExprNode>() && !new_args[1]->IsInstance<TempExprNode>():
I have tried many combinations, e.g., removing only 0 from the list, or 0 and 1, etc… but so far every combination lead to the previous error. Since I’m just entering the topic of quantization, I can’t really tell what could lead to this error.
Does anyone have an idea? Any tips & hints are more then welcome!
Thank you & Best regards, Robert