def METHOD_NAME(addr="localhost", port="29500"):
    os.environ["CUDA_VISIBLE_DEVICES"] = "0"
    client = Client(f"{addr}:{port}")
    for size in [5000]:
        # for size in [100, 1000]:
        print(f"======= size = {size} =====")
        f = open(f"logs/single_grpc_{size}.log", "w")
        tensor = torch.ones(size, size)
        # warmup
        client.measure(
            name="identity",
            tensor=tensor,
            cuda=False,
            out_file=f,
        )
        # identity
        client.measure(
            name="identity",
            tensor=tensor,
            cuda=False,
            out_file=f,
        )
        # identity_script
        client.measure(
            name="identity_script",
            tensor=tensor,
            cuda=False,
            out_file=f,
        )
        # heavy
        client.measure(
            name="heavy",
            tensor=tensor,
            cuda=False,
            out_file=f,
        )
        # heavy script
        client.measure(
            name="heavy_script",
            tensor=tensor,
            cuda=False,
            out_file=f,
        )
        tensor = tensor.to(0)
        torch.cuda.current_stream(0).synchronize()
        # identity cuda
        client.measure(
            name="identity_cuda",
            tensor=tensor,
            cuda=True,
            out_file=f,
        )
        # identity_script cuda
        client.measure(
            name="identity_script_cuda",
            tensor=tensor,
            cuda=True,
            out_file=f,
        )
        # heavy cuda
        client.measure(
            name="heavy_cuda",
            tensor=tensor,
            cuda=True,
            out_file=f,
        )
        # heavy_script cuda
        client.measure(
            name="heavy_script_cuda",
            tensor=tensor,
            cuda=True,
            out_file=f,
        )
        f.close()
    client.terminate()