6a4c51e187b2cea0ec14996580c89bb2f7176be0,python/tvm/auto_scheduler/utils.py,,get_const_tuple,#Any#,83

Before Change


    out_tuple : Tuple[int]
        The output.
    
    return tuple(get_const_int(x) for x in in_tuple)


def list_to_tuple(x):
     Convert a list to a tuple recursively. 

After Change


    out_tuple : Tuple[Union[int,tvm.tir.Var,tvm.tir.Any]]
        The output tuple of int. The dynamic shape variables (Var or Any) will be preserved.
    
    ret = []
    for elem in in_tuple:
        if isinstance(elem, (tvm.tir.Var, tvm.tir.expr.Any)):
            ret.append(elem)
        else:
            ret.append(get_const_int(elem))
    return tuple(ret)


def list_to_tuple(x):
     Convert a list to a tuple recursively. 
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 10

Instances


Project Name: apache/incubator-tvm
Commit Name: 6a4c51e187b2cea0ec14996580c89bb2f7176be0
Time: 2020-12-30
Author: comaniac0422@gmail.com
File Name: python/tvm/auto_scheduler/utils.py
Class Name:
Method Name: get_const_tuple


Project Name: keras-team/keras
Commit Name: bf464d7ed9283988fea1f548a11a0171fd2ff364
Time: 2021-01-06
Author: gardener@tensorflow.org
File Name: keras/utils/version_utils.py
Class Name:
Method Name: swap_class


Project Name: tensorflow/tensorflow
Commit Name: fd758534e21a68dfc934cf5dff3fe4183986df51
Time: 2021-01-06
Author: gardener@tensorflow.org
File Name: tensorflow/python/keras/utils/version_utils.py
Class Name:
Method Name: swap_class


Project Name: tensorflow/kfac
Commit Name: aa5f9ddfdf0447c7a53f4e2676a1c866189315cd
Time: 2019-02-01
Author: jamesmartens@google.com
File Name: kfac/python/ops/curvature_matrix_vector_products.py
Class Name: CurvatureMatrixVectorProductComputer
Method Name: _total_loss