Handling mixed floating point datatypes

In the tvm frontend, operations which involves mixed datatypes(float16, float32, float64) as operands are not handled explicitly. I found a condition check which is missing in src/tir/ir.op.cc file for float case. After adding that check I ran TVM unit test suite and noticed that one of the example is failing. “ verify_callop_float_only(f) ” function from test_tir_ops.py is getting failed. Inside that function there is a check “ if ‘float’ in lhs_dtype and ‘float’ in rhs_dtype and lhs_dtype != rhs_dtype ” which allows variables with mixed datatypes execute. If this condition passes, the control goes to below code.

def check_throws(f): ** try:** ** f()** ** except tvm.error.TVMError:** ** pass** ** else:** ** raise AssertionError(“Should have raised an exception but didn’t.”)**

Earlier, without my changes this piece of code is going into except condition and working properly, now, after adding my change the control is going into else condition and asserting error.

Questions:

  1. Is it expected to not handle mixed float datatypes from tvm frontend?
  2. If we allow mixed datatypes, then should I modify the example which is failing?