pass, we are supposed to get a well-transformed model which contains different kinds of operators with auto mix precision.
However, we have seen some error messages.
The Relay type checker is unable to show the following types match.
In particular `Tensor[(64), float32]` does not match `Tensor[(64), bfloat16]`
The Relay type checker is unable to show the following types match.
In particular `Tensor[(64), float32]` does not match `Tensor[(64), bfloat16]`
After we print out the relay graph, we can see this error occurs because nn.layer_norm belongs to DEFAULT_NEVER_LIST but there is not cast operators which promoted its input from bfloat16 to float32.
There is a minimal script which can reproduce this issue:
When we invoke
pass, we are supposed to get a well-transformed model which contains different kinds of operators with auto mix precision. However, we have seen some error messages.
After we print out the relay graph, we can see this error occurs because nn.layer_norm belongs to DEFAULT_NEVER_LIST but there is not cast operators which promoted its input from bfloat16 to float32.
There is a minimal script which can reproduce this issue:
I posted the code into my personal repo: https://github.com/apache/tvm/commit/fa1fb3ba1854c8c2c6fa813f95bb2454ff2f249c#diff-8b8dff568d8ee66e899bdc2b00d56db2a75e050c42b771fe38df17c4ca1ccdfb