def generate_memcpy_log(
        tensor_data, from_op, to_op, from_device_id, to_device_id, cached):
    """Generates a memcpy log."""
    # pylint: disable=too-many-arguments
    return ('memcpy tensor={}, device {}->{}, cached={}, from={}, to={}, '
            'send_start={}, recv_start={}, recv_end={}, cost={}\n'.format(
                tensor_data['name'], from_device_id, to_device_id, cached,
                from_op['name'], to_op['name'], tensor_data['send_start_ts'],
                tensor_data['recv_start_ts'], tensor_data['recv_end_ts'],
                tensor_data['weight']))