AndrewZhaoLuo opened a new pull request #8517: URL: https://github.com/apache/tvm/pull/8517
Right now if we in TIR add a floating point type with an integer type, the integer type will be implicitly cast to the floating point type. E.g. `a: float32 + b: int32 ---> a: float32 + cast(float32, b: int32)` This change does the same thing for floating point types. If we have two different floating point types e.g. fp16 and fp32, then when operating, the lower bit floating point type gets upcast into the higher bit floating point type. E.g. `a: float32 + b: float16 --> a: float32 + cast(float32, b: float16)` This is of use since https://github.com/apache/tvm/issues/8340 has an issue where some schedules which should support mixed precision types do not. This is due to binary ops like addition and multiplication not supporting mixing fp32 and fp16. Most of these errors can be fixed by inserting a cast into the schedule. Rather than manually audit every schedule which might have this, this might be a preferable and reasonable solution. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
