af26e92c5c7e3053c8e69f0cdf607e22856f3786,contrib/tvmop/compile.py,,,#,114

Before Change


    arguments = parser.parse_args()

    func_list_llvm = []
    func_list_cuda = []

    // TODO: attach instruction features to the library, e.g., avx-512, etc.
    for operator_def in __OP_DEF__:
        for sch, args, name in operator_def.invoke_all():

After Change


    arguments = parser.parse_args()

    mod_llvm = tvm.IRModule({})
    mod_cuda = tvm.IRModule({})
    has_cuda = False

    // TODO: attach instruction features to the library, e.g., avx-512, etc.
    for operator_def in __OP_DEF__:
        for sch, args, name in operator_def.invoke_all():
            name = operator_def.get_op_name(name, args)
            if tvm.runtime.module.enabled(get_target(operator_def.target)):
                func_lower = tvm.lower(sch, args,
                                       name=name,
                                       binds=operator_def.get_binds(args))
                if operator_def.target == "cpu":
                    mod = mod_llvm.update(func_lower)
                else:
                    has_cuda = True
                    mod_cuda.update(func_lower)

    lowered_funcs = {get_target("cpu"): mod_llvm}
    if has_cuda > 0:
        lowered_funcs[get_target("cuda")] = mod_cuda
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: apache/incubator-mxnet
Commit Name: af26e92c5c7e3053c8e69f0cdf607e22856f3786
Time: 2020-12-02
Author: lausen@amazon.com
File Name: contrib/tvmop/compile.py
Class Name:
Method Name:


Project Name: apache/incubator-tvm
Commit Name: 44bffdb398f2309f7506b9e51b774b8a743c1f03
Time: 2020-04-02
Author: tqchen@users.noreply.github.com
File Name: python/tvm/driver/build_module.py
Class Name:
Method Name: build


Project Name: apache/incubator-tvm
Commit Name: e63e08febd682f40a536075998a6839bccccd3c6
Time: 2020-04-04
Author: tqchen@users.noreply.github.com
File Name: python/tvm/driver/build_module.py
Class Name:
Method Name: build