def METHOD_NAME(
    mod, data, params, target, dev, dtype="float32", number=2, repeat=20
):
    with tvm.transform.PassContext(opt_level=3):
        lib = relay.build(mod, target, params=params)
    m = graph_executor.GraphModule(lib["default"](dev))
    # set inputs
    m.set_input("data", data)
    m.run()
    out = m.get_output(0, tvm.nd.empty(out_shape, dtype))
    if measure:
        print("Evaluate graph executor inference cost of {} on " "{}".format(model, repr(dev)))
        ftimer = m.module.time_evaluator("run", dev, number=1, repeat=20)
        # Measure in millisecond.
        prof_res = np.array(ftimer().results) * 1000
        print(
            "Mean graph executor inference time (std dev): %.2f ms (%.2f ms)"
            % (np.mean(prof_res), np.std(prof_res))
        )
    return out.numpy()