d9cecdf50141cc56eec9be928063a81baba31d92,topi/python/topi/util.py,,equal_const_int,#Any#Any#,132

Before Change


    if isinstance(expr, Integral):
        return expr == value
    if not isinstance(expr, tvm.tir.IntImm):
        expr = tvm.tir.ir_pass.Simplify(expr)
    if not isinstance(expr, tvm.tir.IntImm):
        return False
    return expr.value == value

After Change


    if isinstance(expr, Integral):
        return expr == value
    if not isinstance(expr, tvm.tir.IntImm):
        ana = tvm.arith.Analyzer()
        expr = ana.simplify(expr)
    if not isinstance(expr, tvm.tir.IntImm):
        return False
    return expr.value == value
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: apache/incubator-tvm
Commit Name: d9cecdf50141cc56eec9be928063a81baba31d92
Time: 2020-04-20
Author: tqchen@users.noreply.github.com
File Name: topi/python/topi/util.py
Class Name:
Method Name: equal_const_int


Project Name: apache/incubator-tvm
Commit Name: d9cecdf50141cc56eec9be928063a81baba31d92
Time: 2020-04-20
Author: tqchen@users.noreply.github.com
File Name: topi/python/topi/util.py
Class Name:
Method Name: get_const_int


Project Name: apache/incubator-tvm
Commit Name: d9cecdf50141cc56eec9be928063a81baba31d92
Time: 2020-04-20
Author: tqchen@users.noreply.github.com
File Name: topi/python/topi/util.py
Class Name:
Method Name: get_const_float