We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Update docs for `cupy.linalg.eigh` and `cupy.linalg.eigvalsh`
https://docs.cupy.dev/en/stable/reference/generated/cupy.linalg.eigvalsh.html
> Calculates eigenvalues of a symmetric matrix.

https://numpy.org/doc/stable/reference/generated/numpy.linalg.eigvalsh.html
> Compute the eigenvalues of a complex Hermitian or real symmetric matrix.

Documentation needs to be updated as we already support Hermitian matrix in https://github.com/cupy/cupy/pull/1518.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `cupy/linalg/_eigenvalue.py`
Content:
```
1 import numpy
2 
3 import cupy
4 from cupy_backends.cuda.libs import cublas
5 from cupy_backends.cuda.libs import cusolver
6 from cupy.cuda import device
7 from cupy.linalg import _util
8 
9 
10 def _syevd(a, UPLO, with_eigen_vector):
11     if UPLO not in ('L', 'U'):
12         raise ValueError('UPLO argument must be \'L\' or \'U\'')
13 
14     # reject_float16=False for backward compatibility
15     dtype, v_dtype = _util.linalg_common_type(a, reject_float16=False)
16     real_dtype = dtype.char.lower()
17     w_dtype = v_dtype.char.lower()
18 
19     # Note that cuSolver assumes fortran array
20     v = a.astype(dtype, order='F', copy=True)
21 
22     m, lda = a.shape
23     w = cupy.empty(m, real_dtype)
24     dev_info = cupy.empty((), numpy.int32)
25     handle = device.Device().cusolver_handle
26 
27     if with_eigen_vector:
28         jobz = cusolver.CUSOLVER_EIG_MODE_VECTOR
29     else:
30         jobz = cusolver.CUSOLVER_EIG_MODE_NOVECTOR
31 
32     if UPLO == 'L':
33         uplo = cublas.CUBLAS_FILL_MODE_LOWER
34     else:  # UPLO == 'U'
35         uplo = cublas.CUBLAS_FILL_MODE_UPPER
36 
37     if dtype == 'f':
38         buffer_size = cupy.cuda.cusolver.ssyevd_bufferSize
39         syevd = cupy.cuda.cusolver.ssyevd
40     elif dtype == 'd':
41         buffer_size = cupy.cuda.cusolver.dsyevd_bufferSize
42         syevd = cupy.cuda.cusolver.dsyevd
43     elif dtype == 'F':
44         buffer_size = cupy.cuda.cusolver.cheevd_bufferSize
45         syevd = cupy.cuda.cusolver.cheevd
46     elif dtype == 'D':
47         buffer_size = cupy.cuda.cusolver.zheevd_bufferSize
48         syevd = cupy.cuda.cusolver.zheevd
49     else:
50         raise RuntimeError('Only float and double and cuComplex and '
51                            + 'cuDoubleComplex are supported')
52 
53     work_size = buffer_size(
54         handle, jobz, uplo, m, v.data.ptr, lda, w.data.ptr)
55     work = cupy.empty(work_size, dtype)
56     syevd(
57         handle, jobz, uplo, m, v.data.ptr, lda,
58         w.data.ptr, work.data.ptr, work_size, dev_info.data.ptr)
59     cupy.linalg._util._check_cusolver_dev_info_if_synchronization_allowed(
60         syevd, dev_info)
61 
62     return w.astype(w_dtype, copy=False), v.astype(v_dtype, copy=False)
63 
64 
65 # TODO(okuta): Implement eig
66 
67 
68 def eigh(a, UPLO='L'):
69     """Eigenvalues and eigenvectors of a symmetric matrix.
70 
71     This method calculates eigenvalues and eigenvectors of a given
72     symmetric matrix.
73 
74     Args:
75         a (cupy.ndarray): A symmetric 2-D square matrix ``(M, M)`` or a batch
76             of symmetric 2-D square matrices ``(..., M, M)``.
77         UPLO (str): Select from ``'L'`` or ``'U'``. It specifies which
78             part of ``a`` is used. ``'L'`` uses the lower triangular part of
79             ``a``, and ``'U'`` uses the upper triangular part of ``a``.
80     Returns:
81         tuple of :class:`~cupy.ndarray`:
82             Returns a tuple ``(w, v)``. ``w`` contains eigenvalues and
83             ``v`` contains eigenvectors. ``v[:, i]`` is an eigenvector
84             corresponding to an eigenvalue ``w[i]``. For batch input,
85             ``v[k, :, i]`` is an eigenvector corresponding to an eigenvalue
86             ``w[k, i]`` of ``a[k]``.
87 
88     .. warning::
89         This function calls one or more cuSOLVER routine(s) which may yield
90         invalid results if input conditions are not met.
91         To detect these invalid results, you can set the `linalg`
92         configuration to a value that is not `ignore` in
93         :func:`cupyx.errstate` or :func:`cupyx.seterr`.
94 
95     .. seealso:: :func:`numpy.linalg.eigh`
96     """
97     if a.ndim < 2:
98         raise ValueError('Array must be at least two-dimensional')
99 
100     m, n = a.shape[-2:]
101     if m != n:
102         raise ValueError('Last 2 dimensions of the array must be square')
103 
104     if a.ndim > 2:
105         return cupy.cusolver.syevj(a, UPLO, True)
106     else:
107         return _syevd(a, UPLO, True)
108 
109 
110 # TODO(okuta): Implement eigvals
111 
112 
113 def eigvalsh(a, UPLO='L'):
114     """Calculates eigenvalues of a symmetric matrix.
115 
116     This method calculates eigenvalues a given symmetric matrix.
117     Note that :func:`cupy.linalg.eigh` calculates both eigenvalues and
118     eigenvectors.
119 
120     Args:
121         a (cupy.ndarray): A symmetric 2-D square matrix ``(M, M)`` or a batch
122             of symmetric 2-D square matrices ``(..., M, M)``.
123         UPLO (str): Select from ``'L'`` or ``'U'``. It specifies which
124             part of ``a`` is used. ``'L'`` uses the lower triangular part of
125             ``a``, and ``'U'`` uses the upper triangular part of ``a``.
126     Returns:
127         cupy.ndarray:
128             Returns eigenvalues as a vector ``w``. For batch input,
129             ``w[k]`` is a vector of eigenvalues of matrix ``a[k]``.
130 
131     .. warning::
132         This function calls one or more cuSOLVER routine(s) which may yield
133         invalid results if input conditions are not met.
134         To detect these invalid results, you can set the `linalg`
135         configuration to a value that is not `ignore` in
136         :func:`cupyx.errstate` or :func:`cupyx.seterr`.
137 
138     .. seealso:: :func:`numpy.linalg.eigvalsh`
139     """
140     if a.ndim < 2:
141         raise ValueError('Array must be at least two-dimensional')
142 
143     _util._assert_nd_squareness(a)
144 
145     if a.ndim > 2:
146         return cupy.cusolver.syevj(a, UPLO, False)
147     else:
148         return _syevd(a, UPLO, False)[0]
149
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/cupy/linalg/_eigenvalue.py b/cupy/linalg/_eigenvalue.py
--- a/cupy/linalg/_eigenvalue.py
+++ b/cupy/linalg/_eigenvalue.py
@@ -66,10 +66,13 @@
 
 
 def eigh(a, UPLO='L'):
-    """Eigenvalues and eigenvectors of a symmetric matrix.
+    """
+    Return the eigenvalues and eigenvectors of a complex Hermitian
+    (conjugate symmetric) or a real symmetric matrix.
 
-    This method calculates eigenvalues and eigenvectors of a given
-    symmetric matrix.
+    Returns two objects, a 1-D array containing the eigenvalues of `a`, and
+    a 2-D square array or matrix (depending on the input type) of the
+    corresponding eigenvectors (in columns).
 
     Args:
         a (cupy.ndarray): A symmetric 2-D square matrix ``(M, M)`` or a batch
@@ -111,11 +114,10 @@
 
 
 def eigvalsh(a, UPLO='L'):
-    """Calculates eigenvalues of a symmetric matrix.
+    """
+    Compute the eigenvalues of a complex Hermitian or real symmetric matrix.
 
-    This method calculates eigenvalues a given symmetric matrix.
-    Note that :func:`cupy.linalg.eigh` calculates both eigenvalues and
-    eigenvectors.
+    Main difference from eigh: the eigenvectors are not computed.
 
     Args:
         a (cupy.ndarray): A symmetric 2-D square matrix ``(M, M)`` or a batch

{"golden_diff": "diff --git a/cupy/linalg/_eigenvalue.py b/cupy/linalg/_eigenvalue.py\n--- a/cupy/linalg/_eigenvalue.py\n+++ b/cupy/linalg/_eigenvalue.py\n@@ -66,10 +66,13 @@\n \n \n def eigh(a, UPLO='L'):\n-    \"\"\"Eigenvalues and eigenvectors of a symmetric matrix.\n+    \"\"\"\n+    Return the eigenvalues and eigenvectors of a complex Hermitian\n+    (conjugate symmetric) or a real symmetric matrix.\n \n-    This method calculates eigenvalues and eigenvectors of a given\n-    symmetric matrix.\n+    Returns two objects, a 1-D array containing the eigenvalues of `a`, and\n+    a 2-D square array or matrix (depending on the input type) of the\n+    corresponding eigenvectors (in columns).\n \n     Args:\n         a (cupy.ndarray): A symmetric 2-D square matrix ``(M, M)`` or a batch\n@@ -111,11 +114,10 @@\n \n \n def eigvalsh(a, UPLO='L'):\n-    \"\"\"Calculates eigenvalues of a symmetric matrix.\n+    \"\"\"\n+    Compute the eigenvalues of a complex Hermitian or real symmetric matrix.\n \n-    This method calculates eigenvalues a given symmetric matrix.\n-    Note that :func:`cupy.linalg.eigh` calculates both eigenvalues and\n-    eigenvectors.\n+    Main difference from eigh: the eigenvectors are not computed.\n \n     Args:\n         a (cupy.ndarray): A symmetric 2-D square matrix ``(M, M)`` or a batch\n", "issue": "Update docs for `cupy.linalg.eigh` and `cupy.linalg.eigvalsh`\nhttps://docs.cupy.dev/en/stable/reference/generated/cupy.linalg.eigvalsh.html\r\n> Calculates eigenvalues of a symmetric matrix.\r\n\r\nhttps://numpy.org/doc/stable/reference/generated/numpy.linalg.eigvalsh.html\r\n> Compute the eigenvalues of a complex Hermitian or real symmetric matrix.\r\n\r\nDocumentation needs to be updated as we already support Hermitian matrix in https://github.com/cupy/cupy/pull/1518.\n", "before_files": [{"content": "import numpy\n\nimport cupy\nfrom cupy_backends.cuda.libs import cublas\nfrom cupy_backends.cuda.libs import cusolver\nfrom cupy.cuda import device\nfrom cupy.linalg import _util\n\n\ndef _syevd(a, UPLO, with_eigen_vector):\n    if UPLO not in ('L', 'U'):\n        raise ValueError('UPLO argument must be \\'L\\' or \\'U\\'')\n\n    # reject_float16=False for backward compatibility\n    dtype, v_dtype = _util.linalg_common_type(a, reject_float16=False)\n    real_dtype = dtype.char.lower()\n    w_dtype = v_dtype.char.lower()\n\n    # Note that cuSolver assumes fortran array\n    v = a.astype(dtype, order='F', copy=True)\n\n    m, lda = a.shape\n    w = cupy.empty(m, real_dtype)\n    dev_info = cupy.empty((), numpy.int32)\n    handle = device.Device().cusolver_handle\n\n    if with_eigen_vector:\n        jobz = cusolver.CUSOLVER_EIG_MODE_VECTOR\n    else:\n        jobz = cusolver.CUSOLVER_EIG_MODE_NOVECTOR\n\n    if UPLO == 'L':\n        uplo = cublas.CUBLAS_FILL_MODE_LOWER\n    else:  # UPLO == 'U'\n        uplo = cublas.CUBLAS_FILL_MODE_UPPER\n\n    if dtype == 'f':\n        buffer_size = cupy.cuda.cusolver.ssyevd_bufferSize\n        syevd = cupy.cuda.cusolver.ssyevd\n    elif dtype == 'd':\n        buffer_size = cupy.cuda.cusolver.dsyevd_bufferSize\n        syevd = cupy.cuda.cusolver.dsyevd\n    elif dtype == 'F':\n        buffer_size = cupy.cuda.cusolver.cheevd_bufferSize\n        syevd = cupy.cuda.cusolver.cheevd\n    elif dtype == 'D':\n        buffer_size = cupy.cuda.cusolver.zheevd_bufferSize\n        syevd = cupy.cuda.cusolver.zheevd\n    else:\n        raise RuntimeError('Only float and double and cuComplex and '\n                           + 'cuDoubleComplex are supported')\n\n    work_size = buffer_size(\n        handle, jobz, uplo, m, v.data.ptr, lda, w.data.ptr)\n    work = cupy.empty(work_size, dtype)\n    syevd(\n        handle, jobz, uplo, m, v.data.ptr, lda,\n        w.data.ptr, work.data.ptr, work_size, dev_info.data.ptr)\n    cupy.linalg._util._check_cusolver_dev_info_if_synchronization_allowed(\n        syevd, dev_info)\n\n    return w.astype(w_dtype, copy=False), v.astype(v_dtype, copy=False)\n\n\n# TODO(okuta): Implement eig\n\n\ndef eigh(a, UPLO='L'):\n    \"\"\"Eigenvalues and eigenvectors of a symmetric matrix.\n\n    This method calculates eigenvalues and eigenvectors of a given\n    symmetric matrix.\n\n    Args:\n        a (cupy.ndarray): A symmetric 2-D square matrix ``(M, M)`` or a batch\n            of symmetric 2-D square matrices ``(..., M, M)``.\n        UPLO (str): Select from ``'L'`` or ``'U'``. It specifies which\n            part of ``a`` is used. ``'L'`` uses the lower triangular part of\n            ``a``, and ``'U'`` uses the upper triangular part of ``a``.\n    Returns:\n        tuple of :class:`~cupy.ndarray`:\n            Returns a tuple ``(w, v)``. ``w`` contains eigenvalues and\n            ``v`` contains eigenvectors. ``v[:, i]`` is an eigenvector\n            corresponding to an eigenvalue ``w[i]``. For batch input,\n            ``v[k, :, i]`` is an eigenvector corresponding to an eigenvalue\n            ``w[k, i]`` of ``a[k]``.\n\n    .. warning::\n        This function calls one or more cuSOLVER routine(s) which may yield\n        invalid results if input conditions are not met.\n        To detect these invalid results, you can set the `linalg`\n        configuration to a value that is not `ignore` in\n        :func:`cupyx.errstate` or :func:`cupyx.seterr`.\n\n    .. seealso:: :func:`numpy.linalg.eigh`\n    \"\"\"\n    if a.ndim < 2:\n        raise ValueError('Array must be at least two-dimensional')\n\n    m, n = a.shape[-2:]\n    if m != n:\n        raise ValueError('Last 2 dimensions of the array must be square')\n\n    if a.ndim > 2:\n        return cupy.cusolver.syevj(a, UPLO, True)\n    else:\n        return _syevd(a, UPLO, True)\n\n\n# TODO(okuta): Implement eigvals\n\n\ndef eigvalsh(a, UPLO='L'):\n    \"\"\"Calculates eigenvalues of a symmetric matrix.\n\n    This method calculates eigenvalues a given symmetric matrix.\n    Note that :func:`cupy.linalg.eigh` calculates both eigenvalues and\n    eigenvectors.\n\n    Args:\n        a (cupy.ndarray): A symmetric 2-D square matrix ``(M, M)`` or a batch\n            of symmetric 2-D square matrices ``(..., M, M)``.\n        UPLO (str): Select from ``'L'`` or ``'U'``. It specifies which\n            part of ``a`` is used. ``'L'`` uses the lower triangular part of\n            ``a``, and ``'U'`` uses the upper triangular part of ``a``.\n    Returns:\n        cupy.ndarray:\n            Returns eigenvalues as a vector ``w``. For batch input,\n            ``w[k]`` is a vector of eigenvalues of matrix ``a[k]``.\n\n    .. warning::\n        This function calls one or more cuSOLVER routine(s) which may yield\n        invalid results if input conditions are not met.\n        To detect these invalid results, you can set the `linalg`\n        configuration to a value that is not `ignore` in\n        :func:`cupyx.errstate` or :func:`cupyx.seterr`.\n\n    .. seealso:: :func:`numpy.linalg.eigvalsh`\n    \"\"\"\n    if a.ndim < 2:\n        raise ValueError('Array must be at least two-dimensional')\n\n    _util._assert_nd_squareness(a)\n\n    if a.ndim > 2:\n        return cupy.cusolver.syevj(a, UPLO, False)\n    else:\n        return _syevd(a, UPLO, False)[0]\n", "path": "cupy/linalg/_eigenvalue.py"}], "after_files": [{"content": "import numpy\n\nimport cupy\nfrom cupy_backends.cuda.libs import cublas\nfrom cupy_backends.cuda.libs import cusolver\nfrom cupy.cuda import device\nfrom cupy.linalg import _util\n\n\ndef _syevd(a, UPLO, with_eigen_vector):\n    if UPLO not in ('L', 'U'):\n        raise ValueError('UPLO argument must be \\'L\\' or \\'U\\'')\n\n    # reject_float16=False for backward compatibility\n    dtype, v_dtype = _util.linalg_common_type(a, reject_float16=False)\n    real_dtype = dtype.char.lower()\n    w_dtype = v_dtype.char.lower()\n\n    # Note that cuSolver assumes fortran array\n    v = a.astype(dtype, order='F', copy=True)\n\n    m, lda = a.shape\n    w = cupy.empty(m, real_dtype)\n    dev_info = cupy.empty((), numpy.int32)\n    handle = device.Device().cusolver_handle\n\n    if with_eigen_vector:\n        jobz = cusolver.CUSOLVER_EIG_MODE_VECTOR\n    else:\n        jobz = cusolver.CUSOLVER_EIG_MODE_NOVECTOR\n\n    if UPLO == 'L':\n        uplo = cublas.CUBLAS_FILL_MODE_LOWER\n    else:  # UPLO == 'U'\n        uplo = cublas.CUBLAS_FILL_MODE_UPPER\n\n    if dtype == 'f':\n        buffer_size = cupy.cuda.cusolver.ssyevd_bufferSize\n        syevd = cupy.cuda.cusolver.ssyevd\n    elif dtype == 'd':\n        buffer_size = cupy.cuda.cusolver.dsyevd_bufferSize\n        syevd = cupy.cuda.cusolver.dsyevd\n    elif dtype == 'F':\n        buffer_size = cupy.cuda.cusolver.cheevd_bufferSize\n        syevd = cupy.cuda.cusolver.cheevd\n    elif dtype == 'D':\n        buffer_size = cupy.cuda.cusolver.zheevd_bufferSize\n        syevd = cupy.cuda.cusolver.zheevd\n    else:\n        raise RuntimeError('Only float and double and cuComplex and '\n                           + 'cuDoubleComplex are supported')\n\n    work_size = buffer_size(\n        handle, jobz, uplo, m, v.data.ptr, lda, w.data.ptr)\n    work = cupy.empty(work_size, dtype)\n    syevd(\n        handle, jobz, uplo, m, v.data.ptr, lda,\n        w.data.ptr, work.data.ptr, work_size, dev_info.data.ptr)\n    cupy.linalg._util._check_cusolver_dev_info_if_synchronization_allowed(\n        syevd, dev_info)\n\n    return w.astype(w_dtype, copy=False), v.astype(v_dtype, copy=False)\n\n\n# TODO(okuta): Implement eig\n\n\ndef eigh(a, UPLO='L'):\n    \"\"\"\n    Return the eigenvalues and eigenvectors of a complex Hermitian\n    (conjugate symmetric) or a real symmetric matrix.\n\n    Returns two objects, a 1-D array containing the eigenvalues of `a`, and\n    a 2-D square array or matrix (depending on the input type) of the\n    corresponding eigenvectors (in columns).\n\n    Args:\n        a (cupy.ndarray): A symmetric 2-D square matrix ``(M, M)`` or a batch\n            of symmetric 2-D square matrices ``(..., M, M)``.\n        UPLO (str): Select from ``'L'`` or ``'U'``. It specifies which\n            part of ``a`` is used. ``'L'`` uses the lower triangular part of\n            ``a``, and ``'U'`` uses the upper triangular part of ``a``.\n    Returns:\n        tuple of :class:`~cupy.ndarray`:\n            Returns a tuple ``(w, v)``. ``w`` contains eigenvalues and\n            ``v`` contains eigenvectors. ``v[:, i]`` is an eigenvector\n            corresponding to an eigenvalue ``w[i]``. For batch input,\n            ``v[k, :, i]`` is an eigenvector corresponding to an eigenvalue\n            ``w[k, i]`` of ``a[k]``.\n\n    .. warning::\n        This function calls one or more cuSOLVER routine(s) which may yield\n        invalid results if input conditions are not met.\n        To detect these invalid results, you can set the `linalg`\n        configuration to a value that is not `ignore` in\n        :func:`cupyx.errstate` or :func:`cupyx.seterr`.\n\n    .. seealso:: :func:`numpy.linalg.eigh`\n    \"\"\"\n    if a.ndim < 2:\n        raise ValueError('Array must be at least two-dimensional')\n\n    m, n = a.shape[-2:]\n    if m != n:\n        raise ValueError('Last 2 dimensions of the array must be square')\n\n    if a.ndim > 2:\n        return cupy.cusolver.syevj(a, UPLO, True)\n    else:\n        return _syevd(a, UPLO, True)\n\n\n# TODO(okuta): Implement eigvals\n\n\ndef eigvalsh(a, UPLO='L'):\n    \"\"\"\n    Compute the eigenvalues of a complex Hermitian or real symmetric matrix.\n\n    Main difference from eigh: the eigenvectors are not computed.\n\n    Args:\n        a (cupy.ndarray): A symmetric 2-D square matrix ``(M, M)`` or a batch\n            of symmetric 2-D square matrices ``(..., M, M)``.\n        UPLO (str): Select from ``'L'`` or ``'U'``. It specifies which\n            part of ``a`` is used. ``'L'`` uses the lower triangular part of\n            ``a``, and ``'U'`` uses the upper triangular part of ``a``.\n    Returns:\n        cupy.ndarray:\n            Returns eigenvalues as a vector ``w``. For batch input,\n            ``w[k]`` is a vector of eigenvalues of matrix ``a[k]``.\n\n    .. warning::\n        This function calls one or more cuSOLVER routine(s) which may yield\n        invalid results if input conditions are not met.\n        To detect these invalid results, you can set the `linalg`\n        configuration to a value that is not `ignore` in\n        :func:`cupyx.errstate` or :func:`cupyx.seterr`.\n\n    .. seealso:: :func:`numpy.linalg.eigvalsh`\n    \"\"\"\n    if a.ndim < 2:\n        raise ValueError('Array must be at least two-dimensional')\n\n    _util._assert_nd_squareness(a)\n\n    if a.ndim > 2:\n        return cupy.cusolver.syevj(a, UPLO, False)\n    else:\n        return _syevd(a, UPLO, False)[0]\n", "path": "cupy/linalg/_eigenvalue.py"}]}