We find unacceptable numerical errors exist between optimized and un-optimized models.
Two imprecise passes cause the errors. And the errors are silent, meaning only particular inputs trigger the errors.
These severe yet slient errors accumulate along the computational graph, harming the security of the models.
Expected behavior
The results of optimized models remains consistent with that of the un-optimized models.
Actual behavior
Significant discrepancies are between un-optimized and optimized models' results.
The relative error caused by optimization is more than 0.9 when the model has several operators and its type is float32. (tvm's built-in tolerance is 10^-4)
Environment
Ubuntu 18.04
tvm v0.12.dev
Steps to reproduce : 3 small cases (models' operator number < 8)
@tqchen,@ZihengJiang, @zhiics, @haoyang9804, @Hzfengsy, Hi all, I will continue working on this part. Could you please help me review this problem? thanks a lot.
We find unacceptable numerical errors exist between optimized and un-optimized models. Two imprecise passes cause the errors. And the errors are silent, meaning only particular inputs trigger the errors. These severe yet slient errors accumulate along the computational graph, harming the security of the models.
Expected behavior
The results of optimized models remains consistent with that of the un-optimized models.
Actual behavior
Significant discrepancies are between un-optimized and optimized models' results. The relative error caused by optimization is more than 0.9 when the model has several operators and its type is float32. (tvm's built-in tolerance is 10^-4)
Environment
Ubuntu 18.04 tvm v0.12.dev
Steps to reproduce : 3 small cases (models' operator number < 8)
Triage [imprecision or nonequivalence of relay:transformer]
There are 3 types of buggy patterns which lead to numerical errors.