def METHOD_NAME(device):
    """relay build & export graph"""
    x = relay.var("x", shape=(10, 5))
    y = relay.var("y", shape=(1, 5))
    z = relay.add(x, y)
    z = relay.exp(z)
    func = relay.Function([x, y], z)
    x_data = np.random.rand(10, 5).astype("float32")
    y_data = np.random.rand(1, 5).astype("float32")
    params = {"y": y_data}
    pt_device = torch.device(device)
    if pt_device.type == "cuda":
        target = "cuda"
        ctx = tvm.cuda(pt_device.index)
    else:
        target = "llvm"
        ctx = tvm.cpu(0)
    graph, lib, params = relay.build(tvm.IRModule.from_expr(func), target=target, params=params)
    mod = graph_runtime.create(graph, lib, device=ctx)
    mod.set_input(**params)
    mod.set_input(x=x_data)
    mod.run()
    res = mod.get_output(0).asnumpy()
    ref_res = np.exp(y_data + x_data)
    tvm.testing.assert_allclose(res, ref_res, atol=1e-5, rtol=1e-5)
    # export to tempdir
    export_dir = tempfile.mkdtemp("tvm_export")
    lib.export_library(os.path.join(export_dir, TVM_ASSETS[0]))
    with open(os.path.join(export_dir, TVM_ASSETS[1]), "w") as fout:
        fout.write(graph)
    with open(os.path.join(export_dir, TVM_ASSETS[2]), "wb") as fout:
        fout.write(relay.save_param_dict(params))
    return export_dir